Permalink
Browse files

Merge branch 'w33_MDL-29022_m20_idnumber' of git://github.com/skodak/…

…moodle into MOODLE_20_STABLE
  • Loading branch information...
2 parents df40fa5 + 367f1a7 commit d45e51753816812be23fd19ba44cdef1abd5cb06 @stronk7 stronk7 committed Aug 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 enrol/database/lib.php
View
4 enrol/database/lib.php
@@ -546,8 +546,8 @@ public function sync_courses() {
// already exists
continue;
}
- if ($idnumber and $DB->record_exists('course', array('idnumber'=>$fields[$idnumber]))) {
- // idnumber duplicates are not allowed
+ // allow empty idnumber but not duplicates
+ if ($idnumber and $fields[$idnumber] !== '' and $fields[$idnumber] !== null and $DB->record_exists('course', array('idnumber'=>$fields[$idnumber]))) {
continue;
}
if ($category and !$DB->record_exists('course_categories', array('id'=>$fields[$category]))) {

0 comments on commit d45e517

Please sign in to comment.