Merge branch 'MDL-31500_master' of git://github.com/dmonllao/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 24 Nov 2014 10:55:27 +0000 (10:55 +0000)
committerDan Poltawski <dan@moodle.com>
Mon, 24 Nov 2014 10:55:27 +0000 (10:55 +0000)
Conflicts:
backup/util/ui/renderer.php

1  2 
backup/util/ui/renderer.php

@@@ -301,12 -303,7 +303,12 @@@ class core_backup_renderer extends plug
              $html .= html_writer::end_tag('form');
          }
  
-         if (!empty($courses) && ($courses->get_count() > 0 || $courses->get_search())) {
 +        // If we are restoring an activity, then include the current course.
 +        if (!$wholecourse) {
 +            $courses->invalidate_results(); // Clean list of courses.
 +            $courses->set_include_currentcourse();
 +        }
+         if (!empty($courses) && ($courses->get_count() > 0 || $courses->get_search()) && $currentcourse != SITEID) {
              // Existing course
              $hasrestoreoption = true;
              $html .= $form;