mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Improvements to timezone import interface
This commit is contained in:
parent
c9e55a2583
commit
a1e93da26c
5 changed files with 113 additions and 168 deletions
|
@ -208,7 +208,7 @@ function get_records_csv($file, $table) {
|
|||
function put_records_csv($file, $records, $table = NULL) {
|
||||
global $CFG, $db;
|
||||
|
||||
if(empty($records)) {
|
||||
if (empty($records)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,8 @@ function put_records_csv($file, $records, $table = NULL) {
|
|||
return false;
|
||||
}
|
||||
|
||||
echo "x";
|
||||
|
||||
if(!($fp = @fopen($CFG->dataroot.'/temp/'.$file, 'w'))) {
|
||||
error('put_records_csv failed to open '.$file);
|
||||
}
|
||||
|
@ -231,6 +233,7 @@ function put_records_csv($file, $records, $table = NULL) {
|
|||
else {
|
||||
return false;
|
||||
}
|
||||
echo "x";
|
||||
|
||||
if(!empty($metacolumns)) {
|
||||
$fields_table = array_map(create_function('$a', 'return $a->name;'), $metacolumns);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue