Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-29022 do not require idnumber in ext courses - backport from MDL-…

…29020
  • Loading branch information...
commit 367f1a7300e159c646ad62b55c51c0c3579fde26 1 parent 9e47a85
@skodak skodak authored
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]))) {
Please sign in to comment.
Something went wrong with that request. Please try again.