mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-58835 report_insights: Fix redirections
This commit is contained in:
parent
59f431e8a7
commit
a6edbef556
@ -130,7 +130,7 @@ class renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (!CLI_SCRIPT) {
|
||||
$output .= $OUTPUT->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'));
|
||||
$output .= $OUTPUT->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'), 'get');
|
||||
}
|
||||
|
||||
return $output;
|
||||
@ -200,7 +200,7 @@ class renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (!CLI_SCRIPT) {
|
||||
$output .= $OUTPUT->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'));
|
||||
$output .= $OUTPUT->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'), 'get');
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
2
report/insights/amd/build/actions.min.js
vendored
2
report/insights/amd/build/actions.min.js
vendored
@ -1 +1 @@
|
||||
define(["jquery","core/ajax","core/notification"],function(a,b,c){return{init:function(d){a("a[data-prediction-methodname][data-prediction-id="+d+"]").on("click",function(e){e.preventDefault();var f=a(e.currentTarget),g=f.attr("data-prediction-methodname"),h=f.closest("tr");if(h.length>0){var i=b.call([{methodname:g,args:{predictionid:d}}])[0];i.done(function(){h[0].remove(),0===a(".insights-list tr").length&&window.history.back()}).fail(c.exception)}})}}});
|
||||
define(["jquery","core/ajax","core/notification"],function(a,b,c){return{init:function(d){a("a[data-prediction-methodname][data-prediction-id="+d+"]").on("click",function(e){e.preventDefault();var f=a(e.currentTarget),g=f.attr("data-prediction-methodname"),h=f.closest("tr");if(h.length>0){var i=b.call([{methodname:g,args:{predictionid:d}}])[0];i.done(function(){h[0].remove(),a(".insights-list tr").length<2&&window.history.back()}).fail(c.exception)}})}}});
|
@ -56,7 +56,7 @@ define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notificat
|
||||
predictionContainers[0].remove();
|
||||
|
||||
// Move back if no remaining predictions.
|
||||
if ($('.insights-list tr').length === 0) {
|
||||
if ($('.insights-list tr').length < 2) {
|
||||
window.history.back();
|
||||
}
|
||||
}).fail(Notification.exception);
|
||||
|
Loading…
x
Reference in New Issue
Block a user