Permalink
Browse files

user tabs MDL-17472 Fixed a regression where the $secondrow variable …

…of forum posts was being wiped out (See also MDLSITE-594)
  • Loading branch information...
1 parent 2d10a5e commit d8709908a0a064ee42d4bb54bfd504294d339635 moodler committed Dec 19, 2008
Showing with 9 additions and 10 deletions.
  1. +9 −10 user/tabs.php
View
@@ -180,31 +180,31 @@
$myreports = ($course->showreports and $USER->id == $user->id);
$anyreport = has_capability('moodle/user:viewuseractivitiesreport', $personalcontext);
- $secondrow = array();
+ $reportsecondrow = array();
if ($myreports or $anyreport or has_capability('coursereport/outline:view', $coursecontext)) {
- $secondrow[] = new tabobject('outline', $CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('outline', $CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=outline', get_string('outlinereport'));
}
if ($myreports or $anyreport or has_capability('coursereport/outline:view', $coursecontext)) {
- $secondrow[] = new tabobject('complete', $CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('complete', $CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=complete', get_string('completereport'));
}
if ($myreports or $anyreport or has_capability('coursereport/log:viewtoday', $coursecontext)) {
- $secondrow[] = new tabobject('todaylogs', $CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('todaylogs', $CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=todaylogs', get_string('todaylogs'));
}
if ($myreports or $anyreport or has_capability('coursereport/log:view', $coursecontext)) {
- $secondrow[] = new tabobject('alllogs', $CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('alllogs', $CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=alllogs', get_string('alllogs'));
}
if (!empty($CFG->enablestats)) {
if ($myreports or $anyreport or has_capability('coursereport/stats:view', $coursecontext)) {
- $secondrow[] = new tabobject('stats',$CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('stats',$CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=stats',get_string('stats'));
}
}
@@ -230,18 +230,17 @@
}
if ($gradeaccess) {
- $secondrow[] = new tabobject('grade', $CFG->wwwroot.'/course/user.php?id='.$course->id.
+ $reportsecondrow[] = new tabobject('grade', $CFG->wwwroot.'/course/user.php?id='.$course->id.
'&user='.$user->id.'&mode=grade', get_string('grade'));
}
- if ($secondrow) {
+ if ($reportsecondrow) {
$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', 'grade'))) {
$inactive = array('reports');
$activetwo = array('reports');
- } else {
- $secondrow = array();
+ $secondrow = $reportsecondrow;
}
}
} //close last bracket (individual tags)

0 comments on commit d870990

Please sign in to comment.