Merge branch 'MDL-55074-master' of git://github.com/damyon/moodle
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Admin settings search form
|
||||
*
|
||||
* @package admin
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once $CFG->libdir.'/formslib.php';
|
||||
|
||||
/**
|
||||
* Admin settings search form
|
||||
*
|
||||
* @package admin
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_settings_search_form extends moodleform {
|
||||
function definition () {
|
||||
$mform = $this->_form;
|
||||
|
||||
//$mform->addElement('header', 'settingsheader', get_string('search', 'admin'));
|
||||
$elements = [];
|
||||
$elements[] = $mform->createElement('text', 'query', get_string('query', 'admin'));
|
||||
$elements[] = $mform->createElement('submit', 'search', get_string('search'));
|
||||
$mform->addGroup($elements);
|
||||
$mform->setType('query', PARAM_RAW);
|
||||
$mform->setDefault('query', optional_param('query', '', PARAM_RAW));
|
||||
}
|
||||
}
|
||||
+15
-1
@@ -36,6 +36,8 @@ if ($data = data_submitted() and confirm_sesskey()) {
|
||||
// to modify them
|
||||
echo $OUTPUT->header($focus);
|
||||
|
||||
echo $OUTPUT->heading(get_string('administrationsite'));
|
||||
|
||||
if ($errormsg !== '') {
|
||||
echo $OUTPUT->notification($errormsg);
|
||||
|
||||
@@ -43,6 +45,18 @@ if ($errormsg !== '') {
|
||||
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
|
||||
}
|
||||
|
||||
echo admin_search_settings_html($query);
|
||||
require_once("admin_settings_search_form.php");
|
||||
$form = new admin_settings_search_form();
|
||||
$form->display();
|
||||
echo '<hr>';
|
||||
|
||||
if ($query) {
|
||||
echo admin_search_settings_html($query);
|
||||
} else {
|
||||
$node = $PAGE->settingsnav->find('root', navigation_node::TYPE_SITE_ADMIN);
|
||||
if ($node) {
|
||||
echo $OUTPUT->render_from_template('core/settings_link_page', ['node' => $node]);
|
||||
}
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
@@ -172,7 +172,6 @@ preferences,moodle|/user/preferences.php|preferences',
|
||||
$temp->add(new admin_setting_configcheckbox('navshowcategories', new lang_string('navshowcategories', 'admin'), new lang_string('confignavshowcategories', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('navshowmycoursecategories', new lang_string('navshowmycoursecategories', 'admin'), new lang_string('navshowmycoursecategories_help', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('navshowallcourses', new lang_string('navshowallcourses', 'admin'), new lang_string('confignavshowallcourses', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('navexpandmycourses', new lang_string('navexpandmycourses', 'admin'), new lang_string('navexpandmycourses_desc', 'admin'), 1));
|
||||
$sortoptions = array(
|
||||
'sortorder' => new lang_string('sort_sortorder', 'admin'),
|
||||
'fullname' => new lang_string('sort_fullname', 'admin'),
|
||||
|
||||
@@ -47,4 +47,4 @@ $ADMIN->add('root', new admin_category('development', new lang_string('developme
|
||||
$ADMIN->add('root', new admin_category('unsupported', new lang_string('unsupported', 'admin'), true));
|
||||
|
||||
// hidden search script
|
||||
$ADMIN->add('root', new admin_externalpage('search', new lang_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
|
||||
$ADMIN->add('root', new admin_externalpage('search', new lang_string('search', 'admin'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
|
||||
|
||||
@@ -325,7 +325,7 @@ Feature: Set up contextual data for tests
|
||||
And I am on site homepage
|
||||
And I follow "Courses"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then I should see "Grade category 1"
|
||||
And I should see "Grade sub category 2"
|
||||
|
||||
@@ -349,7 +349,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
Then I should see "Test Grade Item 1"
|
||||
@@ -380,7 +380,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "Scales"
|
||||
Then I should see "Test Scale 1"
|
||||
And I should see "Disappointing, Good, Very good, Excellent"
|
||||
@@ -432,7 +432,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
Then I should see "Test Outcome Grade Item 1"
|
||||
|
||||
@@ -52,13 +52,13 @@ Feature: Edit capabilities
|
||||
| Forum name | I'm the name |
|
||||
| Description | I'm the introduction |
|
||||
And I follow "I'm the name"
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Permissions" node in "Forum administration"
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
| mod/forum:addquestion | Allow |
|
||||
When I set the field "Advanced role override" to "Student (3)"
|
||||
And I press "Go"
|
||||
And I click on "Go" "button" in the "region-main" "region"
|
||||
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
|
||||
And "mod/forum:editanypost" capability has "Prevent" permission
|
||||
And "mod/forum:addquestion" capability has "Allow" permission
|
||||
|
||||
@@ -37,7 +37,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And I expand "Appearance" node
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Reset"
|
||||
And I navigate to "Reset" node in "Course administration"
|
||||
# Select (multi-select) - Checking "the select box should contain".
|
||||
And I expand all fieldsets
|
||||
And the "Unenrol users" select box should contain "No roles"
|
||||
|
||||
@@ -8,7 +8,7 @@ Feature: Forms manipulation
|
||||
Scenario: Basic forms manipulation
|
||||
Given I log in as "admin"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
When I set the field "First name" to "Field value"
|
||||
And I set the field "Select a country" to "Japan"
|
||||
And I set the field "Unmask" to "1"
|
||||
|
||||
@@ -11,14 +11,14 @@ Feature: Transform steps arguments
|
||||
| Course 1 | C1 | 0 |
|
||||
And I log in as "admin"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
|
||||
Scenario: Use nasty strings on steps arguments
|
||||
When I set the field "Surname" to "$NASTYSTRING1"
|
||||
And I set the field "Description" to "$NASTYSTRING2"
|
||||
And I set the field "City/town" to "$NASTYSTRING3"
|
||||
And I press "Update profile"
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
Then I should not see "NASTYSTRING"
|
||||
And the field "Surname" matches value "$NASTYSTRING1"
|
||||
And the field "City/town" matches value "$NASTYSTRING3"
|
||||
@@ -29,7 +29,7 @@ Feature: Transform steps arguments
|
||||
| Description | $NASTYSTRING2 |
|
||||
| City/town | $NASTYSTRING3 |
|
||||
And I press "Update profile"
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
Then I should not see "NASTYSTRING"
|
||||
# BEHAT Transformation regression - See MDL-56397
|
||||
#And the field "Surname" matches value "$NASTYSTRING1"
|
||||
@@ -41,7 +41,7 @@ Feature: Transform steps arguments
|
||||
| Description | va\"lue2 |
|
||||
And I set the field "City/town" to "va\"lue3"
|
||||
And I press "Update profile"
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
Then I should not see "NASTYSTRING"
|
||||
And the field "First name" matches value "va\"lue1"
|
||||
And the field "Description" matches value "va\\"lue2"
|
||||
@@ -52,7 +52,7 @@ Feature: Transform steps arguments
|
||||
And I set the following fields to these values:
|
||||
| Surname | My Surname $NASTYSTRING2 |
|
||||
And I press "Update profile"
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
Then I should not see "NASTYSTRING"
|
||||
And I should see "My Firstname"
|
||||
And I should see "My Surname"
|
||||
|
||||
@@ -24,40 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* This function extends the course navigation
|
||||
*
|
||||
* @param navigation_node $navigation The navigation node to extend
|
||||
* @param stdClass $course The course to object for the tool
|
||||
* @param context $coursecontext The context of the course
|
||||
*/
|
||||
function tool_lp_extend_navigation_course($navigation, $course, $coursecontext) {
|
||||
if (!get_config('core_competency', 'enabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check access to the course and competencies page.
|
||||
$capabilities = array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencymanage');
|
||||
$context = context_course::instance($course->id);
|
||||
if (!has_any_capability($capabilities, $context) || !can_access_course($course)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Just a link to course competency.
|
||||
$title = get_string('competencies', 'core_competency');
|
||||
$path = new moodle_url("/admin/tool/lp/coursecompetencies.php", array('courseid' => $course->id));
|
||||
$settingsnode = navigation_node::create($title,
|
||||
$path,
|
||||
navigation_node::TYPE_SETTING,
|
||||
null,
|
||||
null,
|
||||
new pix_icon('i/competencies', ''));
|
||||
if (isset($settingsnode)) {
|
||||
$navigation->add_node($settingsnode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function extends the user navigation.
|
||||
*
|
||||
|
||||
@@ -41,6 +41,7 @@ Feature: Manage competencies linked to evidence of prior learning
|
||||
|
||||
Scenario: Link competency to evidence of prior learning from list
|
||||
Given I follow "Evidence of prior learning"
|
||||
And I change window size to "large"
|
||||
And I should see "List of evidence"
|
||||
And I should see "Test-Evidence"
|
||||
And I click on "Link" of edit menu in the "Test-Evidence" row
|
||||
|
||||
@@ -147,7 +147,7 @@ Feature: tool_monitor_subscriptions
|
||||
When I follow "Event monitoring"
|
||||
And I set the field "Select a course" to "Course 1"
|
||||
Then I should see "You can manage rules from the Event monitoring rules page."
|
||||
And I follow "Event monitoring rules"
|
||||
And I click on "Event monitoring rules" "link" in the "region-main" "region"
|
||||
And I should see "You can subscribe to rules from the Event monitoring page."
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
@@ -155,7 +155,7 @@ Feature: tool_monitor_subscriptions
|
||||
And I follow "Event monitoring"
|
||||
And I set the field "Select a course" to "Course 1"
|
||||
And I should see "You can manage rules from the Event monitoring rules page."
|
||||
And I follow "Event monitoring rules"
|
||||
And I click on "Event monitoring rules" "link" in the "region-main" "region"
|
||||
And I should see "You can subscribe to rules from the Event monitoring page."
|
||||
And I click on "//a[text()='Event monitoring']" "xpath_element"
|
||||
And the field "courseid" matches value "Course 1"
|
||||
|
||||
@@ -58,12 +58,12 @@ Feature: Backup user data
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I delete "Quiz 1" activity
|
||||
And I follow "Recycle bin"
|
||||
And I navigate to "Recycle bin" node in "Course administration"
|
||||
And I should see "Quiz 1"
|
||||
And I follow "Restore"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
|
||||
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
|
||||
|
||||
@@ -31,10 +31,10 @@ Feature: Basic recycle bin functionality
|
||||
| Assignment name | Test assign |
|
||||
| Description | Test |
|
||||
And I delete "Test assign" activity
|
||||
When I follow "Recycle bin"
|
||||
When I navigate to "Recycle bin" node in "Course administration"
|
||||
Then I should see "Test assign"
|
||||
And I should see "Contents will be permanently deleted after 7 days"
|
||||
And I follow "Restore"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
And I should see "'Test assign' has been restored"
|
||||
And I wait to be redirected
|
||||
And I am on homepage
|
||||
@@ -51,10 +51,10 @@ Feature: Basic recycle bin functionality
|
||||
And I press "Continue"
|
||||
And I go to the courses management page
|
||||
And I should not see "Course 2" in the "#course-listing" "css_element"
|
||||
When I follow "Recycle bin"
|
||||
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
|
||||
Then I should see "Course 2"
|
||||
And I should see "Contents will be permanently deleted after 14 days"
|
||||
And I follow "Restore"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
And I should see "'Course 2' has been restored"
|
||||
And I wait to be redirected
|
||||
And I go to the courses management page
|
||||
@@ -69,7 +69,7 @@ Feature: Basic recycle bin functionality
|
||||
| Assignment name | Test assign |
|
||||
| Description | Test |
|
||||
And I delete "Test assign" activity
|
||||
And I follow "Recycle bin"
|
||||
And I navigate to "Recycle bin" node in "Course administration"
|
||||
When I click on "Delete" "link"
|
||||
Then I should see "Are you sure you want to delete the selected item from the recycle bin?"
|
||||
And I press "Cancel"
|
||||
@@ -92,7 +92,7 @@ Feature: Basic recycle bin functionality
|
||||
| Description | Test 2 |
|
||||
And I delete "Test assign 1" activity
|
||||
And I delete "Test assign 2" activity
|
||||
And I follow "Recycle bin"
|
||||
And I navigate to "Recycle bin" node in "Course administration"
|
||||
And I should see "Test assign 1"
|
||||
And I should see "Test assign 2"
|
||||
When I click on "Delete all" "link"
|
||||
|
||||
@@ -67,7 +67,7 @@ Feature: Restore Moodle 2 course backups
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum post backup name |
|
||||
| Description | Test forum post backup description |
|
||||
And I follow "Restore"
|
||||
And I navigate to "Restore" node in "Course administration"
|
||||
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
|
||||
| Schema | Section 3 | 0 |
|
||||
Then I should see "Course 1"
|
||||
@@ -91,6 +91,7 @@ Feature: Restore Moodle 2 course backups
|
||||
| id_startdate_month | January |
|
||||
| id_startdate_year | 2020 |
|
||||
| id_format | Weekly format |
|
||||
| id_enddate_enabled | 0 |
|
||||
And I press "Save and display"
|
||||
And I should see "1 January - 7 January"
|
||||
And I should see "Test forum name"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: Award badges
|
||||
And I press "Continue"
|
||||
And I click on "Admin User" "link"
|
||||
And I choose "Profile" in the open action menu
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Phone" to "123456789"
|
||||
And I press "Update profile"
|
||||
@@ -113,7 +113,7 @@ Feature: Award badges
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Profile" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And I should see "Course Badge"
|
||||
|
||||
@javascript
|
||||
@@ -131,7 +131,7 @@ Feature: Award badges
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Edit settings"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -156,13 +156,13 @@ Feature: Award badges
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Profile" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then I should not see "badges"
|
||||
And I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I press "Mark as complete: Test assignment name"
|
||||
And I follow "Profile" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then I should see "Course Badge"
|
||||
|
||||
@javascript
|
||||
@@ -180,7 +180,7 @@ Feature: Award badges
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Edit settings"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -189,7 +189,7 @@ Feature: Award badges
|
||||
| Assignment name | Test assignment name |
|
||||
| Description | Submit your online text |
|
||||
| assignsubmission_onlinetext_enabled | 1 |
|
||||
And I follow "Course completion"
|
||||
And I navigate to "Course completion" node in "Course administration"
|
||||
And I set the field "id_overall_aggregation" to "2"
|
||||
And I click on "Condition: Activity completion" "link"
|
||||
And I set the field "Assignment - Test assignment name" to "1"
|
||||
@@ -211,7 +211,7 @@ Feature: Award badges
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Profile" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then I should not see "badges"
|
||||
And I am on homepage
|
||||
And I follow "Course 1"
|
||||
@@ -300,14 +300,14 @@ Feature: Award badges
|
||||
# Student 1 should have just course badge 1.
|
||||
And I log in as "student1"
|
||||
And I follow "Profile" in the user menu
|
||||
When I follow "Course 1"
|
||||
When I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then I should see "Course Badge 1"
|
||||
And I should not see "Course Badge 2"
|
||||
And I log out
|
||||
# Student 2 should have just course badge 2.
|
||||
And I log in as "student2"
|
||||
And I follow "Profile" in the user menu
|
||||
When I follow "Course 1"
|
||||
When I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then I should see "Course Badge 2"
|
||||
Then I should not see "Course Badge 1"
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
And I press "Save and return to course"
|
||||
And I follow "Course 1"
|
||||
And I should see "Test page name"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -167,4 +167,4 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "User" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
And I should see "80.00%" in the "Activity results" "block"
|
||||
And I should see "70.00%" in the "Activity results" "block"
|
||||
And I should see "70.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
@@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
@@ -60,7 +60,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -225,4 +225,4 @@ Feature: The activity results block displays student scores
|
||||
And I follow "Course 1"
|
||||
And I should see "User" in the "Activity results" "block"
|
||||
And I should see "100.00%" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -202,4 +202,4 @@ Feature: The activity results block displays student scores
|
||||
And I should see "Group" in the "Activity results" "block"
|
||||
And I should see "95.00%" in the "Activity results" "block"
|
||||
And I should see "85.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -156,4 +156,4 @@ Feature: The activity results block displays student scores
|
||||
Then I should see "User" in the "Activity results" "block"
|
||||
And I should see "50.00%" in the "Activity results" "block"
|
||||
And I should see "60.00%" in the "Activity results" "block"
|
||||
And I should see "70.00%" in the "Activity results" "block"
|
||||
And I should see "70.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
@@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
@@ -60,7 +60,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -217,4 +217,4 @@ Feature: The activity results block displays student scores
|
||||
And I follow "Course 1"
|
||||
And I should see "User" in the "Activity results" "block"
|
||||
And I should see "100.00%" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
And I should see "90.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
@@ -198,4 +198,4 @@ Feature: The activity results block displays student scores
|
||||
And I follow "Course 1"
|
||||
And I should see "Group" in the "Activity results" "block"
|
||||
And I should see "85.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
And I should see "75.00%" in the "Activity results" "block"
|
||||
|
||||
@@ -219,4 +219,4 @@ Feature: Enable Block blog menu in an activity
|
||||
And I press "Search"
|
||||
Then I should see "S1 First Blog"
|
||||
And I should see "S2 First Blog"
|
||||
And I should not see "S2 Second Blog"
|
||||
And I should not see "S2 Second Blog"
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Adding blog tag block
|
||||
And I turn editing mode on
|
||||
And I add the "Blog tags" block
|
||||
|
||||
And I navigate to "Course blogs" node in "Current course > c1 > Participants"
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from teacher |
|
||||
@@ -35,7 +35,7 @@ Feature: Adding blog tag block
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Course blogs" node in "Current course > c1 > Participants"
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from student |
|
||||
|
||||
@@ -11,6 +11,8 @@ Feature: Enable the calendar block on the site front page
|
||||
| student1 | Student | 1 | student1@example.com | S1 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | Site |
|
||||
| id_name | Site Event |
|
||||
|
||||
@@ -28,13 +28,13 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
Scenario: Add the course list block on category page and navigate to the course listing
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -46,13 +46,13 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
Scenario: Add the course list block on category page and navigate to another course
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -64,8 +64,8 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
Scenario: Add the course list block on category page and view as an admin
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
When I add the "Courses" block
|
||||
Then I should see "Miscellaneous" in the "Course categories" "block"
|
||||
|
||||
@@ -7,6 +7,8 @@ Feature: Course summary block used on the frontpage
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Course/site summary" block
|
||||
And I navigate to "Edit settings" node in "Front page settings"
|
||||
And I set the following fields to these values:
|
||||
| summary | Proved the summary block works! |
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
@block @block_navigation
|
||||
Feature: Test expand my courses navigation setting
|
||||
As a student
|
||||
I visit my My Moodle page and observe the the My Courses branch
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
And the following "categories" exist:
|
||||
| name | category | idnumber |
|
||||
| cat1 | 0 | cat1 |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course1 | c1 | cat1 |
|
||||
| Course2 | c2 | cat1 |
|
||||
| Course3 | c3 | cat1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | c1 | student |
|
||||
| student1 | c2 | student |
|
||||
|
||||
Scenario: The My Courses branch is expanded on the My Moodle page by default
|
||||
When I log in as "student1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
Then I should see "c1" in the "Navigation" "block"
|
||||
And I should see "c2" in the "Navigation" "block"
|
||||
And I should not see "c3" in the "Navigation" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: The My Courses branch is collapsed when expand my courses is off
|
||||
Given I log in as "admin"
|
||||
And I set the following administration settings values:
|
||||
| Show My courses expanded on Dashboard | 0 |
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
Then I should not see "c1" in the "Navigation" "block"
|
||||
And I should not see "c2" in the "Navigation" "block"
|
||||
And I should not see "c3" in the "Navigation" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: My Courses can be expanded on the My Moodle page when expand my courses is off
|
||||
Given I log in as "admin"
|
||||
And I set the following administration settings values:
|
||||
| Show My courses expanded on Dashboard | 0 |
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I should not see "c1" in the "Navigation" "block"
|
||||
And I should not see "c2" in the "Navigation" "block"
|
||||
And I should not see "c3" in the "Navigation" "block"
|
||||
And I expand "My courses" node
|
||||
Then I should see "c1" in the "Navigation" "block"
|
||||
And I should see "c2" in the "Navigation" "block"
|
||||
And I should not see "c3" in the "Navigation" "block"
|
||||
@@ -18,6 +18,9 @@ Feature: Latest announcements block displays the course latest news
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Latest announcements" block
|
||||
And I turn editing mode off
|
||||
When I add a new topic to "Announcements" forum with:
|
||||
| Subject | Discussion One |
|
||||
| Message | Not important |
|
||||
@@ -31,14 +34,14 @@ Feature: Latest announcements block displays the course latest news
|
||||
Then I should see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I follow "Edit settings"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 2 |
|
||||
And I press "Save and display"
|
||||
And I should not see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I follow "Edit settings"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 0 |
|
||||
And I press "Save and display"
|
||||
|
||||
@@ -49,6 +49,7 @@ Feature: View structural changes in recent activity block
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Recent activity" block
|
||||
When I add a "Forum" to section "1" and I fill the form with:
|
||||
| name | ForumVisibleGroups |
|
||||
| Description | No description |
|
||||
@@ -145,6 +146,7 @@ Feature: View structural changes in recent activity block
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| name | ForumNew |
|
||||
| Description | No description |
|
||||
|
||||
@@ -21,6 +21,9 @@ Feature: The search forums block allows users to search for forum posts
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I set the field "id_newsitems" to "1"
|
||||
And I press "Save and display"
|
||||
And I turn editing mode on
|
||||
And I add the "Latest announcements" block
|
||||
And I add the "Search forums" block
|
||||
And I log out
|
||||
|
||||
Scenario: Use the search forum block in a course without any forum posts
|
||||
|
||||
@@ -9,6 +9,7 @@ Feature: Add URL to main menu block
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I add the "Main menu" block
|
||||
When I add a "URL" to section "0" and I fill the form with:
|
||||
| Name | google |
|
||||
| Description | gooooooooogle |
|
||||
|
||||
@@ -9,6 +9,7 @@ Feature: Edit activities in main menu block
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I add the "Main menu" block
|
||||
When I add a "Forum" to section "0" and I fill the form with:
|
||||
| Forum name | My forum name |
|
||||
And I click on "Edit title" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'My forum name')]" "xpath_element"
|
||||
|
||||
@@ -18,6 +18,7 @@ Feature: Edit activities in social activities block
|
||||
Given I log in as "user1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Social activities" block
|
||||
And I set the field "Add an activity to section 'section 0'" to "Forum"
|
||||
And I set the field "Forum name" to "My forum name"
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -31,7 +31,7 @@ Feature: Block tags displaying tag cloud
|
||||
And I should see "Cats" in the "Tags" "block"
|
||||
And I should not see "Neverusedtag" in the "Tags" "block"
|
||||
And I click on "Dogs" "link" in the "Tags" "block"
|
||||
And I should see "Log in to the site" in the ".breadcrumb" "css_element"
|
||||
And I should see "You are not logged in"
|
||||
|
||||
Scenario: Add Tags block in a course
|
||||
When I log in as "teacher1"
|
||||
|
||||
@@ -58,6 +58,7 @@ Feature: Add and configure blocks throughout the site
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Turn editing on"
|
||||
And I add the "Search forums" block
|
||||
Then I should see "Assign roles in Search forums block"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -14,6 +14,10 @@ Feature: Show hidden blocks in a docked block region when editing
|
||||
And I log in as "admin"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Search forums" block
|
||||
And I add the "Latest announcements" block
|
||||
And I add the "Upcoming events" block
|
||||
And I add the "Recent activity" block
|
||||
# Hide all the blocks in the non-default region
|
||||
And I configure the "Search forums" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -20,6 +20,7 @@ Feature: Limit displayed upcoming events
|
||||
Given I follow "C1"
|
||||
And I turn editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I add the "Upcoming events" block
|
||||
And I follow "This month"
|
||||
And I click on "a.next" "css_element"
|
||||
And I click on "a.next" "css_element"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: Add cohorts of users
|
||||
When I add "First User (first@example.com)" user to "333" cohort members
|
||||
And I add "Second User (second@example.com)" user to "333" cohort members
|
||||
Then I should see "2" in the "#cohorts" "css_element"
|
||||
And I follow "Assign"
|
||||
And I click on "Assign" "link" in the "Test cohort name" "table_row"
|
||||
And the "Current users" select box should contain "First User (first@example.com)"
|
||||
And the "Current users" select box should contain "Second User (second@example.com)"
|
||||
And the "Current users" select box should not contain "Forth User (forth@example.com)"
|
||||
@@ -49,7 +49,7 @@ Feature: Add cohorts of users
|
||||
And I press "Add to cohort"
|
||||
And I follow "Cohorts"
|
||||
Then I should see "2" in the "#cohorts" "css_element"
|
||||
And I follow "Assign"
|
||||
And I click on "Assign" "link" in the "Test cohort name" "table_row"
|
||||
And the "Current users" select box should contain "Third User (third@example.com)"
|
||||
And the "Current users" select box should contain "Forth User (forth@example.com)"
|
||||
And the "Current users" select box should not contain "First User (first@example.com)"
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Listing of the course administration pages for this course.
|
||||
*
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once("../config.php");
|
||||
|
||||
$courseid = required_param('courseid', PARAM_INT);
|
||||
|
||||
$PAGE->set_url('/course/admin.php', array('courseid'=>$courseid));
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
|
||||
|
||||
require_login($course);
|
||||
$context = context_course::instance($course->id);
|
||||
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
|
||||
if ($courseid == $SITE->id) {
|
||||
$title = get_string('frontpagesettings');
|
||||
$node = $PAGE->settingsnav->find('frontpage', navigation_node::TYPE_SETTING);
|
||||
} else {
|
||||
$title = get_string('courseadministration');
|
||||
$node = $PAGE->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);
|
||||
}
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->navbar->add($title);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($title);
|
||||
|
||||
if ($node) {
|
||||
echo $OUTPUT->render_from_template('core/settings_link_page', ['node' => $node]);
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -482,7 +482,7 @@ abstract class format_base {
|
||||
}
|
||||
$blocknames = array(
|
||||
BLOCK_POS_LEFT => array(),
|
||||
BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')
|
||||
BLOCK_POS_RIGHT => array()
|
||||
);
|
||||
return $blocknames;
|
||||
}
|
||||
|
||||
@@ -71,8 +71,7 @@ class format_social extends format_base {
|
||||
public function get_default_blocks() {
|
||||
return array(
|
||||
BLOCK_POS_LEFT => array(),
|
||||
BLOCK_POS_RIGHT => array('search_forums', 'calendar_upcoming', 'social_activities',
|
||||
'recent_activity', 'course_list')
|
||||
BLOCK_POS_RIGHT => array()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,9 +121,6 @@ class format_topics extends format_base {
|
||||
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
|
||||
$url->param('section', $sectionno);
|
||||
} else {
|
||||
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
|
||||
return null;
|
||||
}
|
||||
$url->set_anchor('section-'.$sectionno);
|
||||
}
|
||||
}
|
||||
@@ -208,7 +205,7 @@ class format_topics extends format_base {
|
||||
public function get_default_blocks() {
|
||||
return array(
|
||||
BLOCK_POS_LEFT => array(),
|
||||
BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')
|
||||
BLOCK_POS_RIGHT => array()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ Feature: Sections can be edited and deleted in topics format
|
||||
When I click on "Edit topic name" "link" in the "li#section-1" "css_element"
|
||||
And I set the field "New name for topic Topic 1" to "Midterm evaluation"
|
||||
And I press key "13" in the field "New name for topic Topic 1"
|
||||
Then I should not see "Topic 1" in the "#region-main" "css_element"
|
||||
Then I should not see "Topic 1" in the "region-main" "region"
|
||||
And "New name for topic" "field" should not exist
|
||||
And I should see "Midterm evaluation" in the "li#section-1" "css_element"
|
||||
And I follow "Course 1"
|
||||
And I should not see "Topic 1" in the "#region-main" "css_element"
|
||||
And I should not see "Topic 1" in the "region-main" "region"
|
||||
And I should see "Midterm evaluation" in the "li#section-1" "css_element"
|
||||
|
||||
Scenario: Deleting the last section in topics format
|
||||
|
||||
@@ -124,9 +124,6 @@ class format_weeks extends format_base {
|
||||
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
|
||||
$url->param('section', $sectionno);
|
||||
} else {
|
||||
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
|
||||
return null;
|
||||
}
|
||||
$url->set_anchor('section-'.$sectionno);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +210,7 @@ class format_weeks extends format_base {
|
||||
public function get_default_blocks() {
|
||||
return array(
|
||||
BLOCK_POS_LEFT => array(),
|
||||
BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')
|
||||
BLOCK_POS_RIGHT => array()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ Feature: Sections can be edited and deleted in weeks format
|
||||
When I click on "Edit week name" "link" in the "li#section-1" "css_element"
|
||||
And I set the field "New name for week 1 May - 7 May" to "Midterm evaluation"
|
||||
And I press key "13" in the field "New name for week 1 May - 7 May"
|
||||
Then I should not see "1 May - 7 May" in the "#region-main" "css_element"
|
||||
Then I should not see "1 May - 7 May" in the "region-main" "region"
|
||||
And "New name for week" "field" should not exist
|
||||
And I should see "Midterm evaluation" in the "li#section-1" "css_element"
|
||||
And I follow "Course 1"
|
||||
And I should not see "1 May - 7 May" in the "#region-main" "css_element"
|
||||
And I should not see "1 May - 7 May" in the "region-main" "region"
|
||||
And I should see "Midterm evaluation" in the "li#section-1" "css_element"
|
||||
|
||||
Scenario: Deleting the last section in weeks format
|
||||
|
||||
+25
-20
@@ -3469,7 +3469,7 @@ function course_get_tagged_course_modules($tag, $exclusivemode = false, $fromcon
|
||||
* This function also handles the frontpage course.
|
||||
*
|
||||
* @param stdClass $context context object (it can be a course context or the system context for frontpage settings)
|
||||
* @param stdClass $course the course where the settings are being rendered (only used when $context is set to frontpage)
|
||||
* @param stdClass $course the course where the settings are being rendered
|
||||
* @return stdClass the navigation options in a course and their availability status
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
@@ -3510,6 +3510,30 @@ function course_get_user_navigation_options($context, $course = null) {
|
||||
$options->participants = has_capability('moodle/course:viewparticipants', $context);
|
||||
$options->badges = !empty($CFG->enablebadges) && !empty($CFG->badges_allowcoursebadges) &&
|
||||
has_capability('moodle/badges:viewbadges', $context);
|
||||
// Add view grade report is permitted.
|
||||
$grades = false;
|
||||
|
||||
if (has_capability('moodle/grade:viewall', $context)) {
|
||||
$grades = true;
|
||||
} else if (!empty($course->showgrades)) {
|
||||
$reports = core_component::get_plugin_list('gradereport');
|
||||
if (is_array($reports) && count($reports) > 0) { // Get all installed reports.
|
||||
arsort($reports); // User is last, we want to test it first.
|
||||
foreach ($reports as $plugin => $plugindir) {
|
||||
if (has_capability('gradereport/'.$plugin.':view', $context)) {
|
||||
// Stop when the first visible plugin is found.
|
||||
$grades = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$options->grades = $grades;
|
||||
}
|
||||
|
||||
if (\core_competency\api::is_enabled()) {
|
||||
$capabilities = array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencymanage');
|
||||
$options->competencies = has_any_capability($capabilities, $context);
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
@@ -3545,25 +3569,6 @@ function course_get_user_administration_options($course, $context) {
|
||||
$options->publish = has_capability('moodle/course:publish', $context);
|
||||
$options->reset = has_capability('moodle/course:reset', $context);
|
||||
$options->roles = has_capability('moodle/role:switchroles', $context);
|
||||
|
||||
// Add view grade report is permitted.
|
||||
$grades = false;
|
||||
if (has_capability('moodle/grade:viewall', $context)) {
|
||||
$grades = true;
|
||||
} else if (!empty($course->showgrades)) {
|
||||
$reports = core_component::get_plugin_list('gradereport');
|
||||
if (is_array($reports) && count($reports) > 0) { // Get all installed reports.
|
||||
arsort($reports); // User is last, we want to test it first.
|
||||
foreach ($reports as $plugin => $plugindir) {
|
||||
if (has_capability('gradereport/'.$plugin.':view', $context)) {
|
||||
// Stop when the first visible plugin is found.
|
||||
$grades = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$options->grades = $grades;
|
||||
} else {
|
||||
// Set default options to false.
|
||||
$listofoptions = array('tags', 'gradebook', 'outcomes', 'badges', 'import', 'publish', 'reset', 'roles', 'grades');
|
||||
|
||||
+19
-2
@@ -46,9 +46,11 @@ if (strpos($returnurl, '?') === false) {
|
||||
$returnurl = clean_param($returnurl, PARAM_URL);
|
||||
}
|
||||
|
||||
$PAGE->set_url('/course/switchrole.php', array('id'=>$id));
|
||||
$PAGE->set_url('/course/switchrole.php', array('id'=>$id, 'switchrole'=>$switchrole));
|
||||
|
||||
require_sesskey();
|
||||
if ($switchrole >= 0) {
|
||||
require_sesskey();
|
||||
}
|
||||
|
||||
if (!$course = $DB->get_record('course', array('id'=>$id))) {
|
||||
redirect(new moodle_url('/'));
|
||||
@@ -70,6 +72,21 @@ if ($switchrole > 0 && has_capability('moodle/role:switchroles', $context)) {
|
||||
if (is_array($aroles) && isset($aroles[$switchrole])) {
|
||||
role_switch($switchrole, $context);
|
||||
}
|
||||
} else if ($switchrole < 0) {
|
||||
|
||||
$PAGE->set_title(get_string('switchroleto'));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('switchroleto'));
|
||||
|
||||
require_once($CFG->dirroot.'/course/switchrole_form.php');
|
||||
$form = new switchrole_form(null, ['course' => $course]);
|
||||
$form->display();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
redirect($returnurl);
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Switch roles form.
|
||||
*
|
||||
* @package core_course
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir.'/formslib.php');
|
||||
|
||||
/**
|
||||
* Defines the course completion settings form.
|
||||
*/
|
||||
class switchrole_form extends moodleform {
|
||||
|
||||
/**
|
||||
* Determine whether the user is assuming another role
|
||||
*
|
||||
* This function checks to see if the user is assuming another role by means of
|
||||
* role switching. In doing this we compare each RSW key (context path) against
|
||||
* the current context path. This ensures that we can provide the switching
|
||||
* options against both the course and any page shown under the course.
|
||||
*
|
||||
* @param context $context
|
||||
* @return bool|int The role(int) if the user is in another role, false otherwise
|
||||
*/
|
||||
protected function in_alternative_role($context) {
|
||||
global $USER, $PAGE;
|
||||
if (!empty($USER->access['rsw']) && is_array($USER->access['rsw'])) {
|
||||
if (!empty($PAGE->context) && !empty($USER->access['rsw'][$PAGE->context->path])) {
|
||||
return $USER->access['rsw'][$PAGE->context->path];
|
||||
}
|
||||
foreach ($USER->access['rsw'] as $key=>$role) {
|
||||
if (strpos($context->path, $key)===0) {
|
||||
return $role;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the form fields.
|
||||
*/
|
||||
public function definition() {
|
||||
global $USER, $CFG, $DB;
|
||||
|
||||
$mform = $this->_form;
|
||||
$course = $this->_customdata['course'];
|
||||
|
||||
// Overall criteria aggregation.
|
||||
$context = context_course::instance($course->id);
|
||||
$roles = array();
|
||||
$assumedrole = -1;
|
||||
if (is_role_switched($course->id)) {
|
||||
$roles[0] = get_string('switchrolereturn');
|
||||
$assumedrole = $USER->access['rsw'][$context->path];
|
||||
}
|
||||
$availableroles = get_switchable_roles($context);
|
||||
if (is_array($availableroles)) {
|
||||
foreach ($availableroles as $key=>$role) {
|
||||
if ($assumedrole == (int)$key) {
|
||||
continue;
|
||||
}
|
||||
$roles[$key] = $role;
|
||||
}
|
||||
}
|
||||
$mform->addElement('select', 'switchrole', get_string('role'), $roles);
|
||||
|
||||
// Add common action buttons.
|
||||
$this->add_action_buttons();
|
||||
|
||||
// Add hidden fields.
|
||||
$mform->addElement('hidden', 'id', $course->id);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
}
|
||||
}
|
||||
@@ -650,7 +650,7 @@ class behat_course extends behat_base {
|
||||
// It should not exist at all.
|
||||
try {
|
||||
$this->find_link($activityname);
|
||||
throw new ExpectationException('The "' . $activityname . '" should not appear');
|
||||
throw new ExpectationException('The "' . $activityname . '" should not appear', $this->getSession());
|
||||
} catch (ElementNotFoundException $e) {
|
||||
// This is good, the activity should not be there.
|
||||
}
|
||||
|
||||
@@ -315,4 +315,4 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be visible "CAT2"
|
||||
And category in management listing should be visible "CAT3"
|
||||
And course in management listing should be dimmed "C1"
|
||||
And course in management listing should be dimmed "C1"
|
||||
|
||||
@@ -209,4 +209,4 @@ Feature: Test we can resort categories in the management interface.
|
||||
And I should see category listing "Cat 1" before "Cat 1b"
|
||||
And I should see category listing "Cat 1b" before "Cat 1c"
|
||||
And I should see category listing "Cat 1c" before "Cat 1a"
|
||||
And I should see category listing "Cat 1a" before "Cat 2"
|
||||
And I should see category listing "Cat 1a" before "Cat 2"
|
||||
|
||||
@@ -95,7 +95,7 @@ Feature: We can change the visibility of courses in the management interface.
|
||||
And I toggle visibility of category "CAT1" in management listing
|
||||
And I toggle visibility of course "C1" in management listing
|
||||
And I click on "Course categories and courses" "link" in the ".view-mode-selector" "css_element"
|
||||
And I click on "Courses" "link"
|
||||
And I click on "Courses" "link" in the ".view-mode-selector" "css_element"
|
||||
And a new page should have loaded since I started watching
|
||||
And I start watching to see if a new page loads
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
|
||||
@@ -29,16 +29,8 @@ Feature: Course activity controls works as expected
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
When I follow <targetpage>
|
||||
And I press "Turn editing on"
|
||||
Then I should see "Turn editing off"
|
||||
And I press "Turn editing off"
|
||||
And "Turn editing on" "button" should exist
|
||||
And I follow "Turn editing on"
|
||||
And "Turn editing off" "button" should exist
|
||||
And I follow "Turn editing off"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "button" should exist
|
||||
And I turn editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I open the action menu in "Recent activity" "block"
|
||||
And I click on "Delete Recent activity block" "link"
|
||||
And I press "Yes"
|
||||
@@ -68,7 +60,7 @@ Feature: Course activity controls works as expected
|
||||
And I click on "Hide" "link" in the "Test forum name 1" activity
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And I delete "Test forum name 1" activity
|
||||
And I should not see "Test forum name 1" in the "#region-main" "css_element"
|
||||
And I should not see "Test forum name 1" in the "region-main" "region"
|
||||
And I duplicate "Test forum name 2" activity editing the new copy with:
|
||||
| Forum name | Edited test forum name 2 |
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
@@ -109,16 +101,8 @@ Feature: Course activity controls works as expected
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
When I follow <targetpage>
|
||||
And I press "Turn editing on"
|
||||
Then I should see "Turn editing off"
|
||||
And I press "Turn editing off"
|
||||
And "Turn editing on" "button" should exist
|
||||
And I follow "Turn editing on"
|
||||
And "Turn editing off" "button" should exist
|
||||
And I follow "Turn editing off"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "button" should exist
|
||||
And I turn editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I open the action menu in "Recent activity" "block"
|
||||
And I click on "Delete Recent activity block" "link"
|
||||
And I press "Yes"
|
||||
@@ -143,7 +127,7 @@ Feature: Course activity controls works as expected
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And I delete "Test forum name 1" activity
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And I should not see "Test forum name 1" in the "#region-main" "css_element"
|
||||
And I should not see "Test forum name 1" in the "region-main" "region"
|
||||
And I duplicate "Test forum name 2" activity editing the new copy with:
|
||||
| Forum name | Edited test forum name 2 |
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
|
||||
@@ -19,6 +19,8 @@ Feature: Managers can create courses
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Latest announcements" block
|
||||
Then "Latest announcements" "block" should exist
|
||||
And I follow "Announcements"
|
||||
And "Add a new topic" "button" should exist
|
||||
@@ -52,8 +54,10 @@ Feature: Managers can create courses
|
||||
| id_enddate_year | 2016 |
|
||||
And I press "Save and return"
|
||||
Then I should see the "Course categories and courses" management page
|
||||
And I click on "Sort courses" "link"
|
||||
And I click on "Sort by Course time created ascending" "link" in the ".course-listing-actions" "css_element"
|
||||
And I should see course listing "Course 1" before "Course 2"
|
||||
And I follow "Course 2"
|
||||
And I click on "Course 2" "link" in the "region-main" "region"
|
||||
And I click on "Edit" "link" in the ".course-detail" "css_element"
|
||||
And the following fields match these values:
|
||||
| Course full name | Course 2 |
|
||||
|
||||
@@ -17,6 +17,7 @@ Feature: Activities can be moved between sections
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I follow "Delete Recent activity block"
|
||||
And I press "Yes"
|
||||
And I follow "Configure Navigation block"
|
||||
|
||||
@@ -34,7 +34,7 @@ Feature: Browse course list and return back from enrolment page
|
||||
Scenario: A user can return to the previous page from enrolment page by clicking navigation links
|
||||
When I log in as "user2"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Edit profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I expand "Courses" node
|
||||
And I expand "Sample category" node
|
||||
And I follow "Course 1"
|
||||
|
||||
@@ -575,10 +575,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$sectioncreated = $DB->record_exists('course_sections', array('course' => $created->id, 'section' => 0));
|
||||
$this->assertTrue($sectioncreated);
|
||||
|
||||
// Ensure blocks have been associated to the course.
|
||||
$blockcount = $DB->count_records('block_instances', array('parentcontextid' => $context->id));
|
||||
$this->assertGreaterThan(0, $blockcount);
|
||||
|
||||
// Ensure that the shortname isn't duplicated.
|
||||
try {
|
||||
$created = create_course($course);
|
||||
@@ -3085,7 +3081,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertTrue($adminoptions->publish);
|
||||
$this->assertTrue($adminoptions->reset);
|
||||
$this->assertTrue($adminoptions->roles);
|
||||
$this->assertTrue($adminoptions->grades);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3118,7 +3113,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
$this->assertTrue($adminoptions->grades);
|
||||
|
||||
$CFG->enablebadges = false;
|
||||
$adminoptions = course_get_user_administration_options($course, $context);
|
||||
|
||||
@@ -558,6 +558,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$coursedata['summary'] = 'Course 1 description';
|
||||
$coursedata['summaryformat'] = FORMAT_MOODLE;
|
||||
$course1 = self::getDataGenerator()->create_course($coursedata);
|
||||
|
||||
$generatedcourses[$course1->id] = $course1;
|
||||
$course2 = self::getDataGenerator()->create_course();
|
||||
$generatedcourses[$course2->id] = $course2;
|
||||
@@ -642,8 +643,17 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$generatedcourses = array();
|
||||
$coursedata1['fullname'] = 'FIRST COURSE';
|
||||
$course1 = self::getDataGenerator()->create_course($coursedata1);
|
||||
|
||||
$page = new moodle_page();
|
||||
$page->set_course($course1);
|
||||
$page->blocks->add_blocks([BLOCK_POS_LEFT => ['news_items'], BLOCK_POS_RIGHT => []], 'course-view-*');
|
||||
|
||||
$coursedata2['fullname'] = 'SECOND COURSE';
|
||||
$course2 = self::getDataGenerator()->create_course($coursedata2);
|
||||
|
||||
$page = new moodle_page();
|
||||
$page->set_course($course2);
|
||||
$page->blocks->add_blocks([BLOCK_POS_LEFT => ['news_items'], BLOCK_POS_RIGHT => []], 'course-view-*');
|
||||
// Search by name.
|
||||
$results = core_course_external::search_courses('search', 'FIRST');
|
||||
$results = external_api::clean_returnvalue(core_course_external::search_courses_returns(), $results);
|
||||
@@ -1842,7 +1852,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$navoptions->{$option['name']} = $option['available'];
|
||||
}
|
||||
if ($course['id'] == SITEID) {
|
||||
$this->assertCount(7, $course['options']);
|
||||
$this->assertCount(8, $course['options']);
|
||||
$this->assertTrue($navoptions->blogs);
|
||||
$this->assertFalse($navoptions->notes);
|
||||
$this->assertFalse($navoptions->participants);
|
||||
@@ -1850,12 +1860,15 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertTrue($navoptions->tags);
|
||||
$this->assertFalse($navoptions->search);
|
||||
$this->assertTrue($navoptions->calendar);
|
||||
$this->assertTrue($navoptions->competencies);
|
||||
} else {
|
||||
$this->assertCount(4, $course['options']);
|
||||
$this->assertCount(6, $course['options']);
|
||||
$this->assertTrue($navoptions->blogs);
|
||||
$this->assertFalse($navoptions->notes);
|
||||
$this->assertTrue($navoptions->participants);
|
||||
$this->assertTrue($navoptions->badges);
|
||||
$this->assertTrue($navoptions->grades);
|
||||
$this->assertTrue($navoptions->competencies);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1905,9 +1918,8 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
$this->assertFalse($adminoptions->grades);
|
||||
} else {
|
||||
$this->assertCount(15, $course['options']);
|
||||
$this->assertCount(14, $course['options']);
|
||||
$this->assertFalse($adminoptions->update);
|
||||
$this->assertFalse($adminoptions->filters);
|
||||
$this->assertFalse($adminoptions->reports);
|
||||
@@ -1922,7 +1934,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
$this->assertTrue($adminoptions->grades);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -149,9 +149,10 @@ switch ($mode) {
|
||||
if ($course->id == SITEID) {
|
||||
$activenode = $PAGE->navigation->find('user' . $user->id, null);
|
||||
} else {
|
||||
$currentcoursenode = $PAGE->navigation->find('currentcourse', null);
|
||||
$currentcoursenode = $PAGE->navigation->find($course->id, navigation_node::TYPE_COURSE);
|
||||
$activenode = $currentcoursenode->find_active_node();
|
||||
}
|
||||
|
||||
// Check to see if the active node is a user name.
|
||||
if (!preg_match('/^user\d{0,}$/', $activenode->key)) { // No user name found.
|
||||
$userurl = new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $course->id));
|
||||
|
||||
@@ -20,16 +20,16 @@ Feature: Manage enrollments from participants page
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Participants" node in "Current course > C1"
|
||||
And I navigate to "Participants" node in "My courses > C1"
|
||||
|
||||
Scenario: Check the participants link when "All partipants" selected
|
||||
Given I select "All participants" from the "roleid" singleselect
|
||||
When I follow "Edit"
|
||||
When I click on "Edit" "link" in the "region-main" "region"
|
||||
Then I should see "Enrolled users" in the "h2" "css_element"
|
||||
And the field "Role" matches value "All"
|
||||
|
||||
Scenario: Check the participants link when "Student" selected
|
||||
Given I select "Student" from the "roleid" singleselect
|
||||
When I follow "Edit"
|
||||
When I click on "Edit" "link" in the "region-main" "region"
|
||||
Then I should see "Enrolled users" in the "h2" "css_element"
|
||||
And the field "Role" matches value "Student"
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Course files
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
Then I should see "Legacy course files"
|
||||
And I follow "Legacy course files"
|
||||
And I navigate to "Legacy course files" node in "Course administration"
|
||||
And I press "Edit legacy course files"
|
||||
And "Add..." "link" should be visible
|
||||
And "Create folder" "link" should be visible
|
||||
@@ -33,7 +33,7 @@ Feature: Course files
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
Then I should see "Legacy course files"
|
||||
And I follow "Legacy course files"
|
||||
And I navigate to "Legacy course files" node in "Course administration"
|
||||
And I press "Edit legacy course files"
|
||||
And "Add..." "link" should not be visible
|
||||
And "Create folder" "link" should not be visible
|
||||
|
||||
@@ -22,7 +22,7 @@ Feature: I need to export grades as text
|
||||
| assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||
And I press "Save changes"
|
||||
@@ -76,4 +76,4 @@ Feature: I need to export grades as text
|
||||
And I should see "80.00 %"
|
||||
And I should see "B-"
|
||||
And I should not see "40.00 %"
|
||||
And I should not see ",F,"
|
||||
And I should not see ",F,"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: I need to export grades as xml
|
||||
| assign | C1 | a1 | Test assignment name | Submit something! |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||
And I press "Save changes"
|
||||
|
||||
@@ -55,7 +55,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 0 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should not see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -107,7 +107,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -142,7 +142,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -162,7 +162,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
Then I should not see a grade field for "Student 2" and grade item "Item VL"
|
||||
And I should not see a feedback field for "Student 2" and grade item "Item VL"
|
||||
@@ -193,7 +193,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers:
|
||||
|
||||
@@ -46,7 +46,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
|
||||
@@ -60,7 +60,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I open "Test assignment name 2" actions menu
|
||||
And I click on "Hide" "link" in the "Test assignment name 2" activity
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
@@ -97,7 +97,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
|
||||
@@ -30,7 +30,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Rewarding assignment |
|
||||
| Description | After writing your behat test go grab a beer! |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever"
|
||||
And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment"
|
||||
@@ -40,7 +40,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I log out
|
||||
And I log in as "teacher2"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever"
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment"
|
||||
|
||||
@@ -52,7 +52,7 @@ Feature: We can use Single view
|
||||
| gradereport/singleview:view | Allow | teacher | Course | C1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: I can update grades, add feedback and exclude grades.
|
||||
@@ -97,7 +97,7 @@ Feature: We can use Single view
|
||||
And I log out
|
||||
And I log in as "teacher2"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on "Single view" "option"
|
||||
And I click on "Student 4" "option"
|
||||
And the "Exclude for Test assignment one" "checkbox" should be disabled
|
||||
|
||||
@@ -35,7 +35,7 @@ Feature: View the user report as the student will see it
|
||||
And I navigate to "Gradebook setup" node in "Course administration"
|
||||
And I hide the grade item "Test assignment six"
|
||||
And I hide the grade item "Sub category 2"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
@@ -83,7 +83,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | - | 80.00 | 0–100 | 80.00 % | - |
|
||||
@@ -121,7 +121,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 26.67 % |
|
||||
@@ -159,7 +159,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % |
|
||||
@@ -204,7 +204,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % |
|
||||
|
||||
@@ -12,7 +12,7 @@ Feature: We can use the user report
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I select "All users (0)" from the "Select all or one user" singleselect
|
||||
Then I should see "No students enrolled in this course yet"
|
||||
|
||||
@@ -20,7 +20,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
|
||||
@javascript
|
||||
@@ -32,7 +32,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on "Edit assign Assignment1" "link"
|
||||
And I should not see "Minimum grade"
|
||||
|
||||
@@ -44,7 +44,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then "Edit calculation for Course total" "link" should not exist
|
||||
|
||||
@javascript
|
||||
@@ -55,5 +55,5 @@ Feature: Site settings can be used to hide parts of the gradebook UI
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And "tr .course input[type='text']" "css_element" should not exist
|
||||
|
||||
@@ -42,7 +42,7 @@ Feature: We can use calculated grade totals
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
@@ -253,12 +253,12 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
Then I should see "114.82 (18.27 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I set the following settings for grade item "Test outcome item one":
|
||||
@@ -267,12 +267,12 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
Then I should see "114.00 (18.39 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I set the following settings for grade item "Course 1":
|
||||
@@ -282,7 +282,7 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
Then I should see "110.00 (17.74 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
|
||||
|
||||
Scenario: Natural aggregation on outcome items with modified weights
|
||||
@@ -297,7 +297,7 @@ Feature: We can use calculated grade totals
|
||||
And the following "grade items" exist:
|
||||
| itemname | course | outcome | gradetype | scale |
|
||||
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I set the following settings for grade item "Course 1":
|
||||
@@ -318,7 +318,7 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
Then I should see "4.00 (100.00 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
|
||||
|
||||
Scenario: Natural aggregation
|
||||
@@ -363,7 +363,7 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
And I should see "113.75 (23.45 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Contribution to course total |
|
||||
| Test assignment six | 70.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % |
|
||||
@@ -379,7 +379,7 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I set the following settings for grade item "Sub category 1":
|
||||
| Aggregation | Natural |
|
||||
@@ -553,7 +553,7 @@ Feature: We can use calculated grade totals
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
And I should see "45.00 (13.85 %)" in the "overview-grade" "table"
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
| Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % |
|
||||
|
||||
@@ -35,7 +35,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I turn editing mode on
|
||||
And I follow "Edit Cat mean"
|
||||
|
||||
@@ -24,7 +24,7 @@ Feature: Average grades are displayed in the gradebook
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
# Enable averages
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I set the following fields to these values:
|
||||
| Show average | Show |
|
||||
@@ -52,7 +52,7 @@ Feature: Average grades are displayed in the gradebook
|
||||
|
||||
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
|
||||
# Check the admin grade table
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then I should see "50.00" in the ".avg.r0.lastrow .c1" "css_element"
|
||||
Then I should see "50.00" in the ".avg.r0.lastrow .c2" "css_element"
|
||||
And I log out
|
||||
@@ -61,7 +61,7 @@ Feature: Average grades are displayed in the gradebook
|
||||
And I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
Then I should see "50.00" in the ".level2.column-grade" "css_element"
|
||||
Then I should see "50.00" in the ".level2.column-average" "css_element"
|
||||
And I log out
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Calculated grade items can be used in the gradebook
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -22,7 +22,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -30,7 +30,7 @@ Feature: We can understand the gradebook user report
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
|
||||
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
@@ -47,7 +47,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1"
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2"
|
||||
|
||||
@@ -22,7 +22,7 @@ Feature: We can change the maximum and minimum number of points for manual items
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
@@ -37,7 +37,7 @@ Feature: We can change the maximum and minimum number of points for manual items
|
||||
|
||||
Scenario: Change maximum number of points on a graded item.
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1"
|
||||
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1"
|
||||
|
||||
@@ -35,7 +35,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
|
||||
When I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three"
|
||||
@@ -44,7 +44,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
|
||||
| Hidden | 1 |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
@@ -57,7 +57,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
|
||||
When I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "User report" node in "Grade administration"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -22,7 +22,7 @@ Feature: We can customise the letter boundary of a course.
|
||||
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Course grade settings" from the "Grade report" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Grade display type | Letter |
|
||||
|
||||
@@ -23,7 +23,7 @@ Feature: We can customise the letter boundary of a course.
|
||||
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Course grade settings" from the "Grade report" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Grade display type | Letter |
|
||||
|
||||
@@ -27,7 +27,7 @@ Feature: We can use a minimum grade different than zero
|
||||
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
@@ -86,7 +86,7 @@ Feature: We can use a minimum grade different than zero
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1"
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 2"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| grade_minmaxtouse | Min and max grades as specified in grade item settings |
|
||||
And I am on site homepage
|
||||
And I follow "C1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
@@ -68,7 +68,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "C1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1"
|
||||
And I give the grade "25.00" to the user "Student 1" for the grade item "MI 2"
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I set the following settings for grade item "Test assignment four (extra)":
|
||||
| Extra credit | 1 |
|
||||
@@ -34,7 +34,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden and student has all grades present
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -56,7 +56,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden, student has some grades present
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -77,7 +77,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden, student has none grades present except for extra credit
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
@@ -102,7 +102,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
| Extra credit | 1 |
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit | 1 |
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -126,7 +126,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -151,7 +151,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -175,7 +175,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
@@ -199,7 +199,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -226,7 +226,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -252,7 +252,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I set the following settings for grade item "Test assignment four (extra)":
|
||||
| Extra credit | 1 |
|
||||
@@ -35,7 +35,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden and student has all grades present (before the fix 20150619)
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -57,7 +57,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden, student has some grades present (before the fix 20150619)
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -78,7 +78,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
|
||||
@javascript
|
||||
Scenario: No weights are overridden, student has none grades present except for extra credit (before the fix 20150619)
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
@@ -103,7 +103,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
| Extra credit | 1 |
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit | 1 |
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -127,7 +127,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -153,7 +153,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -178,7 +178,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
When I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "50"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
@@ -202,7 +202,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -230,7 +230,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
|
||||
@@ -257,7 +257,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
And I set the field "Override weight of Test assignment four (extra)" to "1"
|
||||
And I set the field "Weight of Test assignment four (extra)" to "10"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Grades" node in "Course administration"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
|
||||
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
|
||||
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -33,7 +33,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
|
||||
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Grade letters can be overridden
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "Letters"
|
||||
And I follow "Edit grade letters"
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ Feature: View gradebook when scales are used
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
@@ -108,7 +108,7 @@ Feature: View gradebook when scales are used
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Grades" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | B | F–A | 75.00 % | 80.00 % |
|
||||
@@ -154,7 +154,7 @@ Feature: View gradebook when scales are used
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "Grades" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | B | F–A | 75.00 % | <contrib2> |
|
||||
|
||||
@@ -39,7 +39,7 @@ Feature: Control the aggregation of the scales
|
||||
Scenario Outline: Scales can be excluded from aggregation
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
When I give the grade "10" to the user "Student 1" for the grade item "Grade me"
|
||||
And I give the grade "B" to the user "Student 1" for the grade item "Scale me"
|
||||
@@ -60,7 +60,7 @@ Feature: Control the aggregation of the scales
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "User report"
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
@@ -85,7 +85,7 @@ Feature: Control the aggregation of the scales
|
||||
Scenario: Weights of scales cannot be edited when they are not aggregated
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
When I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
@@ -100,7 +100,7 @@ Feature: Control the aggregation of the scales
|
||||
And the following config values are set as admin:
|
||||
| grade_includescalesinaggregation | 1 |
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I set the field "Override weight of Grade me" to "1"
|
||||
And the field "Override weight of Grade me" matches value "95.238"
|
||||
|
||||
@@ -49,7 +49,7 @@ Feature: View gradebook when single item scales are used
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
|
||||
@@ -54,7 +54,7 @@ Feature: We can set the grade to pass value
|
||||
| grade[modgrade_type] | Point |
|
||||
| grade[modgrade_point] | 50 |
|
||||
| Grade to pass | 25 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit assign Test Assignment 1" "link"
|
||||
Then the field "Grade to pass" matches value "25"
|
||||
@@ -64,7 +64,7 @@ Feature: We can set the grade to pass value
|
||||
And I expand all fieldsets
|
||||
And I set the field "Grade to pass" to "30"
|
||||
And I press "Save and return to course"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on "Edit assign Test Assignment 1" "link"
|
||||
And the field "Grade to pass" matches value "30"
|
||||
|
||||
@@ -76,7 +76,7 @@ Feature: We can set the grade to pass value
|
||||
| grade[modgrade_type] | Scale |
|
||||
| grade[modgrade_scale] | Test Scale 1 |
|
||||
| Grade to pass | 3 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit assign Test Assignment 1" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -107,7 +107,7 @@ Feature: We can set the grade to pass value
|
||||
| Submission grade to pass | 40 |
|
||||
| gradinggrade | 20 |
|
||||
| Assessment grade to pass | 10 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit workshop Test Workshop 1 (submission)" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -142,7 +142,7 @@ Feature: We can set the grade to pass value
|
||||
And I add a "Quiz" to section "1" and I fill the form with:
|
||||
| Name | Test Quiz 1 |
|
||||
| Grade to pass | 9.5 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit quiz Test Quiz 1" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -160,7 +160,7 @@ Feature: We can set the grade to pass value
|
||||
| Name | Test Lesson 1 |
|
||||
| Description | Test |
|
||||
| Grade to pass | 90 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit lesson Test Lesson 1" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -179,7 +179,7 @@ Feature: We can set the grade to pass value
|
||||
| Description | Test |
|
||||
| Aggregate type | Average of ratings |
|
||||
| Grade to pass | 90 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit data Test Database 1" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -208,7 +208,7 @@ Feature: We can set the grade to pass value
|
||||
| Description | Test |
|
||||
| Aggregate type | Average of ratings |
|
||||
| Grade to pass | 90 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit forum Test Forum 1" "link"
|
||||
And I expand all fieldsets
|
||||
@@ -227,7 +227,7 @@ Feature: We can set the grade to pass value
|
||||
| Description | Test |
|
||||
| Aggregate type | Average of ratings |
|
||||
| Grade to pass | 90 |
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit glossary Test Glossary 1" "link"
|
||||
And I expand all fieldsets
|
||||
|
||||
@@ -51,7 +51,7 @@ Feature: We can enter in grades and view reports from the gradebook
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
|
||||
@@ -66,7 +66,7 @@ Feature: We can enter in grades and view reports from the gradebook
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Percentage |
|
||||
| Test assignment name 1 | 80.00 | 0–100 | 80.00 % |
|
||||
@@ -93,7 +93,7 @@ Feature: We can enter in grades and view reports from the gradebook
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Grades" in the user menu
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage |
|
||||
| Test assignment name 1 | 41.86 % | 80.00 | 0–100 | 80.00 % |
|
||||
|
||||
@@ -150,4 +150,4 @@ Feature: Automatic updating of groups and groupings
|
||||
And I set the following fields to these values:
|
||||
| Enrolment key | Abcdef-1 |
|
||||
And I press "Save changes"
|
||||
And I should not see "This enrolment key is already used for another group."
|
||||
And I should not see "This enrolment key is already used for another group."
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user