Skip to content

Commit 4afc6a5

Browse files
committed
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).
1 parent 39ef515 commit 4afc6a5

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

admin/tool/lp/templates/module_navigation.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
}}
3131
<div class="float-right card p-2">
3232
<form class="user-competency-course-navigation">
33+
<input type="hidden" name="courseid" value="{{courseid}}"/>
34+
<input type="hidden" name="mod" value="{{moduleid}}"/>
3335
{{#hasmodules}}
3436
<span>
3537
<label for="module-nav-{{uniqid}}" class="accesshide">{{#str}}filterbyactivity, tool_lp{{/str}}</label>

admin/tool/lp/templates/user_competency_course_navigation.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
<div class="float-sm-right card card-block p-x-1 p-b-1">
3939
<p>{{{groupselector}}}</p>
4040
<form class="user-competency-course-navigation">
41+
<input type="hidden" name="userid" value="{{userid}}"/>
42+
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
43+
<input type="hidden" name="courseid" value="{{courseid}}"/>
4144
{{#hasusers}}
4245
<span>
4346
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>

report/competency/templates/user_course_navigation.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<div class="float-right card p-x-1 p-b-1">
2626
<p>{{{groupselector}}}</p>
2727
<form class="user-competency-course-navigation">
28+
<input type="hidden" name="user" value="{{userid}}"/>
29+
<input type="hidden" name="id" value="{{courseid}}"/>
30+
<input type="hidden" name="mod" value="{{moduleid}}"/>
2831
{{#hasusers}}
2932
<span>
3033
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>

0 commit comments

Comments
 (0)