[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/lesson/tests/behat/ -> lesson_informations_at_end.feature (source)

   1  @mod @mod_lesson
   2  Feature: In a lesson activity, if custom scoring is not enabled, student should see
   3    some informations at the end of lesson: questions answered, correct answers, grade, score
   4  
   5    @javascript
   6    Scenario: Informations at end of lesson if custom scoring not enabled
   7      Given the following "users" exist:
   8        | username | firstname | lastname | email |
   9        | teacher1 | Teacher | 1 | [email protected] |
  10        | student1 | Student | 1 | [email protected] |
  11      And the following "courses" exist:
  12        | fullname | shortname | category |
  13        | Course 1 | C1 | 0 |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17        | student1 | C1 | student |
  18      And I log in as "teacher1"
  19      And I follow "Course 1"
  20      And I turn editing mode on
  21      And I add a "Lesson" to section "1" and I fill the form with:
  22        | Name | Test lesson name |
  23        | Description | Test lesson description |
  24        | Custom scoring | No |
  25      And I follow "Test lesson name"
  26      And I follow "Add a content page"
  27      And I set the following fields to these values:
  28        | Page title | First page name |
  29        | Page contents | First page contents |
  30        | id_answer_editor_0 | Next page |
  31        | id_jumpto_0 | Next page |
  32      And I press "Save page"
  33      And I set the field "qtype" to "Question"
  34      And I set the field "Select a question type" to "Numerical"
  35      And I press "Add a question page"
  36      And I set the following fields to these values:
  37        | Page title | Hardest question ever |
  38        | Page contents | 1 + 1? |
  39        | id_answer_editor_0 | 2 |
  40        | id_response_editor_0 | Correct answer |
  41        | id_jumpto_0 | Next page |
  42        | id_answer_editor_1 | 1 |
  43        | id_response_editor_1 | Incorrect answer |
  44        | id_jumpto_1 | This page |
  45      And I press "Save page"
  46      And I log out
  47      And I log in as "student1"
  48      And I follow "Course 1"
  49      When I follow "Test lesson name"
  50      Then I should see "First page contents"
  51      And I press "Next page"
  52      And I should see "1 + 1?"
  53      And I set the following fields to these values:
  54        | Your answer | 1 |
  55      And I press "Submit"
  56      And I should see "Incorrect answer"
  57      And I press "Continue"
  58      And I should see "Congratulations - end of lesson reached"
  59      And I should see "Number of questions answered: 1"
  60      And I should see "Number of correct answers: 0"
  61      And I should see "Your score is 0 (out of 1)."
  62      And I should see "Your current grade is 0.0 out of 100"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1