MDL-65538 competency: fix behat errors with firefox

There is a random behat error when executing the "Go to the competency
course competencies page." scenario: "Moodle exception: A required parameter
(courseid) was missing More information about this error".
It happens because sometimes the form is sent before the JS and it hasn't
the needed parameters defined. So they have been added as hidden to the
form to avoid the error (which I couldn't reproduce manually).
This commit is contained in:
Sara Arjona 2019-07-15 13:48:53 +02:00
parent f7e108438f
commit 3e8f9b2869
3 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,8 @@
}}
<div class="float-right card p-2">
<form class="user-competency-course-navigation">
<input type="hidden" name="courseid" value="{{courseid}}"/>
<input type="hidden" name="mod" value="{{moduleid}}"/>
{{#hasmodules}}
<span>
<label for="module-nav-{{uniqid}}" class="accesshide">{{#str}}filterbyactivity, tool_lp{{/str}}</label>

View File

@ -38,6 +38,9 @@
<div class="float-sm-right card card-block p-x-1 p-b-1">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="userid" value="{{userid}}"/>
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
<input type="hidden" name="courseid" value="{{courseid}}"/>
{{#hasusers}}
<span>
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>

View File

@ -25,6 +25,9 @@
<div class="float-right card p-x-1 p-b-1">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="user" value="{{userid}}"/>
<input type="hidden" name="id" value="{{courseid}}"/>
<input type="hidden" name="mod" value="{{moduleid}}"/>
{{#hasusers}}
<span>
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>