Index: temp_moodle_dev/moodle/mod/lesson/import.php
===================================================================
diff -u -r5251d2a62e0e78377219456d6bba613eb2d1fd26 -r935d3cef4a213681d1f47b804f77b65dc870b15a
--- temp_moodle_dev/moodle/mod/lesson/import.php (.../import.php) (revision 5251d2a62e0e78377219456d6bba613eb2d1fd26)
+++ temp_moodle_dev/moodle/mod/lesson/import.php (.../import.php) (revision 935d3cef4a213681d1f47b804f77b65dc870b15a)
@@ -36,7 +36,8 @@
$strlessons = get_string("modulenameplural", "lesson");
$navigation = build_navigation($strimportquestions, $cm);
- print_header_simple("$strimportquestions", " $strimportquestions", $navigation);
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_header_simple("$strimportquestions", " $strimportquestions", $navigation, "", "", true, '','',false,'',false,$cm->is_lams);
if ($form = data_submitted()) { /// Filename
@@ -67,15 +68,19 @@
if (! $format->importprocess($_FILES['newfile']['tmp_name'], $lesson, $pageid)) { // Process the uploaded file
error("Error occurred during processing!");
+ }elseif($cm->is_lams==1){
+ $uploaded=1;
}
if (! $format->importpostprocess()) { // In case anything needs to be done after
error("Error occurred during post-processing!");
}
echo "
";
- print_continue("view.php?id=$cm->id");
- print_footer($course);
+ // pass a new parameter to view.php just to know if the teacher has imported any question (if he did, he will be able to finish editting Lams's sequence)
+ print_continue("view.php?id=$cm->id&uploaded=$uploaded");
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_footer($course,null, false,$cm->is_lams);
exit;
}
}
@@ -110,6 +115,7 @@
echo "";
print_simple_box_end();
- print_footer($course);
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_footer($course,null, false,$cm->is_lams);
?>
Index: temp_moodle_dev/moodle/mod/lesson/importppt.php
===================================================================
diff -u -r5251d2a62e0e78377219456d6bba613eb2d1fd26 -r935d3cef4a213681d1f47b804f77b65dc870b15a
--- temp_moodle_dev/moodle/mod/lesson/importppt.php (.../importppt.php) (revision 5251d2a62e0e78377219456d6bba613eb2d1fd26)
+++ temp_moodle_dev/moodle/mod/lesson/importppt.php (.../importppt.php) (revision 935d3cef4a213681d1f47b804f77b65dc870b15a)
@@ -45,7 +45,9 @@
$strlessons = get_string("modulenameplural", "lesson");
$navigation = build_navigation($strimportppt, $cm);
- print_header_simple("$strimportppt", " $strimportppt", $navigation);
+
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_header_simple("$strimportppt", " $strimportppt", $navigation, "", "", true, '','',false,'',false,$cm->is_lams);
if ($form = data_submitted()) { /// Filename
@@ -69,14 +71,19 @@
if(! $mod_save_objects($objects, $mod->id, $pageid)) { // sends it to DB
error("could not save");
- }
+ //LAMS: variable we pass to let it know we have added a new PPT while editting
+ }elseif($cm->is_lams==1){
+ $uploaded=1;
+ }
} else {
error('could not get data');
}
echo "
";
- print_continue("$CFG->wwwroot/mod/$modname/view.php?id=$cm->id");
- print_footer($course);
+ // pass a new parameter to view.php just to know if the teacher has imported any question (if he did, he will be able to finish editting Lams's sequence)
+ print_continue("$CFG->wwwroot/mod/$modname/view.php?id=$cm->id&uploaded=$uploaded");
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_footer($course,null, false,$cm->is_lams);
exit;
}
}
@@ -103,7 +110,8 @@
echo "";
print_simple_box_end();
- print_footer($course);
+ //we pass a new parameter to the function so it won't we printed if is_lams=1
+ print_footer($course,null, false,$cm->is_lams);
// START OF FUNCTIONS