Skip to content
Browse files

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

…ulating record correctly
  • Loading branch information...
1 parent 4bcb6f1 commit 763f3766a8b6f582b2023e1de93e663336b2f099 patrickslee committed Oct 10, 2005
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/moodlelib.php
View
5 lib/moodlelib.php
@@ -2663,9 +2663,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 763f376

Please sign in to comment.
Something went wrong with that request. Please try again.