MDL-78782 behat: optimize with editing mode step
The current I am on course homepage with editing mode loads twice the course page. This patch prevents this from happening by going directly to editmode.php.
This commit is contained in:
+6
-1
@@ -28,7 +28,12 @@ $setmode = optional_param('setmode', false, PARAM_BOOL);
|
||||
$contextid = required_param('context', PARAM_INT);
|
||||
$pageurl = required_param('pageurl', PARAM_LOCALURL);
|
||||
|
||||
require_sesskey();
|
||||
// Behat requires JS to get the session. To allow goutte
|
||||
// to enable edit mode sesskey validation is skipped for behat scripts.
|
||||
if (!defined('BEHAT_SITE_RUNNING')) {
|
||||
require_sesskey();
|
||||
}
|
||||
|
||||
require_login();
|
||||
|
||||
$context = \context_helper::instance_by_id($contextid);
|
||||
|
||||
Reference in New Issue
Block a user