On the admin user page you select "forum posts" which becomes the active selection in the second row. This should be visualized in the tabs. Therefore I added the parameter "$activetwo" to the tabs functions to be able to set the class "activetwo" for the active tab in the second row.
added the parameter "$activetwo"
This commit is contained in:
+3
-1
@@ -61,7 +61,8 @@
|
||||
$extrasql = 'AND p.parent = 0';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
echo '<div class="user-content">';
|
||||
if ($posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage,
|
||||
$totalcount, $groupid, $extrasql)) {
|
||||
print_paging_bar($totalcount, $page, $perpage,
|
||||
@@ -103,6 +104,7 @@
|
||||
} else {
|
||||
print_heading(get_string('noposts', 'forum'));
|
||||
}
|
||||
echo '</div>';
|
||||
print_footer($course);
|
||||
|
||||
?>
|
||||
|
||||
+4
-1
@@ -12,6 +12,7 @@
|
||||
//if (!empty($USER) and (isteacher($course->id) or (($USER->id == $user->id) and !isguest()))) { // tabs are shown
|
||||
|
||||
$inactive = NULL;
|
||||
$activetwo = NULL;
|
||||
$toprow = array();
|
||||
|
||||
$toprow[] = new tabobject('profile', $CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id,
|
||||
@@ -44,6 +45,7 @@
|
||||
|
||||
if (in_array($currenttab, array('posts', 'discussions'))) {
|
||||
$inactive = array('forumposts');
|
||||
$activetwo = array('forumposts');
|
||||
|
||||
$secondrow = array();
|
||||
$secondrow[] = new tabobject('posts', $CFG->wwwroot.'/mod/forum/user.php?course='.$course->id.
|
||||
@@ -61,6 +63,7 @@
|
||||
|
||||
if (in_array($currenttab, array('outline', 'complete', 'todaylogs', 'alllogs'))) {
|
||||
$inactive = array('reports');
|
||||
$activetwo = array('reports');
|
||||
|
||||
$secondrow = array();
|
||||
$secondrow[] = new tabobject('outline', $CFG->wwwroot.'/course/user.php?id='.$course->id.
|
||||
@@ -87,6 +90,6 @@
|
||||
|
||||
/// Print out the tabs and continue!
|
||||
|
||||
print_tabs($tabs, $currenttab, $inactive);
|
||||
print_tabs($tabs, $currenttab, $inactive, $activetwo);
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user