case 2: $getposts = false; break; } $url->params(array('individual' => $curindividual, 'start' => $start, 'end' => $end, 'group' => $groupid)); $PAGE->set_url($url); // Add extra navigation link for users who can see all participation. $PAGE->navbar->add(get_string('viewallparticipation', 'oublog')); $PAGE->set_title(format_string($oublog->name)); $PAGE->set_heading(format_string($oublog->name)); $oublogoutput = $PAGE->get_renderer('mod_oublog'); echo $OUTPUT->header(); // Print Groups drop-down menu. groups_print_activity_menu($cm, $url); if ($oublog->individual) { $individualdetails = oublog_individual_get_activity_details($cm, $url, $oublog, $groupid, $context); if ($individualdetails) { $curindividual = $individualdetails->activeindividual; $oublog->individual = $individualdetails->mode; echo $individualdetails->display; $url->params(array('individual' => $curindividual, 'start' => $start, 'end' => $end)); $PAGE->set_url($url); } } if (!$start && !$end) { $title = get_string('participation_all', 'oublog'); $info = get_string('participation_all', 'oublog'); } $startdate = userdate($start, get_string('strftimedaydate')); $enddate = userdate($end, get_string('strftimedaydate')); if ($start && !$end) {
if ($tag) { $returnurl .= '&tag=' . urlencode($tag); } // Set-up individual. $currentindividual = -1; $individualdetails = 0; // Set up whether the group selector should display. $showgroupselector = true; if ($oublog->individual) { // If separate individual and visible group, do not show groupselector // unless the current user has permission. if ($oublog->individual == OUBLOG_SEPARATE_INDIVIDUAL_BLOGS && !has_capability('mod/oublog:viewindividual', $context)) { $showgroupselector = false; } $canpost = true; $individualdetails = oublog_individual_get_activity_details($cm, $returnurl, $oublog, $currentgroup, $context); if ($individualdetails) { $currentindividual = $individualdetails->activeindividual; if (!$individualdetails->newblogpost) { $canpost = false; } } } // Get Posts. list($posts, $recordcount) = oublog_get_posts($oublog, $context, $offset, $cm, $currentgroup, $currentindividual, $oubloguser->id, $tag, $canaudit); $hideunusedblog = !$posts && !$canpost && !$canaudit; if ($oublog->global && !$hideunusedblog) { // Bit about hidden with if global then $posts // In order to prevent people from looping through numbers to get the // name of every user in the site (in case these names are considered // private), don't display the header when not displaying posts, except