MDL-47494 ddwtos: Fix incorrect preg_quote usage.

This commit is contained in:
Tim Hunt
2013-01-15 14:49:52 +00:00
parent 664a362d0c
commit d5515e1df3
@@ -120,7 +120,7 @@ class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
$this->get_contains_try_again_button_expectation(true),
$this->get_does_not_contain_correctness_expectation(),
new question_pattern_expectation('/' .
preg_quote(get_string('notcomplete', 'qbehaviour_interactive')) . '/'),
preg_quote(get_string('notcomplete', 'qbehaviour_interactive'), '/') . '/'),
$this->get_contains_hint_expectation('This is the first hint'));
// Do try again.
@@ -409,7 +409,7 @@ class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
$this->get_contains_try_again_button_expectation(true),
$this->get_does_not_contain_correctness_expectation(),
new question_pattern_expectation('/' .
preg_quote(get_string('notcomplete', 'qbehaviour_interactive')) . '/'),
preg_quote(get_string('notcomplete', 'qbehaviour_interactive'), '/') . '/'),
$this->get_contains_hint_expectation('This is the first hint'),
$this->get_contains_num_parts_correct(2),
$this->get_contains_standard_partiallycorrect_combined_feedback_expectation(),
@@ -463,7 +463,7 @@ class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
$this->get_contains_try_again_button_expectation(true),
$this->get_does_not_contain_correctness_expectation(),
new question_pattern_expectation('/' .
preg_quote(get_string('notcomplete', 'qbehaviour_interactive')) . '/'),
preg_quote(get_string('notcomplete', 'qbehaviour_interactive'), '/') . '/'),
$this->get_contains_hint_expectation('This is the second hint'),
$this->get_contains_num_parts_correct(2),
$this->get_contains_standard_partiallycorrect_combined_feedback_expectation(),
@@ -757,6 +757,6 @@ class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
$this->get_contains_drop_box_expectation('3', 3, true, 'correct'),
$this->get_contains_correct_expectation(),
new question_pattern_expectation('/' .
preg_quote('The [quick] brown [fox] jumped over the [lazy] dog.') . '/'));
preg_quote('The [quick] brown [fox] jumped over the [lazy] dog.', '/') . '/'));
}
}