Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed various bugs in add_teacher() those caused the function not pop…

…ulating record correctly (Merged from MOODLE_15_STABLE)
  • Loading branch information...
commit aef46c081f32e4666d63894a26da6136a1df54d9 1 parent 8b658d8
patrickslee authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/moodlelib.php
View
5 lib/moodlelib.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.