course publish MDL-24022 cast bool into int (enrollable field)

This commit is contained in:
jerome mouneyrac 2010-09-01 03:18:15 +00:00
parent a8adbef8ae
commit 9c9de5f0c2

View File

@ -124,7 +124,7 @@ class course_publish_manager {
$publication->huburl = $huburl;
$publication->courseid = $courseid;
$publication->hubcourseid = $hubcourseid;
$publication->enrollable = $enrollable;
$publication->enrollable = (int) $enrollable;
$publication->timepublished = time();
$DB->insert_record('course_published', $publication);
}
@ -244,7 +244,7 @@ class course_publish_manager {
}
if ($enrollable != -1) {
$params['enrollable'] = $enrollable;
$params['enrollable'] = (int) $enrollable;
}
$DB->delete_records('course_published', $params);