Fix course/teacher update see BT#10216

1.10.x
Julio Montoya 10 years ago
parent 48919fbecc
commit 376def35ce
  1. 3
      main/admin/course_edit.php
  2. 3
      main/inc/lib/course.lib.php

@ -359,7 +359,6 @@ if ($form->validate()) {
// Updating teachers
if ($addTeacherToSessionCourses) {
// Updating session coaches
$sessionCoaches = $course['session_coaches'];
if (!empty($sessionCoaches)) {
@ -374,7 +373,7 @@ if ($form->validate()) {
}
}
CourseManager::updateTeachers($courseId, $teachers, false, true, false);
CourseManager::updateTeachers($courseId, $teachers, true, true, false);
} else {
// Normal behaviour
CourseManager::updateTeachers($courseId, $teachers, true, false);

@ -4829,7 +4829,7 @@ class CourseManager
}
$sql = 'DELETE FROM ' . $course_user_table . '
WHERE c_id ="' . $courseId . '" AND status="1"' . $cond;
WHERE c_id ="' . $courseId . '" AND status="1" AND relation_type = 0 ' . $cond;
Database::query($sql);
}
@ -4850,6 +4850,7 @@ class CourseManager
status = '1',
is_tutor = '0',
sort = '0',
relation_type = '0',
user_course_cat='0'";
}
Database::query($sql);

Loading…
Cancel
Save