Merge branch 'MDL-71162-311-2' of git://github.com/mickhawkins/moodle into MOODLE_311_STABLE
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
@mod @mod_assign @core_completion
|
||||
Feature: View activity completion information in the Assign resource
|
||||
In order to have visibility of assign completion requirements
|
||||
Feature: View activity completion in the assignment activity
|
||||
In order to have visibility of assignment completion requirements
|
||||
As a student
|
||||
I need to be able to view my assign completion progress
|
||||
I need to be able to view my assignment completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
@@ -17,47 +17,129 @@ Feature: View activity completion information in the Assign resource
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show completion conditions is set to Yes
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | History of ants |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
And the following "activity" exists:
|
||||
| activity | assign |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 1 |
|
||||
| grade[modgrade_type] | point |
|
||||
| grade[modgrade_point] | 100 |
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show completion conditions is set to Yes
|
||||
Given I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And the manual completion button for "History of ants" should exist
|
||||
And the manual completion button for "History of ants" should be disabled
|
||||
And the manual completion button for "Music history" should exist
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the manual completion button for "History of ants" should exist
|
||||
And the manual completion button of "History of ants" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "History of ants"
|
||||
And the manual completion button of "History of ants" is displayed as "Done"
|
||||
Then the manual completion button for "Music history" should exist
|
||||
And the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will not be shown on the course page if the Show completion conditions is set to No
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | No |
|
||||
And I set the field "Show completion conditions" to "No"
|
||||
And I press "Save and display"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | History of ants |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
# Teacher view.
|
||||
And the manual completion button for "History of ants" should not exist
|
||||
And the manual completion button for "Music history" should not exist
|
||||
And I follow "Music history"
|
||||
And the manual completion button for "Music history" should exist
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the manual completion button for "History of ants" should not exist
|
||||
Then the manual completion button for "Music history" should not exist
|
||||
And I follow "Music history"
|
||||
And the manual completion button for "Music history" should exist
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion from the activity page
|
||||
Given I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| completionusegrade | 1 |
|
||||
| completionsubmit | 1 |
|
||||
And I press "Save and display"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make a submission" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
|
||||
@javascript
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| assignsubmission_onlinetext_enabled | 1 |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| completionusegrade | 1 |
|
||||
| completionsubmit | 1 |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make a submission" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I press "Add submission"
|
||||
And I set the field "Online text" to "History of playing with drumsticks reversed"
|
||||
And I press "Save changes"
|
||||
And I press "Submit assignment"
|
||||
And I press "Continue"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Vinnie Student1" "table_row"
|
||||
And I set the field "Grade out of 100" to "33"
|
||||
And I set the field "Notify students" to "0"
|
||||
And I press "Save changes"
|
||||
And I follow "View all submissions"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make a submission" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
@mod @mod_book @core_completion
|
||||
Feature: View activity completion information in the book activity
|
||||
In order to have visibility of book completion requirements
|
||||
As a student
|
||||
I need to be able to view my book completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | book |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I set the following fields to these values:
|
||||
| Chapter title | Drum theory |
|
||||
| Content | Rudiments are important |
|
||||
And I press "Save changes"
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
And I set the following fields to these values:
|
||||
| Chapter title | Drum theory |
|
||||
| Content | Rudiments are important |
|
||||
And I press "Save changes"
|
||||
And I follow "Music history"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,70 @@
|
||||
@mod @mod_chat @core_completion
|
||||
Feature: View activity completion information in the chat activity
|
||||
In order to have visibility of chat completion requirements
|
||||
As a student
|
||||
I need to be able to view my chat completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
And the following "activity" exists:
|
||||
| activity | chat |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And the following "activity" exists:
|
||||
| activity | chat |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -32,19 +32,19 @@ Feature: Automatic completion in the choice activity
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
Then I should see "Done: View" in the "[data-region=completionrequirements]" "css_element"
|
||||
And I should see "To do: Make a choice" in the "[data-region=completionrequirements]" "css_element"
|
||||
Then the "View" completion condition of "What to drink?" is displayed as "done"
|
||||
And the "Make a choice" completion condition of "What to drink?" is displayed as "todo"
|
||||
And I set the field "Beer" to "1"
|
||||
And I press "Save my choice"
|
||||
And I should see "Done: View" in the "[data-region=completionrequirements]" "css_element"
|
||||
And I should see "Done: Make a choice" in the "[data-region=completionrequirements]" "css_element"
|
||||
And the "View" completion condition of "What to drink?" is displayed as "done"
|
||||
And the "Make a choice" completion condition of "What to drink?" is displayed as "done"
|
||||
|
||||
Scenario: Viewing a choice activity with automatic completion as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
And I should see "View" in the "[data-region=completionrequirements]" "css_element"
|
||||
And I should see "Make a choice" in the "[data-region=completionrequirements]" "css_element"
|
||||
Then "What to drink?" should have the "View" completion condition
|
||||
And "What to drink?" should have the "Make a choice" completion condition
|
||||
|
||||
@javascript
|
||||
Scenario: Overriding automatic choice completion for a user
|
||||
@@ -57,5 +57,5 @@ Feature: Automatic completion in the choice activity
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
Then "span[aria-label=\"Done: View (set by Teacher 1)\"]" "css_element" should exist
|
||||
And "span[aria-label=\"Done: Make a choice (set by Teacher 1)\"]" "css_element" should exist
|
||||
Then the "View" completion condition of "What to drink?" overridden by "Teacher 1" is displayed as "done"
|
||||
And the "Make a choice" completion condition of "What to drink?" overridden by "Teacher 1" is displayed as "done"
|
||||
|
||||
@@ -31,31 +31,28 @@ Feature: Manual completion in the choice activity
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "What to drink?"
|
||||
And "Mark as done" "button" should exist
|
||||
When I press "Mark as done"
|
||||
And I wait until the page is ready
|
||||
Then "Done" "button" should exist
|
||||
And the manual completion button of "What to drink?" is displayed as "Mark as done"
|
||||
When I toggle the manual completion state of "What to drink?"
|
||||
Then the manual completion button of "What to drink?" is displayed as "Done"
|
||||
But "Mark as done" "button" should not exist
|
||||
# Just make sure that the change persisted.
|
||||
And I reload the page
|
||||
And I wait until the page is ready
|
||||
And I should not see "Mark as done"
|
||||
And I should see "Done"
|
||||
And I press "Done"
|
||||
And I wait until the page is ready
|
||||
And "Mark as done" "button" should exist
|
||||
And the manual completion button of "What to drink?" is displayed as "Done"
|
||||
And I toggle the manual completion state of "What to drink?"
|
||||
And the manual completion button of "What to drink?" is displayed as "Mark as done"
|
||||
But "Done" "button" should not exist
|
||||
# Just make sure that the change persisted.
|
||||
And I reload the page
|
||||
And I wait until the page is ready
|
||||
And "Mark as done" "button" should exist
|
||||
And the manual completion button of "What to drink?" is displayed as "Mark as done"
|
||||
But "Done" "button" should not exist
|
||||
|
||||
Scenario: Viewing a choice activity with manual completion as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
Then the "Mark as done" "button" should be disabled
|
||||
Then the manual completion button for "What to drink?" should be disabled
|
||||
|
||||
@javascript
|
||||
Scenario: Overriding a manual choice completion for a user to done
|
||||
@@ -68,10 +65,9 @@ Feature: Manual completion in the choice activity
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
Then "button[aria-label=\"What to drink? is marked by Teacher 1 as done. Press to undo.\"]" "css_element" should exist
|
||||
And I press "Done"
|
||||
And I wait until the page is ready
|
||||
And "button[aria-label=\"Mark What to drink? as done\"]" "css_element" should exist
|
||||
Then the manual completion button of "What to drink?" overridden by "Teacher 1" is displayed as "Done"
|
||||
And I toggle the manual completion state of "What to drink?"
|
||||
And the manual completion button of "What to drink?" is displayed as "Mark as done"
|
||||
|
||||
@javascript
|
||||
Scenario: Overriding a manual choice completion for a user to not done
|
||||
@@ -90,7 +86,6 @@ Feature: Manual completion in the choice activity
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "What to drink?"
|
||||
Then "button[aria-label=\"What to drink? is marked by Teacher 1 as not done. Press to mark as done.\"]" "css_element" should exist
|
||||
And I press "Mark as done"
|
||||
And I wait until the page is ready
|
||||
And "button[aria-label=\"What to drink? is marked as done. Press to undo.\"]" "css_element" should exist
|
||||
Then the manual completion button of "What to drink?" overridden by "Teacher 1" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "What to drink?"
|
||||
And the manual completion button of "What to drink?" is displayed as "Done"
|
||||
|
||||
@@ -232,6 +232,13 @@ if ($datarecord = data_submitted() and confirm_sesskey()) {
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name), 2);
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
|
||||
groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/data/edit.php?d='.$data->id);
|
||||
|
||||
|
||||
@@ -87,6 +87,13 @@ if($mform->is_cancelled()) {
|
||||
$PAGE->force_settings_menu(true);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name), 2);
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
|
||||
|
||||
$url = new moodle_url('/mod/data/export.php', array('d' => $d));
|
||||
|
||||
+8
-1
@@ -2305,11 +2305,18 @@ function data_delete_site_preset($name) {
|
||||
*/
|
||||
function data_print_header($course, $cm, $data, $currenttab='') {
|
||||
|
||||
global $CFG, $displaynoticegood, $displaynoticebad, $OUTPUT, $PAGE;
|
||||
global $CFG, $displaynoticegood, $displaynoticebad, $OUTPUT, $PAGE, $USER;
|
||||
|
||||
$PAGE->set_title($data->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name), 2);
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
|
||||
|
||||
// Groups needed for Add entry tab
|
||||
|
||||
@@ -102,6 +102,12 @@ if (!$form_export->is_submitted()) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name), 2);
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
// Needed for tabs.php
|
||||
$currenttab = 'presets';
|
||||
$currentgroup = groups_get_activity_group($cm);
|
||||
|
||||
@@ -106,6 +106,13 @@ $PAGE->set_pagelayout('admin');
|
||||
$PAGE->force_settings_menu(true);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name), 2);
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
|
||||
|
||||
/// Groups needed for Add entry tab
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
@mod @mod_data
|
||||
Feature: Set entries required as a completion condition for a data item
|
||||
In order to ensure students make a minimum number of entries
|
||||
As a teacher
|
||||
I need to set entries required to mark the database activity as completed
|
||||
|
||||
Scenario: Two entries required to complete the activity
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | enablecompletion |
|
||||
| Course 1 | C1 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Database" to section "1" and I fill the form with:
|
||||
| Name | Test database name |
|
||||
| Description | Test database description |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| completionview | 0 |
|
||||
| completionentriesenabled | checked |
|
||||
| completionentries | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a "Text input" field to "Test database name" database and I fill the form with:
|
||||
| Field name | Test field name |
|
||||
And I am on "Course 1" course homepage
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add an entry to "Test database name" database with:
|
||||
| Test field name | Student original entry |
|
||||
And I press "Save and view"
|
||||
And I am on "Course 1" course homepage
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
#One entry is not enough to mark as complete
|
||||
And "Student 1" user has not completed "Test database name" activity
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add an entry to "Test database name" database with:
|
||||
| Test field name | Student second entry |
|
||||
And I press "Save and view"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then "Student 1" user has completed "Test database name" activity
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test database name"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I press "Unlock completion"
|
||||
And I set the field "completionentries" to "1"
|
||||
And I press "Save and display"
|
||||
And I am on "Course 1" course homepage
|
||||
Then "Student 1" user has completed "Test database name" activity
|
||||
And I log out
|
||||
@@ -0,0 +1,141 @@
|
||||
@mod @mod_data @core_completion
|
||||
Feature: View activity completion in the database activity
|
||||
In order to have visibility of database completion requirements
|
||||
As a student
|
||||
I need to be able to view my database completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | data |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Aggregate type | Average of ratings |
|
||||
| scale[modgrade_type] | Point |
|
||||
| scale[modgrade_point] | 100 |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| Require grade | 1 |
|
||||
| completionentriesenabled | 1 |
|
||||
| completionentries | 2 |
|
||||
And I press "Save and display"
|
||||
And I add a "Text input" field to "Music history" database and I fill the form with:
|
||||
| Field name | Instrument types |
|
||||
And I follow "Templates"
|
||||
And I press "Save template"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher and confirm all tabs display conditions
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "View single"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Search"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Add entry"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Export"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Templates"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Fields"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I follow "Presets"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 2" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add an entry to "Music history" database with:
|
||||
| Instrument types | Drums |
|
||||
And I press "Save and view"
|
||||
# One entry is not enough to mark as complete.
|
||||
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I follow "View single"
|
||||
And I set the field "rating" to "3"
|
||||
And I press "Rate"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add an entry to "Music history" database with:
|
||||
| Instrument types | Hurdygurdy |
|
||||
And I press "Save and view"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And "Vinnie Student1" user has completed "Music history" activity
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,85 @@
|
||||
@mod @mod_feedback @core_completion
|
||||
Feature: View activity completion in the feedback activity
|
||||
In order to have visibility of feedback completion requirements
|
||||
As a student
|
||||
I need to be able to view my feedback completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | feedback |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
| completionsubmit | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I click on "Edit questions" "link" in the "[role=main]" "css_element"
|
||||
And I add a "Multiple choice" question to the feedback with:
|
||||
| Question | What is your favourite instrument |
|
||||
| Label | instrument1 |
|
||||
| Multiple choice type | Multiple choice - single answer |
|
||||
| Multiple choice values | drums\guitar\hurdygurdy |
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Submit feedback" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Submit feedback" completion condition of "Music history" is displayed as "todo"
|
||||
When I follow "Answer the questions"
|
||||
And I set the field "drums" to "1"
|
||||
And I press "Submit your answers"
|
||||
And I press "Continue"
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Submit feedback" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,71 @@
|
||||
@mod @mod_folder @core_completion
|
||||
Feature: View activity completion information in the folder activity
|
||||
In order to have visibility of folder completion requirements
|
||||
As a student
|
||||
I need to be able to view my folder completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
And the following "activity" exists:
|
||||
| activity | folder |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And the following "activity" exists:
|
||||
| activity | folder |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -1,48 +0,0 @@
|
||||
@mod @mod_forum
|
||||
Feature: Set a certain number of discussions as a completion condition for a forum
|
||||
In order to ensure students are participating on forums
|
||||
As a teacher
|
||||
I need to set a minimum number of discussions to mark the forum activity as completed
|
||||
|
||||
Scenario: Set X number of discussions as a condition
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
When I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum name |
|
||||
| Description | Test forum description |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| completionview | 0 |
|
||||
| completionpostsenabled | 0 |
|
||||
| completiondiscussionsenabled | 1 |
|
||||
| completiondiscussions | 2 |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And the "Start discussions: 2" completion condition of "Test forum name" is displayed as "todo"
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Post 1 subject |
|
||||
| Message | Body 1 content |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Post 2 subject |
|
||||
| Message | Body 2 content |
|
||||
And I am on "Course 1" course homepage
|
||||
Then the "Start discussions: 2" completion condition of "Test forum name" is displayed as "done"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And "Student 1" user has completed "Test forum name" activity
|
||||
@@ -0,0 +1,115 @@
|
||||
@mod @mod_forum @core_completion
|
||||
Feature: View activity completion in the forum activity
|
||||
In order to have visibility of forum completion requirements
|
||||
As a student
|
||||
I need to be able to view my forum completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Whole forum grading > Type | Point |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| Require grade | Whole forum |
|
||||
| completionpostsenabled | 1 |
|
||||
| completionposts | 2 |
|
||||
| completiondiscussionsenabled | 1 |
|
||||
| completiondiscussions | 1 |
|
||||
| completionrepliesenabled | 1 |
|
||||
| completionreplies | 1 |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Start discussions: 1" completion condition
|
||||
And "Music history" should have the "Make forum posts: 2" completion condition
|
||||
And "Music history" should have the "Post replies: 1" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
|
||||
@javascript
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
And I add a new discussion to "Music history" forum with:
|
||||
| Subject | Fun instruments |
|
||||
| Message | I like drums |
|
||||
And I reply "Fun instruments" post from "Music history" forum with:
|
||||
| Subject | Reply 1 to Fun instruments |
|
||||
| Message | Guitar is also Fun |
|
||||
And I log out
|
||||
# Grade the student
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I press "Grade users"
|
||||
And I set the field "grade" to "33"
|
||||
And I press "Save"
|
||||
And I press "Close grader"
|
||||
And I log out
|
||||
# All conditions should now be completed.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
|
||||
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,103 @@
|
||||
@mod @mod_glossary @core_completion
|
||||
Feature: View activity completion in the glossary activity
|
||||
In order to have visibility of glossary completion requirements
|
||||
As a student
|
||||
I need to be able to view my glossary completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | glossary |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Aggregate type | Average of ratings |
|
||||
| scale[modgrade_type] | Point |
|
||||
| scale[modgrade_point] | 100 |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| Require grade | 1 |
|
||||
| completionentriesenabled | 1 |
|
||||
| completionentries | 1 |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Make entries: 1" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I press "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Concept | Blast beats |
|
||||
| Definition | Repeated fast tempo hits combining bass, snare and cymbal |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I set the field "rating" to "3"
|
||||
And I press "Rate"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,75 @@
|
||||
@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe @javascript @core_completion
|
||||
Feature: View activity completion information in the h5p activity
|
||||
In order to have visibility of h5p completion requirements
|
||||
As a student
|
||||
I need to be able to view my h5p completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "H5P" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Music history |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| Require grade | 1 |
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Package file" filemanager
|
||||
And I click on "Save and display" "button"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I switch to "h5p-player" class iframe
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
|
||||
And I reload the page
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
And I follow "Music history"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -0,0 +1,69 @@
|
||||
@mod @mod_imscp @_file_upload @core_completion @javascript
|
||||
Feature: View activity completion information in the IMS content package activity
|
||||
In order to have visibility of IMS content package completion requirements
|
||||
As a student
|
||||
I need to be able to view my IMS content package completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "IMS content package" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Music history |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
|
||||
And I click on "Save and display" "button"
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "IMS content package" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Music history |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
|
||||
And I click on "Save and display" "button"
|
||||
And I follow "Music history"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -24,22 +24,43 @@ Feature: View activity completion information for the label
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | No |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | label |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| section | 1 |
|
||||
| completion | 1 |
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show completion conditions is set to No
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
When I add a "label" to section "1" and I fill the form with:
|
||||
| Label text | Swanky label |
|
||||
| Availability | Show on course page |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
Given I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And the manual completion button for "Swanky label" should exist
|
||||
And the manual completion button for "Swanky label" should be disabled
|
||||
And the manual completion button for "Test label 1" should exist
|
||||
And the manual completion button for "Test label 1" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the manual completion button for "Swanky label" should exist
|
||||
And the manual completion button of "Swanky label" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Swanky label"
|
||||
And the manual completion button of "Swanky label" is displayed as "Done"
|
||||
Then the manual completion button for "Test label 1" should exist
|
||||
And the manual completion button of "Test label 1" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Test label 1"
|
||||
And the manual completion button of "Test label 1" is displayed as "Done"
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show completion conditions is set to Yes
|
||||
Given I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show completion conditions" to "Yes"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Test label 1" should exist
|
||||
And the manual completion button for "Test label 1" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the manual completion button for "Test label 1" should exist
|
||||
And the manual completion button of "Test label 1" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Test label 1"
|
||||
And the manual completion button of "Test label 1" is displayed as "Done"
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
@mod @mod_lesson @core_completion
|
||||
Feature: View activity completion in the lesson activity
|
||||
In order to have visibility of lesson completion requirements
|
||||
As a student
|
||||
I need to be able to view my lesson completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | lesson |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
| completionusegrade | 1 |
|
||||
| completionendreached | 1 |
|
||||
| completiontimespentenabled | 1 |
|
||||
| completiontimespent | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I follow "Add a content page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Music history part 1 |
|
||||
| Description | The history of music part 1 |
|
||||
| Jump | Next page |
|
||||
And I click on "Save page" "button"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "Essay"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Music essay |
|
||||
| Page contents | Write a really interesting music essay |
|
||||
| Jump | End of lesson |
|
||||
| Score | 1 |
|
||||
And I press "Save page"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Spend at least 1 sec on this activity" completion condition
|
||||
And "Music history" should have the "Go through the activity to the end" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I wait "2" seconds
|
||||
And I press "The history of music part 1"
|
||||
And I set the field "Your answer" to "Some drummers play with their sticks flipped around"
|
||||
And I press "Submit"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
|
||||
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "done"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -1,4 +1,4 @@
|
||||
@mod @mod_quiz
|
||||
@mod @mod_quiz @core_completion
|
||||
Feature: Set a quiz to be marked complete when the student uses all attempts allowed
|
||||
In order to ensure a student has learned the material before being marked complete
|
||||
As a teacher
|
||||
@@ -47,8 +47,14 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
|
||||
And I am on "Course 1" course homepage
|
||||
Then the "Receive a grade" completion condition of "Test quiz name" is displayed as "failed"
|
||||
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I follow "Test quiz name"
|
||||
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "failed"
|
||||
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
And "Test quiz name" should have the "Receive a pass grade or complete all available attempts" completion condition
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Reports > Activity completion" in current page administration
|
||||
And "Completed" "icon" should exist in the "Student 1" "table_row"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@mod @mod_quiz
|
||||
@mod @mod_quiz @core_completion
|
||||
Feature: Set a quiz to be marked complete when the student completes a minimum amount of attempts
|
||||
In order to ensure a student has completed the quiz before being marked complete
|
||||
As a teacher
|
||||
@@ -49,8 +49,13 @@ Feature: Set a quiz to be marked complete when the student completes a minimum a
|
||||
And I press "Submit all and finish"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the "Make attempts: 2" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I follow "Test quiz name"
|
||||
And the "Make attempts: 2" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
And "Test quiz name" should have the "Make attempts: 2" completion condition
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Reports > Activity completion" in current page administration
|
||||
And "Completed" "icon" should exist in the "Student 1" "table_row"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@mod @mod_quiz
|
||||
@mod @mod_quiz @core_completion
|
||||
Feature: Set a quiz to be marked complete when the student passes
|
||||
In order to ensure a student has learned the material before being marked complete
|
||||
As a teacher
|
||||
@@ -25,8 +25,8 @@ Feature: Set a quiz to be marked complete when the student passes
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpass |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 4 | 5.00 | 2 | 1 | 1 |
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpass | completionview |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 4 | 5.00 | 2 | 1 | 1 | 1 |
|
||||
And quiz "Test quiz name" contains the following questions:
|
||||
| question | page |
|
||||
| First question | 1 |
|
||||
@@ -36,12 +36,18 @@ Feature: Set a quiz to be marked complete when the student passes
|
||||
And I am on "Course 1" course homepage
|
||||
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "todo"
|
||||
And the "Receive a pass grade" completion condition of "Test quiz name" is displayed as "todo"
|
||||
And the "View" completion condition of "Test quiz name" is displayed as "todo"
|
||||
And user "student1" has attempted "Test quiz name" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
Then the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
||||
And the "Receive a pass grade" completion condition of "Test quiz name" is displayed as "done"
|
||||
And the "View" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I am on "Course 1" course homepage
|
||||
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
||||
And the "Receive a pass grade" completion condition of "Test quiz name" is displayed as "done"
|
||||
And the "View" completion condition of "Test quiz name" is displayed as "done"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
@mod @mod_quiz @core_completion
|
||||
Feature: Manually complete a quiz
|
||||
In order to meet manual quiz completion requirements
|
||||
As a student
|
||||
I need to be able to view and modify my quiz manual completion status
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following config values are set as admin:
|
||||
| grade_item_advanced | hiddenuntil |
|
||||
And the following "question categories" exist:
|
||||
| contextlevel | reference | name |
|
||||
| Course | C1 | Test questions |
|
||||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber | completion |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 1 |
|
||||
And quiz "Test quiz name" contains the following questions:
|
||||
| question | page |
|
||||
| First question | 1 |
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
When I log in as "teacher1"
|
||||
# Teacher view.
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
And the manual completion button for "Test quiz name" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
Then the manual completion button of "Test quiz name" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Test quiz name"
|
||||
And the manual completion button of "Test quiz name" is displayed as "Done"
|
||||
@@ -1,8 +1,8 @@
|
||||
@mod @mod_resource @core_completion @_file_upload
|
||||
Feature: View activity completion information for the resource
|
||||
In order to have visibility of Resource completion requirements
|
||||
Feature: View activity completion information for file resources
|
||||
In order to have visibility of file resource completion requirements
|
||||
As a student
|
||||
I need to be able to view my Resource completion progress
|
||||
I need to be able to view my file resource completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
@@ -28,15 +28,15 @@ Feature: View activity completion information for the resource
|
||||
And I press "Save and display"
|
||||
|
||||
@javascript
|
||||
Scenario Outline: The manual completion button will be shown on the course page for Open, In pop-up, New window and Force download display mode if the Show completion conditions is set to No
|
||||
Scenario Outline: The manual completion button will be shown on the course page for Open, In pop-up, New window and Force download display mode if Show completion conditions is set to No
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "File" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Myfile |
|
||||
| Name | Myfile |
|
||||
| id_display | <display> |
|
||||
| Show size | 0 |
|
||||
| Show type | 0 |
|
||||
| Show upload/modified date | 0 |
|
||||
| Show upload/modified date | 0 |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager
|
||||
And I press "Save and return to course"
|
||||
@@ -58,3 +58,60 @@ Feature: View activity completion information for the resource
|
||||
| In pop-up |
|
||||
| Force download |
|
||||
| New window |
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the activity page and course page if Show completion conditions is set to Yes
|
||||
Given I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show completion conditions" to "Yes"
|
||||
And I press "Save and display"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "File" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Myfile |
|
||||
| id_display | Embed |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager
|
||||
And I click on "Save and display" "button"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Myfile" should exist
|
||||
And the manual completion button for "Myfile" should be disabled
|
||||
And I follow "Myfile"
|
||||
And the manual completion button for "Myfile" should exist
|
||||
And the manual completion button for "Myfile" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then the manual completion button for "Myfile" should exist
|
||||
And I follow "Myfile"
|
||||
And the manual completion button of "Myfile" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Myfile"
|
||||
And the manual completion button of "Myfile" is displayed as "Done"
|
||||
|
||||
@javascript
|
||||
Scenario: View automatic completion items
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show completion conditions" to "Yes"
|
||||
And I press "Save and display"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "File" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Myfile |
|
||||
| id_display | Embed |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager
|
||||
And I press "Save and display"
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And I follow "Myfile"
|
||||
And "Myfile" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Myfile"
|
||||
Then the "View" completion condition of "Myfile" is displayed as "done"
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
@mod @mod_scorm @core_completion @_file_upload @_switch_iframe
|
||||
Feature: View activity completion in the SCORM activity
|
||||
In order to have visibility of scorm completion requirements
|
||||
As a student
|
||||
I need to be able to view my scorm completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I turn editing mode on
|
||||
And I add a "SCORM package" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Music history |
|
||||
| Number of attempts | 1 attempt |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
| Require grade | 1 |
|
||||
| completionscoredisabled | 0 |
|
||||
| completionscorerequired | 3 |
|
||||
| completionstatusrequired[2] | 1 |
|
||||
| completionstatusrequired[4] | 1 |
|
||||
| completionstatusallscos | 1 |
|
||||
And I upload "mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip" file to "Package file" filemanager
|
||||
And I click on "Save and display" "button"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
Scenario: View automatic completion items as a teacher
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And "Music history" should have the "Receive a score of 3 or more" completion condition
|
||||
And "Music history" should have the "Do all parts of this activity" completion condition
|
||||
And "Music history" should have the "Receive a grade" completion condition
|
||||
And "Music history" should have the "Complete and pass the activity" completion condition
|
||||
|
||||
@javascript
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a score of 3 or more" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Do all parts of this activity" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Complete and pass the activity" completion condition of "Music history" is displayed as "todo"
|
||||
And I press "Enter"
|
||||
And I switch to the main frame
|
||||
And I click on "Par?" "list_item"
|
||||
And I click on "Keeping Score" "list_item"
|
||||
And I click on "Other Scoring Systems" "list_item"
|
||||
And I click on "The Rules of Golf" "list_item"
|
||||
And I click on "Playing Golf Quiz" "list_item"
|
||||
And I switch to "scorm_object" iframe
|
||||
And I click on "[id='question_com.scorm.golfsamples.interactions.playing_1_1']" "css_element"
|
||||
And I press "Submit Answers"
|
||||
And I switch to the main frame
|
||||
And I click on "How to Have Fun Playing Golf" "list_item"
|
||||
And I click on "How to Make Friends Playing Golf" "list_item"
|
||||
And I click on "Having Fun Quiz" "list_item"
|
||||
And I switch to "scorm_object" iframe
|
||||
And I click on "[id='question_com.scorm.golfsamples.interactions.fun_1_False']" "css_element"
|
||||
And I press "Submit Answers"
|
||||
And I switch to the main frame
|
||||
And I follow "Exit activity"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
# Conditions that are not possible to achieve (eg score below requirement but all attempts used) are marked as failed.
|
||||
And the "Receive a score of 3 or more" completion condition of "Music history" is displayed as "failed"
|
||||
# This condition caches as failed, which will be investigated as part of MDL-71401.
|
||||
And the "Do all parts of this activity" completion condition of "Music history" is displayed as "failed"
|
||||
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
||||
And the "Complete and pass the activity" completion condition of "Music history" is displayed as "failed"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Music history"
|
||||
And the manual completion button of "Music history" is displayed as "Done"
|
||||
@@ -20,14 +20,22 @@ Feature: A teacher can use activity completion to track a student progress
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
|
||||
Scenario: Require survey view
|
||||
Given I add a "Survey" to section "1" and I fill the form with:
|
||||
| Name | Test survey name |
|
||||
| Survey type | Critical incidents |
|
||||
| Description | Test survey description |
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| survey | Test survey name | Test survey description | C1 | survey1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test survey name"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| id_completionview | 1 |
|
||||
| id_completionsubmit | 0 |
|
||||
| completionview | 1 |
|
||||
| completionsubmit | 0 |
|
||||
And I press "Save and return to course"
|
||||
And I follow "Test survey name"
|
||||
# Teacher view.
|
||||
And "Test survey name" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And the "View" completion condition of "Test survey name" is displayed as "todo"
|
||||
@@ -36,17 +44,47 @@ Feature: A teacher can use activity completion to track a student progress
|
||||
Then the "View" completion condition of "Test survey name" is displayed as "done"
|
||||
|
||||
Scenario: Require survey submission
|
||||
Given I add a "Survey" to section "1" and I fill the form with:
|
||||
| Name | Test survey name |
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| survey | Test survey name | Test survey description | C1 | survey1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test survey name"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Survey type | Critical incidents |
|
||||
| Description | Test survey description |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| id_completionsubmit | 1 |
|
||||
| completionview | 1 |
|
||||
| completionsubmit | 1 |
|
||||
And I press "Save and return to course"
|
||||
And I follow "Test survey name"
|
||||
# Teacher view.
|
||||
And "Test survey name" should have the "Submit answers" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And the "View" completion condition of "Test survey name" is displayed as "todo"
|
||||
And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
|
||||
And I follow "Test survey name"
|
||||
And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
|
||||
And I press "Click here to continue"
|
||||
And I am on "Course 1" course homepage
|
||||
And the "View" completion condition of "Test survey name" is displayed as "done"
|
||||
And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
|
||||
And I follow "Test survey name"
|
||||
And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | completion |
|
||||
| survey | Test survey name | Test survey description | C1 | survey1 | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
# Teacher view.
|
||||
And the manual completion button for "Test survey name" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test survey name"
|
||||
Then the manual completion button of "Test survey name" is displayed as "Mark as done"
|
||||
And I toggle the manual completion state of "Test survey name"
|
||||
And the manual completion button of "Test survey name" is displayed as "Done"
|
||||
|
||||
@@ -88,6 +88,13 @@ $PAGE->set_heading($course->fullname);
|
||||
$PAGE->navbar->add(format_string(get_string('wikifiles', 'wiki')));
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($wiki->name));
|
||||
|
||||
// Render the activity information.
|
||||
$cminfo = cm_info::create($cm);
|
||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
||||
|
||||
echo $OUTPUT->box(format_module_intro('wiki', $wiki, $PAGE->cm->id), 'generalbox', 'intro');
|
||||
|
||||
$renderer = $PAGE->get_renderer('mod_wiki');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@mod @mod_url @core_completion
|
||||
@mod @mod_wiki @core_completion
|
||||
Feature: View activity completion information in the Wiki activity
|
||||
In order to have visibility of URL completion requirements
|
||||
In order to have visibility of wiki completion requirements
|
||||
As a student
|
||||
I need to be able to view my URL completion progress
|
||||
I need to be able to view my wiki completion progress
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
@@ -24,35 +24,52 @@ Feature: View activity completion information in the Wiki activity
|
||||
| Enable completion tracking | Yes |
|
||||
| Show completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Wiki" to section "1" and I fill the form with:
|
||||
| Wiki name | Music history |
|
||||
| First page name | Respect |
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
# Teacher view.
|
||||
And I follow "Music history"
|
||||
And I click on "Create page" "button"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I log out
|
||||
# Student view.
|
||||
When I log in as "student1"
|
||||
And the following "activity" exists:
|
||||
| activity | wiki |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
| completion | 2 |
|
||||
| completionview | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And the "View" completion condition of "Music history" is displayed as "done"
|
||||
And I click on "Create page" "button"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher and confirm all tabs display conditions
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Music history"
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And I click on "Edit" "link" in the "region-main" "region"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Comments"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Map"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Files"
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Administration"
|
||||
And "Music history" should have the "View" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Wiki" to section "1" and I fill the form with:
|
||||
| Wiki name | Music history |
|
||||
| First page name | Respect |
|
||||
| Completion tracking | Students can manually mark the activity as completed |
|
||||
# Teacher view.
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I click on "Create page" "button"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I press "Unlock completion options"
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
|
||||
Reference in New Issue
Block a user