From 68ba62d21adc23547b0e3ac5049b2a26b7218e77 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Fri, 17 Dec 2004 03:04:24 +0000 Subject: [PATCH] Merged from MOODLE_14_STABLE: Adding fix for idnumber duplication problem in restoring from backup discussed at http://moodle.org/mod/forum/discuss.php?d=16297 --- backup/restore_execute.html | 4 ++++ backup/restorelib.php | 1 + lang/en/moodle.php | 3 +++ 3 files changed, 8 insertions(+) diff --git a/backup/restore_execute.html b/backup/restore_execute.html index 768d026535..35242c776c 100644 --- a/backup/restore_execute.html +++ b/backup/restore_execute.html @@ -64,6 +64,7 @@ //Saving conversion id variables into backup_tables if ($restore->restoreto == 2) { echo "
  • ".get_string("creatingnewcourse"); + $oldidnumber = $course_header->course_idnumber; if (!$status = restore_create_new_course($restore,$course_header)) { notify("Error while creating the new empty course."); } @@ -72,6 +73,9 @@ echo ""; //Put the destination course_id $restore->course_id = $course_header->course_id; diff --git a/backup/restorelib.php b/backup/restorelib.php index d0e3f324e8..1b321d13d4 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -527,6 +527,7 @@ $course->fullname = addslashes($course_header->course_fullname); $course->shortname = addslashes($course_header->course_shortname); $course->idnumber = addslashes($course_header->course_idnumber); + $course->idnumber = ''; //addslashes($course_header->course_idnumber); // we don't want this at all. $course->summary = restore_decode_absolute_links(addslashes($course_header->course_summary)); $course->format = addslashes($course_header->course_format); $course->showgrades = addslashes($course_header->course_showgrades); diff --git a/lang/en/moodle.php b/lang/en/moodle.php index d87105e55f..1e60c58ccb 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -654,6 +654,8 @@ $string['loginto'] = 'Login to $a'; $string['loginusing'] = 'Login here using your username and password'; $string['logout'] = 'Logout'; $string['logs'] = 'Logs'; +$string['logtoomanycourses'] = ' [ url\">more ] '; +$string['logtoomanyusers'] = ' [ url\">more ] '; $string['mailadmins'] = 'Inform admins'; $string['mailstudents'] = 'Inform students'; $string['mailteachers'] = 'Inform teachers'; @@ -768,6 +770,7 @@ $string['nofilesyet'] = 'No files have been uploaded to your course yet'; $string['nograde'] = 'No grade'; $string['noimagesyet'] = 'No images have been uploaded to your course yet'; $string['nomorecourses'] = 'No more matching courses could be found'; +$string['nomoreidnumber'] = 'Not using an idnumber to avoid collisions'; $string['none'] = 'None'; $string['nopotentialadmins'] = 'No potential admins'; $string['nopotentialcreators'] = 'No potential course creators'; -- 2.39.5