mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-40493 question: set real $USER before testing question walktrough
This commit is contained in:
parent
ed661154de
commit
c969753885
2 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,8 @@ require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php');
|
|||
class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthrough_test_base {
|
||||
public function test_manual_graded_essay() {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Create an essay question.
|
||||
$essay = test_question_maker::make_an_essay_question();
|
||||
$this->start_attempt_at_question($essay, 'deferredfeedback', 10);
|
||||
|
@ -108,6 +110,8 @@ class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthroug
|
|||
|
||||
public function test_manual_graded_essay_not_answered() {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Create an essay question.
|
||||
$essay = test_question_maker::make_an_essay_question();
|
||||
$this->start_attempt_at_question($essay, 'deferredfeedback', 10);
|
||||
|
@ -268,6 +272,8 @@ class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthroug
|
|||
|
||||
public function test_manual_graded_essay_can_grade_0() {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Create an essay question.
|
||||
$essay = test_question_maker::make_an_essay_question();
|
||||
$this->start_attempt_at_question($essay, 'deferredfeedback', 10);
|
||||
|
|
|
@ -74,6 +74,8 @@ class qtype_essay_walkthrough_testcase extends qbehaviour_walkthrough_test_base
|
|||
|
||||
public function test_deferred_feedback_html_editor() {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Create an essay question.
|
||||
$q = test_question_maker::make_question('essay', 'editor');
|
||||
$this->start_attempt_at_question($q, 'deferredfeedback', 1);
|
||||
|
@ -178,6 +180,8 @@ class qtype_essay_walkthrough_testcase extends qbehaviour_walkthrough_test_base
|
|||
|
||||
public function test_responsetemplate() {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Create an essay question.
|
||||
$q = test_question_maker::make_question('essay', 'responsetemplate');
|
||||
$this->start_attempt_at_question($q, 'deferredfeedback', 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue