[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @mod @mod_forum 2 Feature: Set a certain number of discussions as a completion condition for a forum 3 In order to ensure students are participating on forums 4 As a teacher 5 I need to set a minimum number of discussions to mark the forum activity as completed 6 7 @javascript 8 Scenario: Set X number of discussions as a condition 9 Given the following "users" exist: 10 | username | firstname | lastname | email | 11 | student1 | Student | 1 | [email protected] | 12 | teacher1 | Teacher | 1 | [email protected] | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 And I log in as "admin" 21 And I set the following administration settings values: 22 | Enable completion tracking | 1 | 23 | Enable conditional access | 1 | 24 And I log out 25 And I log in as "teacher1" 26 And I follow "Course 1" 27 And I turn editing mode on 28 And I click on "Edit settings" "link" in the "Administration" "block" 29 And I set the following fields to these values: 30 | Enable completion tracking | Yes | 31 And I press "Save changes" 32 When I add a "Forum" to section "1" and I fill the form with: 33 | Forum name | Test forum name | 34 | Description | Test forum description | 35 | Completion tracking | Show activity as complete when conditions are met | 36 | completiondiscussionsenabled | 1 | 37 | completiondiscussions | 2 | 38 And I log out 39 And I log in as "student1" 40 And I follow "Course 1" 41 Then I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_forum ')]/descendant::img[@alt='Not completed: Test forum name']" "xpath_element" 42 And I add a new discussion to "Test forum name" forum with: 43 | Subject | Post 1 subject | 44 | Message | Body 1 content | 45 And I add a new discussion to "Test forum name" forum with: 46 | Subject | Post 2 subject | 47 | Message | Body 2 content | 48 And I follow "Course 1" 49 And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_forum ')]/descendant::img[contains(@alt, 'Completed: Test forum name')]" "xpath_element" 50 And I log out 51 And I log in as "teacher1" 52 And I follow "Course 1" 53 And "Student 1" user has completed "Test forum name" activity
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |