| [ Index ] |
PHP Cross Reference of Moodle 310 |
[Summary view] [Print] [Text view]
1 @core @core_question @javascript @_switch_window 2 Feature: A teacher can preview questions in the question bank 3 In order to ensure the questions are properly created 4 As a teacher 5 I need to preview the questions 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 And the following "courses" exist: 12 | fullname | shortname | format | 13 | Course 1 | C1 | weeks | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 And the following "question categories" exist: 18 | contextlevel | reference | name | 19 | Course | C1 | Test questions | 20 And the following "questions" exist: 21 | questioncategory | qtype | name | 22 | Test questions | numerical | Test question to be previewed | 23 And I log in as "teacher1" 24 And I am on "Course 1" course homepage 25 And I navigate to "Question bank > Questions" in current page administration 26 When I choose "Preview" action for "Test question to be previewed" in the question bank 27 And I switch to "questionpreview" window 28 29 Scenario: Question preview shows the question and other information 30 Then the state of "What is pi to two d.p.?" question is shown as "Not yet answered" 31 And I should see "Marked out of 1.00" 32 And I should see "Technical information" 33 And I should see "Attempt options" 34 And I should see "Display options" 35 36 Scenario: Preview lets the teacher see what happens when an answer is saved 37 When I set the field "Answer:" to "1" 38 And I press "Save" 39 Then the state of "What is pi to two d.p.?" question is shown as "Answer saved" 40 41 Scenario: Preview lets the teacher see what happens when an answer is submitted 42 When I set the field "Answer:" to "3.14" 43 And I press "Submit and finish" 44 Then the state of "What is pi to two d.p.?" question is shown as "Correct" 45 46 Scenario: Preview lets the teacher see what happens with different review options 47 Given I set the field "Answer:" to "3.14" 48 And I press "Submit and finish" 49 When I set the field "Whether correct" to "Not shown" 50 And I set the field "Decimal places in grades" to "5" 51 And I press "Update display options" 52 Then the state of "What is pi to two d.p.?" question is shown as "Complete" 53 And I should see "1.00000" 54 55 Scenario: Preview lets the teacher see what happens with different behaviours 56 When I set the field "How questions behave" to "Immediate feedback" 57 And I set the field "Marked out of" to "3" 58 And I press "Start again with these options" 59 And I set the field "Answer:" to "3.1" 60 And I press "Check" 61 Then the state of "What is pi to two d.p.?" question is shown as "Incorrect" 62 And I should see "Mark 0.00 out of 3.00" 63 And I should see "Not accurate enough." 64 65 Scenario: Preview lets the teacher "Start again" while previewing 66 Given I set the field "Answer:" to "1" 67 And I press "Submit and finish" 68 When I press "Start again" 69 Then the state of "What is pi to two d.p.?" question is shown as "Not yet answered" 70 71 Scenario: Preview lets the teacher "Fill in correct response" while previewing 72 When I press "Fill in correct responses" 73 Then the field "Answer:" matches value "3.14" 74 75 Scenario: Preview has an option to export the individual quesiton. 76 Then following "Download this question in Moodle XML format" should download between "1000" and "2500" bytes 77 78 Scenario: Preview a question with very small grade 79 When I set the field "Marked out of" to "0.00000123456789" 80 And I press "Start again with these options" 81 Then the field "Marked out of" matches value "0.00000123456789"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 22 11:59:49 2025 | Cross-referenced by PHPXref 0.7.1 |