MDL-67151 core_question: Support scientific format at question preview
This commit is contained in:
+1
-1
@@ -806,7 +806,7 @@ function question_preview_url($questionid, $preferredbehaviour = null,
|
||||
}
|
||||
|
||||
if (!is_null($maxmark)) {
|
||||
$params['maxmark'] = format_float($maxmark, strlen($maxmark), true, true);
|
||||
$params['maxmark'] = format_float($maxmark, -1);
|
||||
}
|
||||
|
||||
if (!is_null($displayoptions)) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@core @core_question
|
||||
@core @core_question @javascript @_switch_window
|
||||
Feature: A teacher can preview questions in the question bank
|
||||
In order to ensure the questions are properly created
|
||||
As a teacher
|
||||
@@ -26,7 +26,6 @@ Feature: A teacher can preview questions in the question bank
|
||||
When I choose "Preview" action for "Test question to be previewed" in the question bank
|
||||
And I switch to "questionpreview" window
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Question preview shows the question and other information
|
||||
Then the state of "What is pi to two d.p.?" question is shown as "Not yet answered"
|
||||
And I should see "Marked out of 1.00"
|
||||
@@ -34,19 +33,16 @@ Feature: A teacher can preview questions in the question bank
|
||||
And I should see "Attempt options"
|
||||
And I should see "Display options"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher see what happens when an answer is saved
|
||||
When I set the field "Answer:" to "1"
|
||||
And I press "Save"
|
||||
Then the state of "What is pi to two d.p.?" question is shown as "Answer saved"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher see what happens when an answer is submitted
|
||||
When I set the field "Answer:" to "3.14"
|
||||
And I press "Submit and finish"
|
||||
Then the state of "What is pi to two d.p.?" question is shown as "Correct"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher see what happens with different review options
|
||||
Given I set the field "Answer:" to "3.14"
|
||||
And I press "Submit and finish"
|
||||
@@ -56,7 +52,6 @@ Feature: A teacher can preview questions in the question bank
|
||||
Then the state of "What is pi to two d.p.?" question is shown as "Complete"
|
||||
And I should see "1.00000"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher see what happens with different behaviours
|
||||
When I set the field "How questions behave" to "Immediate feedback"
|
||||
And I set the field "Marked out of" to "3"
|
||||
@@ -67,18 +62,20 @@ Feature: A teacher can preview questions in the question bank
|
||||
And I should see "Mark 0.00 out of 3.00"
|
||||
And I should see "Not accurate enough."
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher "Start again" while previewing
|
||||
Given I set the field "Answer:" to "1"
|
||||
And I press "Submit and finish"
|
||||
When I press "Start again"
|
||||
Then the state of "What is pi to two d.p.?" question is shown as "Not yet answered"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview lets the teacher "Fill in correct response" while previewing
|
||||
When I press "Fill in correct responses"
|
||||
Then the field "Answer:" matches value "3.14"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Preview has an option to export the individual quesiton.
|
||||
Then following "Download this question in Moodle XML format" should download between "1000" and "2500" bytes
|
||||
|
||||
Scenario: Preview a question with very small grade
|
||||
When I set the field "Marked out of" to "0.00000123456789"
|
||||
And I press "Start again with these options"
|
||||
Then the field "Marked out of" matches value "0.00000123456789"
|
||||
|
||||
Reference in New Issue
Block a user