Merge branch 'w10_MDL-31807_m22_cohort' of git://github.com/skodak/moodle into MOODLE_22_STABLE
This commit is contained in:
+3
-2
@@ -71,8 +71,9 @@ function cohort_add_cohort($cohort) {
|
||||
*/
|
||||
function cohort_update_cohort($cohort) {
|
||||
global $DB;
|
||||
if (isset($cohort->component) and empty($cohort->component)) {
|
||||
$cohort->component = NULL;
|
||||
if (property_exists($cohort, 'component') and empty($cohort->component)) {
|
||||
// prevent NULLs
|
||||
$cohort->component = '';
|
||||
}
|
||||
$cohort->timemodified = time();
|
||||
$DB->update_record('cohort', $cohort);
|
||||
|
||||
Reference in New Issue
Block a user