mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fixed various bugs in add_teacher() those caused the function not populating record correctly (Merged from MOODLE_15_STABLE)
This commit is contained in:
parent
8b658d8abf
commit
aef46c081f
1 changed files with 3 additions and 2 deletions
|
@ -2881,9 +2881,10 @@ function add_teacher($userid, $courseid, $editall=1, $role='', $timestart=0, $ti
|
|||
$teacher->course = $courseid;
|
||||
$teacher->editall = $editall;
|
||||
$teacher->role = $role;
|
||||
$teacher->enrol = $enrol;
|
||||
$teacher->timemodified = time();
|
||||
$newteacher->timestart = $timestart;
|
||||
$newteacher->timeend = $timeend;
|
||||
$teacher->timestart = $timestart;
|
||||
$teacher->timeend = $timeend;
|
||||
if ($student = get_record('user_students', 'userid', $userid, 'course', $courseid)) {
|
||||
$teacher->timestart = $student->timestart;
|
||||
$teacher->timeend = $student->timeend;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue