Permalink
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...
patrickslee
patrickslee committed Oct 10, 2005
1 parent 8b658d8 commit aef46c081f32e4666d63894a26da6136a1df54d9
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/moodlelib.php
View
@@ -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;

0 comments on commit aef46c0

Please sign in to comment.