mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'w10_MDL-31807_m23_cohort' of git://github.com/skodak/moodle
This commit is contained in:
commit
0d4f9805ef
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user