mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-51259 mod_data: ratings of items not activated.
When selecting a rating method, the restrict rating to items with dates would be automatically enabled if not checked. This code brings the data module inline with forum and glossary.
This commit is contained in:
parent
d230899db8
commit
f3013ba67e
@ -910,6 +910,11 @@ function data_add_instance($data, $mform = null) {
|
||||
$data->assessed = 0;
|
||||
}
|
||||
|
||||
if (empty($data->ratingtime) || empty($data->assessed)) {
|
||||
$data->assesstimestart = 0;
|
||||
$data->assesstimefinish = 0;
|
||||
}
|
||||
|
||||
$data->timemodified = time();
|
||||
|
||||
$data->id = $DB->insert_record('data', $data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user