Fix bug on selective course recycling - ref #6045

skala
Hubert Borderiou 12 years ago
parent ded791a18e
commit 1eb5c51665
  1. 10
      main/coursecopy/recycle_course.php

@ -50,8 +50,16 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') || (is
$cb = new CourseBuilder();
$course = $cb->build();
}
$recycle_type = "";
if (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'full_backup') {
$recycle_type = 'full_backup';
}
else if (isset($_POST['action']) && $_POST['action'] == 'course_select_form') {
$recycle_type = 'select_items';
}
$cr = new CourseRecycler($course);
$cr->recycle($_POST['recycle_option']);
$cr->recycle($recycle_type);
Display::display_confirmation_message(get_lang('RecycleFinished'));
} elseif (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'select_items') {
$cb = new CourseBuilder();

Loading…
Cancel
Save