Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37224 backup: fixed bug when searching for a course to import

  • Loading branch information...
commit 5c70a6ec3c28a925aa0f27c1a29cf2996f43e5d5 1 parent bbcf8da
@samhemelryk samhemelryk authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 backup/import.php
View
4 backup/import.php
@@ -11,6 +11,8 @@
$courseid = required_param('id', PARAM_INT);
// The id of the course we are importing FROM (will only be set if past first stage
$importcourseid = optional_param('importid', false, PARAM_INT);
+// We just want to check if a search has been run. True if anything is there.
+$coursesearch = optional_param('search', false, PARAM_BOOL);
// The target method for the restore (adding or deleting)
$restoretarget = optional_param('target', backup::TARGET_CURRENT_ADDING, PARAM_INT);
@@ -36,7 +38,7 @@
$renderer = $PAGE->get_renderer('core','backup');
// Check if we already have a import course id
-if ($importcourseid === false) {
+if ($importcourseid === false || $coursesearch) {
// Obviously not... show the selector so one can be chosen
$url = new moodle_url('/backup/import.php', array('id'=>$courseid));
$search = new import_course_search(array('url'=>$url));

0 comments on commit 5c70a6e

Please sign in to comment.
Something went wrong with that request. Please try again.