Some minor changes to each module to XHTMLise the restore process
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
$newid = insert_record ("assignment",$assignment);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","assignment")." \"".$assignment->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","assignment")." \"".$assignment->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -78,10 +78,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
$newid = insert_record ("attendance",$attendance);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","attendance")." \"".$attendance->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","attendance")." \"".$attendance->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -69,10 +69,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
$newid = insert_record ("chat",$chat);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","chat")." \"".$chat->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","chat")." \"".$chat->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -67,10 +67,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
$newid = insert_record ("choice",$choice);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","choice")." \"".$choice->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","choice")." \"".$choice->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -93,10 +93,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
$newid = insert_record ("dialogue",$dialogue);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","dialogue")." \"".$dialogue->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","dialogue")." \"".$dialogue->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -72,10 +72,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
$newid = insert_record ("exercise",$exercise);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","exercise")." \"".$exercise->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","exercise")." \"".$exercise->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -89,10 +89,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","forum")." \"".$forum->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","forum")." \"".$forum->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -109,10 +109,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
@@ -846,7 +842,7 @@
|
||||
|
||||
//Check we are restoring forums
|
||||
if ($restore->mods['forum']->restore == 1) {
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum");
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum").'</li>';
|
||||
//Get all course posts
|
||||
if ($posts = get_records_sql ("SELECT p.id, p.message
|
||||
FROM {$CFG->prefix}forum_posts p,
|
||||
@@ -919,7 +915,7 @@
|
||||
|
||||
//Check we are restoring resources
|
||||
if ($restore->mods['resource']->restore == 1) {
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource");
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource").'</li>';
|
||||
//Get all course resources
|
||||
if ($resources = get_records_sql ("SELECT r.id, r.alltext
|
||||
FROM {$CFG->prefix}resource r
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
$newid = insert_record ("glossary",$glossary);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","glossary")." \"".$glossary->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","glossary")." \"".$glossary->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -127,10 +127,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
$newid = insert_record ("journal",$journal);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","journal")." \"".$journal->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","journal")." \"".$journal->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -74,10 +74,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
$newid = insert_record ("label",$label);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","label")." \"".$label->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","label")." \"".$label->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -54,10 +54,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
$newid = insert_record("lesson", $lesson);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","lesson")." \"".$lesson->name."\"<br>";
|
||||
echo "<li>".get_string("modulename","lesson")." \"".$lesson->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -119,10 +119,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
+3
-11
@@ -269,10 +269,10 @@
|
||||
|
||||
//Do some output
|
||||
if ($status) {
|
||||
echo "<ul><li>".get_string("category")." \"".$quiz_cat->name."\"<br />";
|
||||
echo "<li>".get_string("category")." \"".$quiz_cat->name."\"</li>";
|
||||
} else {
|
||||
//We must never arrive here !!
|
||||
echo "<ul><li>".get_string("category")." \"".$quiz_cat->name."\" Error!<br />";
|
||||
echo "<li>".get_string("category")." \"".$quiz_cat->name."\" Error!</li>";
|
||||
}
|
||||
backup_flush(300);
|
||||
|
||||
@@ -286,10 +286,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
}
|
||||
|
||||
return $status;
|
||||
@@ -1350,7 +1346,7 @@
|
||||
$newid = insert_record ("quiz",$quiz);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","quiz")." \"".$quiz->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","quiz")." \"".$quiz->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -1371,10 +1367,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
$newid = insert_record ("resource",$resource);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","resource")." \"".$resource->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","resource")." \"".$resource->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -93,10 +93,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
@@ -184,7 +180,7 @@
|
||||
|
||||
//Check we are restoring assignments
|
||||
if ($restore->mods['assignment']->restore == 1) {
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","assignment");
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","assignment").'</li>';
|
||||
//Get all course assignments
|
||||
if ($assignments = get_records_sql ("SELECT a.id, a.description
|
||||
FROM {$CFG->prefix}assignment a
|
||||
@@ -220,7 +216,7 @@
|
||||
|
||||
//Check we are restoring forums
|
||||
if ($restore->mods['forum']->restore == 1) {
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum");
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum").'</li>';
|
||||
//Get all course posts
|
||||
if ($posts = get_records_sql ("SELECT p.id, p.message
|
||||
FROM {$CFG->prefix}forum_posts p,
|
||||
@@ -293,7 +289,7 @@
|
||||
|
||||
//Check we are restoring resources
|
||||
if ($restore->mods['resource']->restore == 1) {
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource");
|
||||
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource").'</li>';
|
||||
//Get all course resources
|
||||
if ($resources = get_records_sql ("SELECT r.id, r.alltext
|
||||
FROM {$CFG->prefix}resource r
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
//The structure is equal to the db, so insert the scorm
|
||||
$newid = insert_record ("scorm",$scorm);
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","scorm")." \"".$scorm->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","scorm")." \"".$scorm->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -82,10 +82,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
$newid = insert_record ("survey",$survey);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","survey")." \"".$survey->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","survey")." \"".$survey->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -72,10 +72,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
$newid = insert_record ("wiki",$wiki);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","wiki")." \"".$wiki->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","wiki")." \"".$wiki->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -67,10 +67,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
$newid = insert_record ("workshop",$workshop);
|
||||
|
||||
//Do some output
|
||||
echo "<ul><li>".get_string("modulename","workshop")." \"".$workshop->name."\"<br />";
|
||||
echo "<li>".get_string("modulename","workshop")." \"".$workshop->name."\"</li>";
|
||||
backup_flush(300);
|
||||
|
||||
if ($newid) {
|
||||
@@ -106,10 +106,6 @@
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
//Finalize ul
|
||||
echo "</ul>";
|
||||
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user