$rated = optional_param('rated', false, PARAM_BOOL); } } if ($tab == 0) { $posts = $forum->get_all_posts_by_user($userid, $groupid, 'fp.id', $start, $end, $rated); } else { $posts = $forum->get_rated_posts_by_user($forum, $userid, $groupid, 'fp.id', $ratedstart, $ratedend, $start, $end); } // Add collected start and end UNIX formated dates to moodle url. $pageurl->param('start', $start); $pageurl->param('end', $end); $pageurl->param('rated', $rated); $pageurl->param('ratedstart', $ratedstart); $pageurl->param('ratedend', $ratedend); $table = new forumng_participation_table('mod-forumng-participation'); $table->set_attribute('class', 'flexible generaltable'); $table->set_attribute('width', '100%'); $table->define_columns(array('c1', 'c2', 'c3')); $table->define_headers(array('In reply to', 'Post date', 'Post subject', 'Post message')); $table->define_baseurl($pageurl); $filename = "{$course->shortname}-" . format_string($forum->get_name(), true) . "-" . $USER->username; $table->is_downloading($download, $filename, get_string('userposts', 'forumngfeature_userposts')); if (empty($download)) { print $out->header(); if ($forum->get_enableratings() == mod_forumng::FORUMNG_STANDARD_RATING && has_capability('mod/forumng:rate', $context)) { $taburl = clone $pageurl; $taburl->remove_params('tab'); $tabs = array(new tabobject('tab0', $taburl . '&tab=0', $tabtitle1), new tabobject('tab1', $taburl . '&tab=1', $tabtitle2)); print $out->tabtree($tabs, "tab{$tab}"); } // Display time filter options form.