MDL-53473 tool_lp: User evidence default return URL is the evidence
This commit is contained in:
@@ -202,7 +202,7 @@ class page_helper {
|
||||
}
|
||||
|
||||
$returnurl = $plansurl;
|
||||
if ($returntype == 'plan' && $planurl) {
|
||||
if ($returntype != 'plans' && $planurl) {
|
||||
$returnurl = $planurl;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ require_once($CFG->libdir.'/adminlib.php');
|
||||
|
||||
$userid = optional_param('userid', false, PARAM_INT);
|
||||
$id = optional_param('id', false, PARAM_INT);
|
||||
$returntype = optional_param('return', 'plans', PARAM_ALPHA);
|
||||
$returntype = optional_param('return', null, PARAM_ALPHA);
|
||||
|
||||
require_login(0, false);
|
||||
\tool_lp\api::require_enabled();
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<h2>
|
||||
{{plan.name}}
|
||||
{{#plan.canbeedited}}
|
||||
<a href="{{pluginbaseurl}}/editplan.php?id={{plan.id}}&userid={{plan.userid}}&return=plan">{{#pix}}t/edit, core, {{#str}}editplan, tool_lp{{/str}}{{/pix}}</a>
|
||||
<a href="{{pluginbaseurl}}/editplan.php?id={{plan.id}}&userid={{plan.userid}}">{{#pix}}t/edit, core, {{#str}}editplan, tool_lp{{/str}}{{/pix}}</a>
|
||||
{{/plan.canbeedited}}
|
||||
</h2>
|
||||
<div data-region="plan-summary">
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li {{^canbeedited}} class="disabled" {{/canbeedited}}>
|
||||
<a href="{{#canbeedited}}
|
||||
{{pluginbaseurl}}/editplan.php?id={{id}}&userid={{userid}}
|
||||
{{pluginbaseurl}}/editplan.php?id={{id}}&userid={{userid}}&return=plans
|
||||
{{/canbeedited}}
|
||||
{{^canbeedited}}
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user