From 1dc3fa2c552a2ca28ba056f0a5b2465821078bc0 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Thu, 12 Aug 2021 16:30:35 +0800 Subject: [PATCH] MDL-72094 report: Avoid storing the last accessed course report Removes the logic in the course reports related to storing the last accessed course report in a session variable as this behaviour is no longer required. --- admin/tool/monitor/managerules.php | 2 -- report/competency/index.php | 2 -- report/completion/index.php | 2 -- report/insights/insights.php | 1 - report/log/index.php | 2 -- report/loglive/index.php | 2 -- report/outline/index.php | 3 --- report/participation/index.php | 2 -- report/progress/index.php | 2 -- report/stats/index.php | 3 --- 10 files changed, 21 deletions(-) diff --git a/admin/tool/monitor/managerules.php b/admin/tool/monitor/managerules.php index 1889c3e2c46..caf42db95fa 100644 --- a/admin/tool/monitor/managerules.php +++ b/admin/tool/monitor/managerules.php @@ -113,8 +113,6 @@ if (!empty($action) && $ruleid) { echo $OUTPUT->header(); } -report_helper::save_selected_report($courseid, $manageurl); - // Print the selected dropdown. $managerules = get_string('managerules', 'tool_monitor'); report_helper::print_report_selector($managerules); diff --git a/report/competency/index.php b/report/competency/index.php index 18c599baddb..dd5eca16b82 100644 --- a/report/competency/index.php +++ b/report/competency/index.php @@ -73,8 +73,6 @@ $PAGE->set_title($title); $PAGE->set_heading($coursename); $PAGE->set_pagelayout('incourse'); -report_helper::save_selected_report($id, $navurl); - $output = $PAGE->get_renderer('report_competency'); echo $output->header(); diff --git a/report/completion/index.php b/report/completion/index.php index 5724550e96e..0a894af5eb4 100644 --- a/report/completion/index.php +++ b/report/completion/index.php @@ -115,8 +115,6 @@ foreach ($completion->get_criteria() as $criterion) { } } -report_helper::save_selected_report($courseid, $url); - // Can logged in user mark users as complete? // (if the logged in user has a role defined in the role criteria) $allow_marking = false; diff --git a/report/insights/insights.php b/report/insights/insights.php index 92623618a1a..17982ba2ca8 100644 --- a/report/insights/insights.php +++ b/report/insights/insights.php @@ -158,7 +158,6 @@ if ($model->get_analyser()::one_sample_per_analysable()) { echo $OUTPUT->header(); if ($course) { - report_helper::save_selected_report($course->id, $url); // Print selected drop down. $pluginname = get_string('pluginname', 'report_insights'); report_helper::print_report_selector($pluginname); diff --git a/report/log/index.php b/report/log/index.php index 2b298884913..1e75bed5e9e 100644 --- a/report/log/index.php +++ b/report/log/index.php @@ -105,8 +105,6 @@ $url = new moodle_url("/report/log/index.php", $params); $PAGE->set_url('/report/log/index.php', array('id' => $id)); $PAGE->set_pagelayout('report'); -report_helper::save_selected_report($id, $url); - // Get course details. $course = null; if ($id) { diff --git a/report/loglive/index.php b/report/loglive/index.php index d6964676204..bb2f8005827 100644 --- a/report/loglive/index.php +++ b/report/loglive/index.php @@ -61,8 +61,6 @@ $url = new moodle_url("/report/loglive/index.php", $params); $PAGE->set_url($url); $PAGE->set_pagelayout('report'); -report_helper::save_selected_report($id, $url); - $renderable = new report_loglive_renderable($logreader, $id, $url, 0, $page); $refresh = $renderable->get_refresh_rate(); $logreader = $renderable->selectedlogreader; diff --git a/report/outline/index.php b/report/outline/index.php index 85d9331b669..665f9899ffb 100644 --- a/report/outline/index.php +++ b/report/outline/index.php @@ -49,9 +49,6 @@ require_login($course); $context = context_course::instance($course->id); require_capability('report/outline:view', $context); -$url = new moodle_url('/report/outline/index.php', ['id' => $id]); -report_helper::save_selected_report($id, $url); - // Handle form to filter access logs by date. $filterform = new \report_outline\filter_form(); $filterform->set_data(['id' => $course->id, 'filterstartdate' => $startdate, 'filterenddate' => $enddate]); diff --git a/report/participation/index.php b/report/participation/index.php index e28f520ea03..e9e53c36455 100644 --- a/report/participation/index.php +++ b/report/participation/index.php @@ -68,8 +68,6 @@ require_login($course); $context = context_course::instance($course->id); require_capability('report/participation:view', $context); -report_helper::save_selected_report($id, $url); - $strparticipation = get_string('participationreport'); $strviews = get_string('views'); $strposts = get_string('posts'); diff --git a/report/progress/index.php b/report/progress/index.php index d2a0756dd46..6a8a12e1069 100644 --- a/report/progress/index.php +++ b/report/progress/index.php @@ -156,8 +156,6 @@ $grandtotal = $completion->get_num_tracked_users('', array(), $group); // Get user data $progress = array(); -report_helper::save_selected_report($id, $url); - if ($total) { $progress = $completion->get_progress_all( implode(' AND ', $where), diff --git a/report/stats/index.php b/report/stats/index.php index b94aa70b7e5..21591702e74 100644 --- a/report/stats/index.php +++ b/report/stats/index.php @@ -76,9 +76,6 @@ $event = \report_stats\event\report_viewed::create(array('context' => $context, $event->trigger(); stats_check_uptodate($course->id); -$url = new moodle_url('/report/stats/index.php', ['course' => $course->id]); -report_helper::save_selected_report($courseid, $url); - if ($course->id == SITEID) { admin_externalpage_setup('reportstats', '', null, '', array('pagelayout'=>'report')); echo $OUTPUT->header();