AutorÃa | Ultima modificación | Ver Log |
@core @core_courseFeature: Managers can create coursesIn order to group users and contentsAs a managerI need to create courses and set default values on them@javascriptScenario: Courses are created with the default announcements forumGiven the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And I log in as "admin"And I create a course with:| Course full name | Course 1 || Course short name | C1 |And I enrol "Teacher 1" user as "Teacher"And I enrol "Student 1" user as "Student"And I log outWhen I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I add the "Latest announcements" blockAnd I am on the Announcements "forum activity" pageAnd "Add discussion topic" "link" should existAnd I navigate to "Subscriptions" in current page administrationAnd I should see "Forced subscription"And I log outAnd I am on the Announcements "forum activity" page logged in as student1And "Add a new topic" "link" should not existScenario: Create a course from the management interface and return to itGiven the following "courses" exist:| fullname | shortname | idnumber | startdate | enddate || Course 1 | Course 1 | C1 | 957139200 | 960163200 |And I log in as "admin"And I go to the courses management pageAnd I should see the "Categories" management pageAnd I click on category "Category 1" in the management interfaceAnd I should see the "Course categories and courses" management pageAnd I click on "Create new course" "link" in the "#course-listing" "css_element"When I set the following fields to these values:| Course full name | Course 2 || Course short name | Course 2 || Course summary | Course 2 summary || id_startdate_day | 24 || id_startdate_month | October || id_startdate_year | 2015 || id_enddate_day | 24 || id_enddate_month | October || id_enddate_year | 2016 |And I press "Save and return"Then I should see the "Course categories and courses" management pageAnd I click on "Sort by Course time created ascending" "link" in the ".course-listing-actions" "css_element"And I should see course listing "Course 1" before "Course 2"And I click on "Course 2" "link" in the "region-main" "region"And I click on "Edit" "link" in the ".course-detail" "css_element"And the following fields match these values:| Course full name | Course 2 || Course short name | Course 2 || Course summary | Course 2 summary || id_startdate_day | 24 || id_startdate_month | October || id_startdate_year | 2015 || id_enddate_day | 24 || id_enddate_month | October || id_enddate_year | 2016 |Scenario: Create a course as a custom course creatorGiven the following "users" exist:| username | firstname | lastname | email || kevin | Kevin | the | kevin@example.com |And the following "roles" exist:| shortname | name | archetype || creator | Creator | |And the following "system role assigns" exist:| user | role | contextlevel || kevin | creator | System |And the following "role capability" exists:| role | creator || moodle/course:create | allow || moodle/course:manageactivities | allow || moodle/course:viewparticipants | allow |And I log in as "kevin"And I am on site homepageWhen I press "Add a new course"And I set the following fields to these values:| Course full name | My first course || Course short name | myfirstcourse |And I press "Save and display"And I follow "Participants"Then I should see "My first course"And I should see "Participants"Scenario: Creators' role in new courses setting behaviorGiven the following "users" exist:| username | firstname | lastname | email || kevin | Kevin | the | kevin@example.com |And the following "system role assigns" exist:| user | role | contextlevel || kevin | coursecreator | System |And I log in as "admin"And I set the following administration settings values:| Creators' role in new courses | Non-editing teacher |And I log outAnd I log in as "kevin"And I am on site homepageWhen I press "Add a new course"And I set the following fields to these values:| Course full name | My first course || Course short name | myfirstcourse |And I press "Save and display"And I click on "Participants" "link"Then I should see "Non-editing teacher" in the "Kevin the" "table_row"@javascriptScenario: Create a course as adminGiven I log in as "admin"And the following config values are set as admin:| enroladminnewcourse | 0 |And I navigate to "Courses > Add a new course" in site administrationAnd I set the following fields to these values:| Course full name | My first course || Course short name | myfirstcourse |And I press "Save and display"And I navigate to course participantsThen I should not see "Teacher"And I should see "Nothing to display"And the following config values are set as admin:| enroladminnewcourse | 1 |And I navigate to "Courses > Add a new course" in site administrationAnd I set the following fields to these values:| Course full name | My second course || Course short name | mysecondcourse |And I press "Save and display"And I navigate to course participantsAnd I should see "Teacher"And I should not see "Nothing to display"