Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_completionstatus @block_selfcompletion
2
Feature: Enable Block Completion in a course using manual self completion
3
  In order to view the completion block in a course
4
  As a teacher
5
  I can add completion block to a course and set up manual self completion
6
 
7
  Scenario: Add the block to a the course and manually complete the course
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
      | student1 | Student | 1 | student1@example.com | S1 |
12
    And the following "courses" exist:
13
      | fullname | shortname | category | enablecompletion |
14
      | Course 1 | C1        | 0        | 1                |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And I enable "selfcompletion" "block" plugin
20
    And the following "blocks" exist:
21
      | blockname        | contextlevel | reference | pagetypepattern | defaultregion |
22
      | completionstatus | Course       | C1        | course-view-*   | side-pre      |
23
      | selfcompletion   | Course       | C1        | course-view-*   | side-pre      |
24
    And I am on the "Course 1" course page logged in as teacher1
25
    And I navigate to "Course completion" in current page administration
26
    And I expand all fieldsets
27
    And I set the following fields to these values:
28
      | id_criteria_self | 1 |
29
    And I press "Save changes"
30
    When I am on the "Course 1" course page logged in as student1
31
    And I should see "Status: Not yet started" in the "Course completion status" "block"
32
    And I should see "No" in the "Self completion" "table_row"
33
    And I follow "Complete course"
34
    And I should see "Confirm self completion"
35
    And I press "Yes"
36
    And I should see "Status: In progress" in the "Course completion status" "block"
37
    # Running completion task just after clicking sometimes fail, as record
38
    # should be created before the task runs.
39
    And I wait "1" seconds
40
    And I run the scheduled task "core\task\completion_regular_task"
41
    And I am on "Course 1" course homepage
42
    Then I should see "Status: Complete" in the "Course completion status" "block"
43
    And I should see "Yes" in the "Self completion" "table_row"
44
    And I follow "More details"
45
    And I should see "Yes" in the "Self completion" "table_row"