Removed debug messages and added link to new course in which objects have been copied - refs #1884

skala
ywarnier 15 years ago
parent e8a1b3afe4
commit 1227020a01
  1. 6
      main/coursecopy/classes/CourseRestorer.class.php
  2. 2
      main/coursecopy/copy_course.php

@ -1754,7 +1754,7 @@ class CourseRestorer
$doc = '';
$thematic->params['id'] = null;
$last_id = Database::insert($table_thematic, $thematic->params, true);
$last_id = Database::insert($table_thematic, $thematic->params, false);
if (is_numeric($last_id)) {
api_item_property_update($this->destination_course_info, 'thematic', $last_id,"ThematicAdded", api_get_user_id());
@ -1763,7 +1763,7 @@ class CourseRestorer
unset($thematic_advance['id']);
$thematic_advance['attendance_id'] = 0;
$thematic_advance['thematic_id'] = $last_id;
$my_id = Database::insert($table_thematic_advance, $thematic_advance, true);
$my_id = Database::insert($table_thematic_advance, $thematic_advance, false);
if (is_numeric($my_id)) {
api_item_property_update($this->destination_course_info, 'thematic_advance', $my_id,"ThematicAdvanceAdded", api_get_user_id());
@ -1773,7 +1773,7 @@ class CourseRestorer
foreach($thematic->thematic_plan_list as $thematic_plan) {
unset($thematic_advance['id']);
$thematic_plan['thematic_id'] = $last_id;
$my_id = Database::insert($table_thematic_plan, $thematic_plan, true);
$my_id = Database::insert($table_thematic_plan, $thematic_plan, false);
if (is_numeric($my_id)) {
api_item_property_update($this->destination_course_info, 'thematic_plan', $my_id, "ThematicPlanAdded", api_get_user_id());
}

@ -52,7 +52,7 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') || (is
$cr = new CourseRestorer($course);
$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore($_POST['destination_course']);
Display::display_normal_message(get_lang('CopyFinished'));
Display::display_normal_message(get_lang('CopyFinished').': <a href="'.api_get_course_url($_POST['destination_course']).'">'.$_POST['destination_course'].'</a>',false);
} elseif (isset ($_POST['copy_option']) && $_POST['copy_option'] == 'select_items') {
$cb = new CourseBuilder();
$course = $cb->build();

Loading…
Cancel
Save