Skip to content

Commit

Permalink
MDL-69551 quiz: start quiz password field should be a passwordunmask
Browse files Browse the repository at this point in the history
This help accessibility and usability
  • Loading branch information
timhunt committed Apr 4, 2023
1 parent fba0658 commit 6f9f573
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/password/rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function add_preflight_check_form_fields(preflight_check_form $quizform,

// Don't use the 'proper' field name of 'password' since that get's
// Firefox's password auto-complete over-excited.
$mform->addElement('password', 'quizpassword',
$mform->addElement('passwordunmask', 'quizpassword',
get_string('quizpassword', 'quizaccess_password'), ['autofocus' => 'true']);
}

Expand Down
4 changes: 0 additions & 4 deletions mod/quiz/tests/behat/attempt_begin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ Feature: The various checks that may happen when an attept is started
And I should see "Your attempt will have a time limit of 1 hour. When you "
And I should see "The password entered was incorrect"
And I set the field "Quiz password" to "Frog"
# On Mac/FF tab key is needed as text field in dialogue and page have same id.
And I press tab key in "Quiz password" "field"
And I press "Start attempt"
And I should see "Text of the first question"

Expand All @@ -102,8 +100,6 @@ Feature: The various checks that may happen when an attept is started
And I should see "Your attempt will have a time limit of 1 hour. When you "
And I should see "The password entered was incorrect"
And I set the field "Quiz password" to "Frog"
# On Mac/FF tab key is needed as text field in dialogue and page have same id.
And I press tab key in "Quiz password" "field"
And I press "Cancel"
Then I should see "Quiz 1 description"
And "Attempt quiz" "button" should be visible

0 comments on commit 6f9f573

Please sign in to comment.