Skip to content
Browse files

On the admin user page you select "forum posts" which becomes the act…

…ive 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"
  • Loading branch information...
1 parent 3e8506b commit e1ddfa6bc6630008842899bdd06ab13575e75f3c urs_hunkler committed May 5, 2005
Showing with 7 additions and 2 deletions.
  1. +3 −1 mod/forum/user.php
  2. +4 −1 user/tabs.php
View
4 mod/forum/user.php
@@ -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);
?>
View
5 user/tabs.php
@@ -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.'&amp;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);
?>

0 comments on commit e1ddfa6

Please sign in to comment.
Something went wrong with that request. Please try again.