mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 22:25:04 +02:00
MDL-51486 mod_data: Can view rating information.
When students are given the appropriate permissions to view ratings, in the situation where there are separate groups. The students can view the ratings of an entry that is in the all participants group.
This commit is contained in:
parent
4cef723c22
commit
ca3e8022d1
@ -1566,6 +1566,11 @@ function mod_data_rating_can_see_item_ratings($params) {
|
||||
throw new rating_exception('invaliditemid');
|
||||
}
|
||||
|
||||
// User can see ratings of all participants.
|
||||
if ($info->groupid == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $info->course), '*', MUST_EXIST);
|
||||
$cm = get_coursemodule_from_instance('data', $info->dataid, $course->id, false, MUST_EXIST);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user