Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix calls to enrol_student() and add_teacher() where nulls were being…

… passed erroneously - credits to jeff graham
  • Loading branch information...
commit fe1acc35e7a693ccc761e9ed4764f283076d0fb5 1 parent 83847ae
martinlanghoff authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 enrol/ldap/enrol.php
View
4 enrol/ldap/enrol.php
@@ -297,13 +297,13 @@ function sync_enrolments($type, $enrol) {
if (!get_record($table{$type}, 'course', $course_obj->id,
'userid', $member, 'enrol', 'ldap')){
if($type === 'student'){
- if (enrol_student($member, $course_obj->id, NULL,NULL, 'ldap')){
+ if (enrol_student($member, $course_obj->id, 0, 0, 'ldap')){
print "Enrolled $type $member ($ldapmember) into course $course_obj->id ($course_obj->shortname)\n";
} else {
print "Failed to enrol $type $member ($ldapmember) into course $course_obj->id ($course_obj->shortname)\n";
}
} else { // teacher
- if (add_teacher($member, $course_obj->id, NULL,NULL,NULL, NULL,'ldap')){
+ if (add_teacher($member, $course_obj->id, 1,'',0,0,'ldap')){
print "Enrolled $type $member ($ldapmember) into course $course_obj->id ($course_obj->shortname)\n";
} else {
print "Failed to enrol $type $member ($ldapmember) into course $course_obj->id ($course_obj->shortname)\n";
Please sign in to comment.
Something went wrong with that request. Please try again.