mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-35556 completion: Improve user completion data permission checking
This commit is contained in:
parent
6109f2112c
commit
f493d528c2
3 changed files with 75 additions and 19 deletions
|
@ -561,7 +561,12 @@ foreach ($progress as $user) {
|
|||
} else {
|
||||
print PHP_EOL.'<tr id="user-'.$user->id.'">';
|
||||
|
||||
$userurl = new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $course->id));
|
||||
if (completion_can_view_data($user->id, $course)) {
|
||||
$userurl = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id, 'user' => $user->id));
|
||||
} else {
|
||||
$userurl = new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $course->id));
|
||||
}
|
||||
|
||||
print '<th scope="row"><a href="'.$userurl->out().'">'.fullname($user).'</a></th>';
|
||||
foreach ($extrafields as $field) {
|
||||
echo '<td>'.s($user->{$field}).'</td>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue