Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d230899
)
MDL-51259 mod_data: ratings of items not activated.
author
Adrian Greeve
<adrian@moodle.com>
Tue, 8 Sep 2015 03:47:44 +0000
(11:47 +0800)
committer
Adrian Greeve
<adrian@moodle.com>
Thu, 17 Sep 2015 23:21:59 +0000
(07:21 +0800)
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.
mod/data/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/data/lib.php
b/mod/data/lib.php
index
d664107
..
82b5dc2
100644
(file)
--- a/
mod/data/lib.php
+++ b/
mod/data/lib.php
@@
-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);