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.
This commit is contained in:
Mihail Geshoski 2021-08-12 16:30:35 +08:00
parent d5d99eddbb
commit 1dc3fa2c55
10 changed files with 0 additions and 21 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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;

View File

@ -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]);

View File

@ -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');

View File

@ -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),

View File

@ -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();