mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
some UI changes
This commit is contained in:
parent
b367b152ad
commit
7e2d7c92ad
6 changed files with 88 additions and 26 deletions
|
@ -132,12 +132,15 @@
|
|||
|
||||
|
||||
/// Current user must be teacher of the course or the course allows user to view their reports
|
||||
|
||||
//print_object($course);
|
||||
//print_object($user);
|
||||
if (isteacher($course->id) or ($course->showreports and $USER->id == $user->id)) {
|
||||
|
||||
$toprow[] = new tabobject('reports', $CFG->wwwroot.'/course/user.php?id='.$course->id.
|
||||
'&user='.$user->id.'&mode=outline', get_string('activityreports'));
|
||||
|
||||
if (in_array($currenttab, array('outline', 'complete', 'todaylogs', 'alllogs', 'stats'))) {
|
||||
if (in_array($currenttab, array('outline', 'complete', 'todaylogs', 'alllogs', 'stats', 'grade'))) {
|
||||
$inactive = array('reports');
|
||||
$activetwo = array('reports');
|
||||
|
||||
|
@ -154,12 +157,25 @@
|
|||
$secondrow[] = new tabobject('stats',$CFG->wwwroot.'/course/user.php?id='.$course->id.
|
||||
'&user='.$user->id.'&mode=stats',get_string('stats'));
|
||||
}
|
||||
|
||||
// needs permission checking!!!
|
||||
|
||||
$secondrow[] = new tabobject('grade', $CFG->wwwroot.'/course/user.php?id='.$course->id.
|
||||
'&user='.$user->id.'&mode=grade', get_string('grade'));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} //close last bracket (individual tags)
|
||||
|
||||
|
||||
/// this needs permission checkings
|
||||
|
||||
$context = get_context_instance(CONTEXT_USERID, $user->id);
|
||||
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id.'&userid='.$user->id.'&courseid='.$course->id
|
||||
,get_string('roles'));
|
||||
|
||||
/// Add second row to display if there is one
|
||||
|
||||
if (!empty($secondrow)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue