Skip to content
Snippets Groups Projects
Unverified Commit 4111dbc1 authored by Mario Wehr's avatar Mario Wehr Committed by Tim Schroeder
Browse files
parent c91f1733
Branches
No related tags found
No related merge requests found
......@@ -426,7 +426,7 @@ if ($action === 'overviewreports') {
if ($action === 'view') { // Default.
$PAGE->set_title("annotatorview");
echo $myrenderer->pdfannotator_render_tabs($taburl, $action, $pdfannotator->name, $context);
echo $myrenderer->pdfannotator_render_tabs($taburl, $pdfannotator->name, $context, $action);
pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page, $annoid, $commid);
}
......@@ -439,7 +439,7 @@ if ($action === 'statistic') {
require_once($CFG->dirroot . '/mod/pdfannotator/model/statistics.class.php');
echo $myrenderer->pdfannotator_render_tabs($taburl, $action, $pdfannotator->name, $context);
echo $myrenderer->pdfannotator_render_tabs($taburl, $pdfannotator->name, $context, $action);
$PAGE->set_title("statisticview");
echo $OUTPUT->heading(get_string('activities', 'pdfannotator'));
......@@ -488,7 +488,7 @@ if ($action === 'report') {
/* * ******************* Form processing and displaying is done here ************************ */
if ($mform->is_cancelled()) {
$action = 'view';
echo $myrenderer->pdfannotator_render_tabs($taburl, $action, $pdfannotator->name, $context);
echo $myrenderer->pdfannotator_render_tabs($taburl, $pdfannotator->name, $context, $action);
pdfannotator_display_embed($pdfannotator, $cm, $course, $file);
} else if ($report = $mform->get_data()) { // Process validated data. $mform->get_data() returns data posted in form.
require_sesskey();
......@@ -531,7 +531,7 @@ if ($action === 'report') {
}
$action = 'view';
echo $myrenderer->pdfannotator_render_tabs($taburl, $action, $pdfannotator->name, $context);
echo $myrenderer->pdfannotator_render_tabs($taburl, $pdfannotator->name, $context, $action);
pdfannotator_display_embed($pdfannotator, $cm, $course, $file);
} else { // This branch is executed if the form is submitted but the data doesn't validate and the form should be redisplayed
// or on the first display of the form.
......
......@@ -687,7 +687,7 @@ function pdfannotator_prepare_overviewpage($cmid, $myrenderer, $taburl, $action,
$PAGE->set_title("overview");
// 1.1 Display tab navigation.
echo $myrenderer->pdfannotator_render_tabs($taburl, $action['tab'], $pdfannotator->name, $context);
echo $myrenderer->pdfannotator_render_tabs($taburl, $pdfannotator->name, $context, $action['tab']);
// 1.2 Give javascript (see below) access to the language string repository.
$stringman = get_string_manager();
......
......@@ -93,13 +93,13 @@ class mod_pdfannotator_renderer extends plugin_renderer_base {
* Construct a tab header.
*
* @param moodle_url $baseurl
* @param string $namekey
* @param string $what
* @param string $namekey
* @param string $subpage
* @param string $nameargs
* @return tabobject
*/
private function pdfannotator_create_tab(moodle_url $baseurl, $namekey = null, $action, $pdfannotatorname = null, $nameargs = null) {
private function pdfannotator_create_tab(moodle_url $baseurl, $action, $namekey = null, $pdfannotatorname = null, $nameargs = null) {
$taburl = new moodle_url($baseurl, array('action' => $action));
$tabname = get_string($namekey, 'pdfannotator', $nameargs);
if ($pdfannotatorname) {
......@@ -113,19 +113,19 @@ class mod_pdfannotator_renderer extends plugin_renderer_base {
* Render the tab header hierarchy.
*
* @param moodle_url $baseurl
* @param type $selected
* @param type $pdfannotatorname
* @param type $context
* @param type $selected
* @param type $inactive
* @return type
*/
public function pdfannotator_render_tabs(moodle_url $baseurl, $selected = null, $pdfannotatorname, $context, $inactive = null) {
public function pdfannotator_render_tabs(moodle_url $baseurl, $pdfannotatorname, $context, $selected = null, $inactive = null) {
$overviewtab = $this->pdfannotator_create_tab($baseurl, 'overview', 'overview');
$level1 = array(
$overviewtab,
$this->pdfannotator_create_tab($baseurl, 'document', 'view', $pdfannotatorname),
$this->pdfannotator_create_tab($baseurl, 'view', 'document', $pdfannotatorname),
$this->pdfannotator_create_tab($baseurl, 'statistic', 'statistic'),
);
return $this->tabtree($level1, $selected, $inactive);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment