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