Disabling copy users in the session see BT#4916

skala
Julio Montoya 12 years ago
parent f12a431277
commit 56dd21ca4a
  1. 2
      main/admin/session_list.php
  2. 6
      main/inc/lib/sessionmanager.lib.php

@ -24,7 +24,7 @@ if ($action == 'delete') {
header('Location: session_list.php');
exit();
} elseif ($action == 'copy') {
SessionManager::copy_session($idChecked);
SessionManager::copy_session($idChecked, true, false);
header('Location: session_list.php');
exit();
}

@ -1945,7 +1945,7 @@ class SessionManager {
if ($set_exercises_lp_invisible) {
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$list = new LearnpathList('', $course_info['code'], $sid);
$flat_list = $list->get_flat_list();
$flat_list = $list->get_flat_list();
if (!empty($flat_list)) {
foreach($flat_list as $lp_id => $data) {
api_item_property_update($course_info, TOOL_LEARNPATH, $lp_id, 'invisible', api_get_user_id(), 0 ,0, 0, 0, $sid);
@ -1954,9 +1954,11 @@ class SessionManager {
}
$quiz_table = Database::get_course_table(TABLE_QUIZ_TEST);
$course_id = $course_info['real_id'];
//@todo check this query
//Disabling quiz items
$sql = "UPDATE $quiz_table SET active = 0 WHERE c_id = $course_id ";
$result=Database::query($sql);
Database::query($sql);
}
$new_short_courses[] = $course_info['code'];
}

Loading…
Cancel
Save