mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
fixing xhtml strict issues and display issues in restore
This commit is contained in:
parent
9e0c47a5bc
commit
ef3df6f086
3 changed files with 30 additions and 19 deletions
|
@ -263,7 +263,7 @@
|
||||||
if ($show_continue_button) {
|
if ($show_continue_button) {
|
||||||
//Print the continue button to execute the restore NOW !!!!
|
//Print the continue button to execute the restore NOW !!!!
|
||||||
//All is prepared !!!
|
//All is prepared !!!
|
||||||
echo "<center>";
|
echo "<div style='text-align:center'>";
|
||||||
$hidden["launch"] = "execute";
|
$hidden["launch"] = "execute";
|
||||||
$hidden["file"] = $file;
|
$hidden["file"] = $file;
|
||||||
$hidden["id"] = $id;
|
$hidden["id"] = $id;
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post");
|
print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post");
|
||||||
echo "</center>";
|
echo "</div>";
|
||||||
} else {
|
} else {
|
||||||
//Show error
|
//Show error
|
||||||
error ("Something was wrong checking restore preferences");
|
error ("Something was wrong checking restore preferences");
|
||||||
|
|
|
@ -160,7 +160,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form id="form1" method="post" action="restore.php">
|
<form id="form1" method="post" action="restore.php">
|
||||||
<table cellpadding="5">
|
<div>
|
||||||
|
<table cellpadding="5" class="boxaligncenter">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//First, course destination
|
//First, course destination
|
||||||
|
@ -291,23 +292,23 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Module isn't restorable
|
//Module isn't restorable
|
||||||
echo "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
||||||
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Module isn't restorable
|
//Module isn't restorable
|
||||||
echo "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
||||||
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Module isn't restorable
|
//Module isn't restorable
|
||||||
echo "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$restore_var\" value=\"0\" />";
|
||||||
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
$nonrestmod .= "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
|
||||||
}
|
}
|
||||||
$currentrow = ($currentrow + 1) % 2;
|
$currentrow = ($currentrow + 1) % 2;
|
||||||
}
|
}
|
||||||
//Line
|
//Line
|
||||||
echo "<tr><td colspan=\"4\"><hr /></td></tr>";
|
echo "<tr><td colspan=\"4\">$nonrestmod<hr /></td></tr>";
|
||||||
|
|
||||||
//Now print the Metacourse tr
|
//Now print the Metacourse tr
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
|
@ -415,7 +416,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td></tr></table>
|
</table>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
<?php
|
<?php
|
||||||
|
@ -434,7 +435,7 @@ if ($course->id == SITEID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ('<table width="100%" class="restore-form-instances">');
|
echo ('<table width="100%" class="restore-form-instances">');
|
||||||
echo ('<tr><td align="right"><b>'.get_string('sourcerole').'</b></td><td align="left"><b>'.get_string('targetrole').'</b></td></tr>');
|
echo ('<tr><td align="right" style="width:50%"><b>'.get_string('sourcerole').'</b></td><td align="left" style="width:50%"><b>'.get_string('targetrole').'</b></td></tr>');
|
||||||
|
|
||||||
if ($info->backup_moodle_version < 2006092801) {
|
if ($info->backup_moodle_version < 2006092801) {
|
||||||
// 1.6 and below backup
|
// 1.6 and below backup
|
||||||
|
@ -510,11 +511,12 @@ echo ('</table>'); // end of role mappings table
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<br />
|
<br />
|
||||||
<center>
|
<div style="text-align:center">
|
||||||
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
||||||
<input type="hidden" name="launch" value="check" />
|
<input type="hidden" name="launch" value="check" />
|
||||||
<input type="hidden" name="fromform" value="1" />
|
<input type="hidden" name="fromform" value="1" />
|
||||||
<input type="submit" value="<?php print_string("continue") ?>" />
|
<input type="submit" value="<?php print_string("continue") ?>" />
|
||||||
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
|
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
|
||||||
</center>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -79,9 +79,11 @@
|
||||||
if (function_exists($function_name)) {
|
if (function_exists($function_name)) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
echo "<li>".get_string ("from")." ".get_string("modulenameplural",$name);
|
echo "<li>".get_string ("from")." ".get_string("modulenameplural",$name);
|
||||||
echo '</li>';
|
|
||||||
}
|
}
|
||||||
$status = $function_name($restore);
|
$status = $function_name($restore);
|
||||||
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
echo '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5607,13 +5609,13 @@
|
||||||
//with some hidden fields
|
//with some hidden fields
|
||||||
if ($status) {
|
if ($status) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
echo "<br /><center>";
|
echo "<br /><div style='text-align:center'>";
|
||||||
$hidden["backup_unique_code"] = $backup_unique_code;
|
$hidden["backup_unique_code"] = $backup_unique_code;
|
||||||
$hidden["launch"] = "form";
|
$hidden["launch"] = "form";
|
||||||
$hidden["file"] = $file;
|
$hidden["file"] = $file;
|
||||||
$hidden["id"] = $id;
|
$hidden["id"] = $id;
|
||||||
print_single_button("restore.php", $hidden, get_string("continue"),"post");
|
print_single_button("restore.php", $hidden, get_string("continue"),"post");
|
||||||
echo "</center>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (empty($noredirect)) {
|
if (empty($noredirect)) {
|
||||||
|
@ -5914,6 +5916,10 @@
|
||||||
} // no need to return false here, it's recoverable.
|
} // no need to return false here, it's recoverable.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
echo "</li>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Now create metacourse info
|
//Now create metacourse info
|
||||||
|
@ -5921,7 +5927,7 @@
|
||||||
//Only to new courses!
|
//Only to new courses!
|
||||||
if ($restore->restoreto == 2) {
|
if ($restore->restoreto == 2) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
echo "</li><li>".get_string("creatingmetacoursedata");
|
echo "<li>".get_string("creatingmetacoursedata");
|
||||||
}
|
}
|
||||||
if (!$status = restore_create_metacourse($restore,$xml_file)) {
|
if (!$status = restore_create_metacourse($restore,$xml_file)) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
@ -5988,7 +5994,7 @@
|
||||||
//Now create course files as needed
|
//Now create course files as needed
|
||||||
if ($status and ($restore->course_files)) {
|
if ($status and ($restore->course_files)) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
echo "<li>".get_string("copyingcoursefiles")."</li>";
|
echo "<li>".get_string("copyingcoursefiles");
|
||||||
}
|
}
|
||||||
if (!$status = restore_course_files($restore)) {
|
if (!$status = restore_course_files($restore)) {
|
||||||
if (empty($status)) {
|
if (empty($status)) {
|
||||||
|
@ -6007,6 +6013,9 @@
|
||||||
echo "</ul>";
|
echo "</ul>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
echo "</li>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Now create messages as needed
|
//Now create messages as needed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue