AutorÃa | Ultima modificación | Ver Log |
@qtype @qtype_calculatedmultiFeature: Test creating a Calculated multichoice questionAs a teacherIn order to test my studentsI need to be able to create Calculated multichoice questionsBackground:Given the following "users" exist:| username || teacher |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher | C1 | editingteacher |And the following "question categories" exist:| contextlevel | reference | name || Course | C1 | Test questions |Scenario: Create a Calculated questionWhen I am on the "Course 1" "core_question > course question bank" page logged in as teacherAnd I press "Create a new question ..."And I set the field "Calculated multichoice" to "1"And I press "Add"And I set the following fields to these values:| Question name | calculatedmulti-001 || Question text | What is the sum of those two numbers: {a} and {b} || Choice 1 | {a}+{b} || Grade | 100% || Choice 2 | {a}*{b} || Choice 3 | {a}-{b} |And I press "id_submitbutton"And I should see "Choose wildcards dataset properties"And I press "id_submitbutton"And I should see "Edit the wildcards datasets"And I press "id_addbutton"And I set the following fields to these values:| id_number_2 | 3.0 || id_number_1 | 4.0 |And I press "id_savechanges"# Checking that the wildcard values are thereAnd I am on the "calculatedmulti-001" "core_question > edit" page logged in as teacherAnd I press "id_submitbutton"And I should see "Choose wildcards dataset properties"And I press "id_submitbutton"Then I should see "3+4"