From b3460b8e8a97ae6629bcea5f468298b488bdefcc Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 1 Mar 2007 02:46:04 +0000 Subject: [PATCH] merged fixing xhtml and display issues in restore --- backup/restore_check.html | 4 ++-- backup/restore_form.html | 26 ++++++++++++++------------ backup/restorelib.php | 19 ++++++++++++++----- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/backup/restore_check.html b/backup/restore_check.html index 065df0a94b7..359adb56c9f 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -263,7 +263,7 @@ if ($show_continue_button) { //Print the continue button to execute the restore NOW !!!! //All is prepared !!! - echo "
"; + echo "
"; $hidden["launch"] = "execute"; $hidden["file"] = $file; $hidden["id"] = $id; @@ -278,7 +278,7 @@ } } print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post"); - echo "
"; + echo ""; } else { //Show error error ("Something was wrong checking restore preferences"); diff --git a/backup/restore_form.html b/backup/restore_form.html index a6a334fa050..d97a40ac70b 100644 --- a/backup/restore_form.html +++ b/backup/restore_form.html @@ -160,7 +160,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
- +
+
"; - echo ""; + $nonrestmod .= ""; + $nonrestmod .= ""; } } else { //Module isn't restorable - echo ""; - echo ""; + $nonrestmod .= ""; + $nonrestmod .= ""; } } else { //Module isn't restorable - echo ""; - echo ""; + $nonrestmod .= ""; + $nonrestmod .= ""; } $currentrow = ($currentrow + 1) % 2; } //Line - echo ""; + echo ""; //Now print the Metacourse tr echo ""; @@ -415,7 +416,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) { echo ""; } ?> -

$nonrestmod
+
id == SITEID) { } echo (''); -echo (''); +echo (''); if ($info->backup_moodle_version < 2006092801) { // 1.6 and below backup @@ -510,11 +511,12 @@ echo ('
'.get_string('sourcerole').''.get_string('targetrole').'
'.get_string('sourcerole').''.get_string('targetrole').'
'); // end of role mappings table ?>
-
+
" /> " /> -
+ +
diff --git a/backup/restorelib.php b/backup/restorelib.php index e4fbc728a1b..d817303212d 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -79,9 +79,11 @@ if (function_exists($function_name)) { if (!defined('RESTORE_SILENTLY')) { echo "
  • ".get_string ("from")." ".get_string("modulenameplural",$name); - echo '
  • '; } $status = $function_name($restore); + if (!defined('RESTORE_SILENTLY')) { + echo ''; + } } } } @@ -5607,13 +5609,13 @@ //with some hidden fields if ($status) { if (!defined('RESTORE_SILENTLY')) { - echo "
    "; + echo "
    "; $hidden["backup_unique_code"] = $backup_unique_code; $hidden["launch"] = "form"; $hidden["file"] = $file; $hidden["id"] = $id; print_single_button("restore.php", $hidden, get_string("continue"),"post"); - echo "
    "; + echo ""; } else { if (empty($noredirect)) { @@ -5914,6 +5916,10 @@ } // no need to return false here, it's recoverable. } } + + if (!defined('RESTORE_SILENTLY')) { + echo ""; + } } //Now create metacourse info @@ -5921,7 +5927,7 @@ //Only to new courses! if ($restore->restoreto == 2) { if (!defined('RESTORE_SILENTLY')) { - echo "
  • ".get_string("creatingmetacoursedata"); + echo "
  • ".get_string("creatingmetacoursedata"); } if (!$status = restore_create_metacourse($restore,$xml_file)) { if (!defined('RESTORE_SILENTLY')) { @@ -5988,7 +5994,7 @@ //Now create course files as needed if ($status and ($restore->course_files)) { if (!defined('RESTORE_SILENTLY')) { - echo "
  • ".get_string("copyingcoursefiles")."
  • "; + echo "
  • ".get_string("copyingcoursefiles"); } if (!$status = restore_course_files($restore)) { if (empty($status)) { @@ -6007,6 +6013,9 @@ echo ""; } } + if (!defined('RESTORE_SILENTLY')) { + echo "
  • "; + } } //Now create messages as needed