Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
68cc9068
Commit
68cc9068
authored
Jun 30, 2022
by
Andrew Nicols
Browse files
Merge branch 'MDL-74744-master' of
https://github.com/andelacruz/moodle
parents
eb7131f0
8db6d451
Changes
4
Hide whitespace changes
Inline
Side-by-side
admin/tool/behat/tests/behat/manipulate_forms.feature
View file @
68cc9068
...
...
@@ -20,9 +20,10 @@ Feature: Forms manipulation
Given the following "courses" exist
:
|
fullname
|
shortname
|
category
|
|
Course
1
|
C1
|
0
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
And
I add a
"Quiz"
to section
"1"
And the following "activities" exist
:
|
activity
|
course
|
section
|
name
|
|
quiz
|
C1
|
1
|
Quiz
1
|
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
When
I expand all fieldsets
Then
I should see
"Close the quiz"
And
I should see
"Group mode"
...
...
admin/tool/recyclebin/tests/behat/backup_user_data.feature
View file @
68cc9068
...
...
@@ -19,14 +19,13 @@ Feature: Backup user data
And the following config values are set as admin
:
|
coursebinenable
|
1
|
tool_recyclebin
|
|
autohide
|
0
|
tool_recyclebin
|
And the following "activities" exist
:
|
activity
|
course
|
section
|
name
|
intro
|
|
quiz
|
C1
|
1
|
Quiz
1
|
Test
quiz
description
|
@javascript
Scenario
:
Delete and restore a quiz with user data
Given
I log in as
"teacher1"
And
I am on
"Course 1"
course homepage with editing mode on
And I add a "Quiz" to section "1" and I fill the form with
:
|
Name
|
Quiz
1
|
|
Description
|
Test
quiz
description
|
Given
I am on the
"Quiz 1"
"quiz activity"
page logged in as teacher1
And I add a "True/False" question to the "Quiz 1" quiz with
:
|
Question
name
|
TF1
|
|
Question
text
|
First
question
|
...
...
@@ -41,6 +40,8 @@ Feature: Backup user data
|
Correct
answer
|
False
|
|
Feedback
for
the
response
'True'.
|
So
you
think
it
is
true
|
|
Feedback
for
the
response
'False'.
|
So
you
think
it
is
false
|
And
I set the field
"maxgrade"
to
"10.0"
And
I press
"savechanges"
And
I log out
When
I am on the
"Quiz 1"
"quiz activity"
page logged in as student1
And
I press
"Attempt quiz"
...
...
mod/quiz/accessrule/seb/tests/behat/edit_form.feature
View file @
68cc9068
...
...
@@ -5,11 +5,12 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "courses" exist
:
|
fullname
|
shortname
|
|
Course
1
|
C1
|
And the following "activities" exist
:
|
activity
|
course
|
section
|
name
|
|
quiz
|
C1
|
1
|
Quiz
1
|
Scenario
:
Quiz setting "Require the use of Safe Exam Browser" has all types, except "Use an existing template".
When
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
And
I add a
"Quiz"
to section
"1"
When
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
the
"Require the use of Safe Exam Browser"
select box should contain
"Yes – Configure manually"
And
the
"Require the use of Safe Exam Browser"
select box should not contain
"Yes – Use an existing template"
...
...
@@ -21,9 +22,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
When
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
the
"Require the use of Safe Exam Browser"
select box should contain
"Yes – Configure manually"
And
the
"Require the use of Safe Exam Browser"
select box should contain
"Yes – Use an existing template"
...
...
@@ -63,9 +62,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
I set the field
"Require the use of Safe Exam Browser"
to
"No"
Then
I should not see
"Upload Safe Exam Browser config file"
...
...
@@ -97,9 +94,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
I set the field
"Require the use of Safe Exam Browser"
to
"Yes – Use SEB client config"
Then
I should see
"Show Safe Exam Browser download button"
...
...
@@ -131,9 +126,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
I set the field
"Require the use of Safe Exam Browser"
to
"Yes – Upload my own config"
Then
I should see
"Upload Safe Exam Browser config file"
...
...
@@ -165,9 +158,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
I set the field
"Require the use of Safe Exam Browser"
to
"Yes – Use an existing template"
Then
I should see
"Safe Exam Browser config template"
...
...
@@ -201,9 +192,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist
:
|
name
|
|
Template
1
|
And
I log in as
"admin"
And
I am on
"Course 1"
course homepage with editing mode on
When
I add a
"Quiz"
to section
"1"
And
I am on the
"Quiz 1"
"quiz activity editing"
page logged in as admin
And
I expand all fieldsets
And
I set the field
"Require the use of Safe Exam Browser"
to
"Yes – Configure manually"
Then
I should see
"Show Safe Exam Browser download button"
...
...
mod/quiz/tests/behat/settings_form_fields_disableif.feature
View file @
68cc9068
...
...
@@ -18,14 +18,14 @@ Feature: Settings form fields disabled if not required
|
teacher
|
C1
|
editingteacher
|
|
student1
|
C1
|
student
|
|
student2
|
C1
|
student
|
And the following "activities" exist
:
|
activity
|
course
|
section
|
name
|
|
quiz
|
C1
|
1
|
Test
quiz
1
|
@javascript
Scenario
:
Depending on the number of attempts, different form fields are disabled.
When
I log in as
"teacher"
And
I am on
"Course 1"
course homepage with editing mode on
And
I add a
"Quiz"
to section
"1"
When
I am on the
"Test quiz 1"
"quiz activity editing"
page logged in as teacher
And
I expand all fieldsets
And
I set the field
"Name"
to
"Test quiz"
And
I set the field
"Attempts allowed"
to
"1"
Then
the
"Grading method"
"field"
should be disabled
And
the
"Each attempt builds on the last"
"field"
should be disabled
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment