MDL-77033 core_behat: Fix behat tests.

This commit is contained in:
Ilya Tregubov 2023-03-06 11:27:17 +08:00
parent 11b6dce50c
commit 013cf3b741
28 changed files with 238 additions and 436 deletions

View File

@ -330,22 +330,22 @@ Feature: Set up contextual data for tests
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Grade Item 1"
And I open the action menu in "Test Grade Item 1" "table_row"
And I choose "Edit" in the open action menu
And I click on grade item menu "Test Grade Item 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I expand all fieldsets
And I should see "Course 1"
And I press "Cancel"
And I should see "Grade category 1"
And I should see "Test Grade Item 2"
And I open the action menu in "Test Grade Item 2" "table_row"
And I choose "Edit" in the open action menu
And I click on grade item menu "Test Grade Item 2" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I expand all fieldsets
And I should see "Grade category 1"
And I press "Cancel"
And I should see "Grade sub category 2"
And I should see "Test Grade Item 3"
And I open the action menu in "Test Grade Item 3" "table_row"
And I choose "Edit" in the open action menu
And I click on grade item menu "Test Grade Item 3" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I expand all fieldsets
And I should see "Grade sub category 2"
And I press "Cancel"
@ -410,8 +410,8 @@ Feature: Set up contextual data for tests
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Outcome Grade Item 1"
And I open the action menu in "Test Outcome Grade Item 1" "table_row"
And I choose "Edit" in the open action menu
And I click on grade item menu "Test Outcome Grade Item 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And the field "Outcome" matches value "Grade outcome 1"
And I expand all fieldsets
And I should see "Grade category 1" in the "Grade category" "form_row"

View File

@ -59,7 +59,7 @@ Feature: Students will be shown relevant completion state based on grade item vi
Scenario: Passing grade and receive a grade completions for hidden grade item (passgrade completion enabled)
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I hide the grade item "Test assignment name"
And I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
@ -119,7 +119,7 @@ Feature: Students will be shown relevant completion state based on grade item vi
And I log out
And I am on the "Course 1" course page logged in as teacher1
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I hide the grade item "Test assignment name"
And I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"

View File

@ -24,7 +24,7 @@ namespace gradereport_overview;
* @covers \grade_report_overview
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class lib_test extends \externallib_advanced_testcase {
class lib_test extends \advanced_testcase {
/**
* Require the library file we're about to test, and other requirements.

View File

@ -34,8 +34,8 @@ Feature: View the user report as the student will see it
And the "multilang" filter applies to "content and headings"
When I am on the "C1" "Course" page logged in as "teacher1"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I hide the grade item "Test assignment six"
And I hide the grade item "Sub category 2"
And I hide the grade item "Test assignment six" of type "gradeitem" on "setup" page
And I hide the grade item "Sub category 2" of type "category" on "setup" page
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I change window size to "large"

View File

@ -51,54 +51,51 @@ class behat_grade extends behat_base {
*
* Teacher must be either on the grade setup page or on the Grader report page with editing mode turned on.
*
* @Given /^I set the following settings for grade item "(?P<grade_item_string>(?:[^"]|\\")*)":$/
* @Given /^I set the following settings for grade item "(?P<grade_item_string>(?:[^"]|\\")*)" of type "([^"]*)" on "([^"]*)" page:$/
* @param string $gradeitem
* @param string $type
* @param string $page
* @param TableNode $data
*/
public function i_set_the_following_settings_for_grade_item($gradeitem, TableNode $data) {
$gradeitem = behat_context_helper::escape($gradeitem);
public function i_set_the_following_settings_for_grade_item(string $gradeitem, string $type, string $page, TableNode $data) {
if ($this->running_javascript()) {
$xpath = "//tr[contains(.,$gradeitem)]//*[contains(@class,'moodle-actionmenu')][not(contains(@class,'grader'))]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$this->execute("behat_action_menu::i_open_the_action_menu_in",
array("//tr[contains(.,$gradeitem)]",
"xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, $type, $page]);
}
$savechanges = get_string('savechanges', 'grades');
$edit = behat_context_helper::escape(get_string('edit') . ' ');
$linkxpath = "//a[./*[contains(concat(' ', normalize-space(@class), ' '), ' icon ') " .
"and starts-with(@title,$edit) and contains(@title,$gradeitem)]]";
if ($type == 'gradeitem') {
$linktext = get_string('itemsedit', 'grades');
} else if ($type == 'category') {
$linktext = get_string('categoryedit', 'grades');
} else {
$linktext = get_string('categoryedit', 'grades');
}
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", $linktext);
$this->execute("behat_general::i_click_on", array($this->escape($linkxpath), "xpath_element"));
$savechanges = get_string('savechanges', 'grades');
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $data);
$this->execute('behat_forms::press_button', $this->escape($savechanges));
}
/**
* Hids a grade item or category.
* Hids a grade item or category on gradebook setup or grader page.
*
* Teacher must be on the grade setup page.
*
* @Given /^I hide the grade item "(?P<grade_item_string>(?:[^"]|\\")*)"$/
* @Given /^I hide the grade item "(?P<grade_item_string>(?:[^"]|\\")*)" of type "([^"]*)" on "([^"]*)" page$/
* @param string $gradeitem
* @param string $type
* @param string $page
*/
public function i_hide_the_grade_item($gradeitem) {
public function i_hide_the_grade_item(string $gradeitem, string $type, string $page) {
$gradeitem = behat_context_helper::escape($gradeitem);
$linktext = get_string('hide');
if ($this->running_javascript()) {
$xpath = "//tr[contains(.,$gradeitem)]//*[contains(@class,'moodle-actionmenu')]//a[contains(@class,'dropdown-toggle')]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$this->execute("behat_general::i_click_on", array($this->escape($xpath), "xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, $type, $page]);
}
$this->execute("behat_general::i_click_on_in_the", array(get_string('hide'), 'link',
"//tr[descendant::*[text() = " . $this->escape($gradeitem) . "]]", 'xpath_element'));
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", $linktext);
}
/**
@ -109,19 +106,14 @@ class behat_grade extends behat_base {
* @Given /^I duplicate the grade item "(?P<grade_item_string>(?:[^"]|\\")*)"$/
* @param string $gradeitem
*/
public function i_duplicate_the_grade_item($gradeitem) {
$gradeitem = behat_context_helper::escape($gradeitem);
public function i_duplicate_the_grade_item(string $gradeitem) {
$linktext = get_string('duplicate');
if ($this->running_javascript()) {
$xpath = "//tr[contains(.,$gradeitem)]//*[contains(@class,'moodle-actionmenu')]//a[contains(@class,'dropdown-toggle')]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$this->execute("behat_general::i_click_on", array($this->escape($xpath), "xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, 'gradeitem', 'setup']);
}
$this->execute("behat_general::i_click_on_in_the", array(get_string('duplicate'), 'link',
"//tr[descendant::*[text() = " . $this->escape($gradeitem) . "]]", 'xpath_element'));
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", $linktext);
}
/**
@ -135,23 +127,14 @@ class behat_grade extends behat_base {
*/
public function i_set_calculation_for_grade_item_with_idnumbers($calculation, $gradeitem, TableNode $data) {
$gradeitem = behat_context_helper::escape($gradeitem);
$edit = get_string('editcalculation', 'grades');
if ($this->running_javascript()) {
$xpath = "//tr[contains(.,$gradeitem)]//*[contains(@class,'moodle-actionmenu')]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$this->execute("behat_action_menu::i_open_the_action_menu_in",
array("//tr[contains(.,$gradeitem)]",
"xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, 'gradeitem', 'setup']);
}
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", $edit);
// Going to edit calculation.
$savechanges = get_string('savechanges', 'grades');
$edit = behat_context_helper::escape(get_string('editcalculation', 'grades'));
$linkxpath = "//a[./*[contains(concat(' ', normalize-space(@class), ' '), ' icon ') " .
"and starts-with(@title,$edit) and contains(@title,$gradeitem)]]";
$this->execute("behat_general::i_click_on", array($this->escape($linkxpath), "xpath_element"));
// Mapping names to idnumbers.
$datahash = $data->getRowsHash();
@ -164,11 +147,11 @@ class behat_grade extends behat_base {
"parent::li[@class='categoryitem' or @class='courseitem']" .
"/parent::ul/parent::li[starts-with(text(),'" . $gradeitem . "')]" .
"]";
$this->execute('behat_forms::i_set_the_field_with_xpath_to', array($inputxpath, $idnumber));
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$inputxpath, $idnumber]);
}
$this->execute('behat_forms::press_button', get_string('addidnumbers', 'grades'));
$this->execute('behat_forms::i_set_the_field_to', array(get_string('calculation', 'grades'), $calculation));
$this->execute('behat_forms::i_set_the_field_to', [get_string('calculation', 'grades'), $calculation]);
$this->execute('behat_forms::press_button', $savechanges);
}
@ -182,25 +165,16 @@ class behat_grade extends behat_base {
* @param string $gradeitem The grade item name.
* @param TableNode $data The grade item name - idnumbers relation.
*/
public function i_set_calculation_for_grade_category_with_idnumbers($calculation, $gradeitem, TableNode $data) {
public function i_set_calculation_for_grade_category_with_idnumbers(string $calculation, string $gradeitem, TableNode $data) {
$gradecategorytotal = behat_context_helper::escape($gradeitem . ' total');
$gradeitem = behat_context_helper::escape($gradeitem);
$edit = get_string('editcalculation', 'grades');
if ($this->running_javascript()) {
$xpath = "//tr[contains(.,$gradecategorytotal)]//*[contains(@class,'moodle-actionmenu')]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$xpath = "//tr[contains(.,$gradecategorytotal)]";
$this->execute("behat_action_menu::i_open_the_action_menu_in", array($xpath, "xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, 'gradeitem', 'setup']);
}
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", $edit);
// Going to edit calculation.
$savechanges = get_string('savechanges', 'grades');
$edit = behat_context_helper::escape(get_string('editcalculation', 'grades'));
$linkxpath = "//a[./*[contains(concat(' ', normalize-space(@class), ' '), ' icon ') " .
"and starts-with(@title,$edit) and contains(@title,$gradeitem)]]";
$this->execute("behat_general::i_click_on", array($this->escape($linkxpath), "xpath_element"));
// Mapping names to idnumbers.
$datahash = $data->getRowsHash();
@ -218,7 +192,7 @@ class behat_grade extends behat_base {
$this->execute('behat_forms::press_button', get_string('addidnumbers', 'grades'));
$this->execute('behat_forms::i_set_the_field_to', array(get_string('calculation', 'grades'), $calculation));
$this->execute('behat_forms::i_set_the_field_to', [get_string('calculation', 'grades'), $calculation]);
$this->execute('behat_forms::press_button', $savechanges);
}
@ -228,23 +202,15 @@ class behat_grade extends behat_base {
* Teacher must be on the grade setup page.
*
* @Given /^I reset weights for grade category "(?P<grade_item_string>(?:[^"]|\\")*)"$/
* @param $gradeitem
* @param string $gradeitem
*/
public function i_reset_weights_for_grade_category($gradeitem) {
$steps = array();
public function i_reset_weights_for_grade_category(string $gradeitem) {
if ($this->running_javascript()) {
$gradeitemliteral = behat_context_helper::escape($gradeitem);
$xpath = "//tr[contains(.,$gradeitemliteral)]//*[contains(@class,'moodle-actionmenu')]";
if ($this->getSession()->getPage()->findAll('xpath', $xpath)) {
$xpath = "//tr[contains(.,$gradeitemliteral)]";
$this->execute("behat_action_menu::i_open_the_action_menu_in", array($xpath, "xpath_element"));
}
$this->execute("behat_grades::i_click_on_grade_item_menu", [$gradeitem, 'category', 'setup']);
}
$linktext = get_string('resetweights', 'grades', (object)array('itemname' => $gradeitem));
$this->execute("behat_general::i_click_on", array($this->escape($linktext), "link"));
$linktext = get_string('resetweightsshort', 'grades');
$this->execute("behat_action_menu::i_choose_in_the_open_action_menu", [$this->escape($linktext), "link"]);
}
/**

View File

@ -53,12 +53,9 @@ Feature: We can use calculated grade totals
And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment nine"
And I press "Save changes"
And I change window size to "large"
And I click on grade item menu "Test assignment two"
And I choose "Hide" in the open action menu
And I click on grade item menu "Test assignment five"
And I choose "Hide" in the open action menu
And I click on grade item menu "Test assignment eight"
And I choose "Hide" in the open action menu
And I hide the grade item "Test assignment two" of type "gradeitem" on "grader" page
And I hide the grade item "Test assignment five" of type "gradeitem" on "grader" page
And I hide the grade item "Test assignment eight" of type "gradeitem" on "grader" page
And I change window size to "medium"
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field "Grade display type" to "Real (percentage)"
@ -66,22 +63,13 @@ Feature: We can use calculated grade totals
Scenario: Mean of grades aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Mean of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Mean of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Mean of grades |
| Exclude empty grades | 0 |
And I press "Save changes"
And I turn editing mode off
Then I should see "30.00 (30.00 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -94,29 +82,17 @@ Feature: We can use calculated grade totals
Scenario: Weighted mean of grades aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Weighted mean of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Weighted mean of grades |
| Item weight | 1 |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Weighted mean of grades |
| Item weight | 1 |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment one &"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment one &" of type "gradeitem" on "grader" page:
| Item weight | 3 |
And I press "Save changes"
And I turn editing mode off
Then I should see "27.14 (27.14 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -129,27 +105,15 @@ Feature: We can use calculated grade totals
Scenario: Simple weighted mean of grades aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Simple weighted mean of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Simple weighted mean of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Simple weighted mean of grades |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment one &"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment one &" of type "gradeitem" on "grader" page:
| Extra credit | 1 |
And I press "Save changes"
And I turn editing mode off
Then I should see "45.19 (45.19 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -162,27 +126,15 @@ Feature: We can use calculated grade totals
Scenario: Mean of grades (with extra credits) aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Mean of grades (with extra credits) |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Mean of grades (with extra credits) |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Mean of grades (with extra credits) |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment one &"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment one &" of type "gradeitem" on "grader" page:
| Extra credit weight | 2 |
And I press "Save changes"
And I turn editing mode off
Then I should see "42.50 (42.50 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -195,19 +147,11 @@ Feature: We can use calculated grade totals
Scenario: Median of grades aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Median of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Median of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Median of grades |
| Exclude empty grades | 0 |
And I press "Save changes"
@ -223,32 +167,17 @@ Feature: We can use calculated grade totals
Scenario: Lowest grade aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Lowest grade |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Lowest grade |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Lowest grade |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment five"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment five" of type "gradeitem" on "grader" page:
| Hidden | 1 |
And I press "Save changes"
And I click on grade item menu "Test assignment four"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment four" of type "gradeitem" on "grader" page:
| Hidden | 1 |
And I press "Save changes"
And I turn editing mode off
Then I should see "0.00 (0.00 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -261,27 +190,15 @@ Feature: We can use calculated grade totals
Scenario: Highest grade aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Highest grade |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Highest grade |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Highest grade |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment one &"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment one &" of type "gradeitem" on "grader" page:
| Hidden | 1 |
And I press "Save changes"
And I turn editing mode off
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -294,27 +211,15 @@ Feature: We can use calculated grade totals
Scenario: Mode of grades aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Mode of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Mode of grades |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Mode of grades |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade item menu "Test assignment one &"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment one &" of type "gradeitem" on "grader" page:
| Hidden | 1 |
And I press "Save changes"
And I turn editing mode off
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -338,7 +243,7 @@ Feature: We can use calculated grade totals
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
@ -360,7 +265,7 @@ Feature: We can use calculated grade totals
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test outcome item one":
And I set the following settings for grade item "Test outcome item one" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I log out
And I log in as "student1"
@ -372,7 +277,7 @@ Feature: We can use calculated grade totals
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
| Include outcomes in aggregation | 0 |
And I log out
@ -395,11 +300,11 @@ Feature: We can use calculated grade totals
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test outcome item one":
And I set the following settings for grade item "Test outcome item one" of type "gradeitem" on "setup" page:
| Weight adjusted | 1 |
| aggregationcoef2 | 100 |
And I change window size to "large"
@ -419,35 +324,20 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 1 |
And I press "Save changes"
And I click on grade item menu "Test assignment six"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment six" of type "gradeitem" on "grader" page:
| Weight adjusted | 1 |
| aggregationcoef2 | 50 |
And I press "Save changes"
And I click on grade item menu "Test assignment three"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "grader" page:
| Extra credit | 1 |
And I press "Save changes"
And I turn editing mode off
Then I should see "152.68 (24.43 %)" in the ".course" "css_element"
And I navigate to "Setup > Course grade settings" in the course gradebook
@ -492,24 +382,15 @@ Feature: We can use calculated grade totals
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the following fields to these values:
@ -540,21 +421,15 @@ Feature: We can use calculated grade totals
And I turn editing mode off
Then I should see "250.00 (25.25 %)" in the ".course" "css_element"
And I turn editing mode on
And I click on grade item menu "Manual item 2"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Manual item 2" of type "gradeitem" on "grader" page:
| Extra credit | 1 |
And I press "Save changes"
And I turn editing mode off
And I should see "270.00 (27.27 %)" in the ".course" "css_element"
And I turn editing mode on
And I click on grade item menu "Manual item 2"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Manual item 2" of type "gradeitem" on "grader" page:
| Rescale existing grades | No |
| Maximum grade | 200 |
| Extra credit | 0 |
And I press "Save changes"
# Change window size to ultra-wide to avoid 'out-of-bounds' random failures.
And I change window size to "5120x2160"
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
@ -564,13 +439,10 @@ Feature: We can use calculated grade totals
And I turn editing mode off
And I should see "270.00 (22.69 %)" in the ".course" "css_element"
And I turn editing mode on
And I click on grade item menu "Manual item 2"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Manual item 2" of type "gradeitem" on "grader" page:
| Rescale existing grades | No |
| Maximum grade | 100 |
| Extra credit | 0 |
And I press "Save changes"
# Change window size to ultra-wide to avoid 'out-of-bounds' random failures.
And I change window size to "5120x2160"
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
@ -591,11 +463,11 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation from the setup screen
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
And I set the following settings for grade item "Sub category 1":
And I set the following settings for grade item "Sub category 1" of type "category" on "setup" page:
| Aggregation | Natural |
And I set the following settings for grade item "Sub category 2 &":
And I set the following settings for grade item "Sub category 2 &" of type "category" on "setup" page:
| Aggregation | Natural |
And I set the field "Override weight of Test assignment one &" to "1"
@ -642,24 +514,15 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation with weights of zero
When I navigate to "View > Grader report" in the course gradebook
And I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I click on grade category menu "Sub category 2 &"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 2 &" of type "category" on "grader" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I press "Save changes"
And I turn editing mode off
And I navigate to "Setup > Gradebook setup" in the course gradebook
And "//span[@class='grateitemheader'][@title='Sub category 2 &amp;']" "xpath_element" should not exist

View File

@ -35,7 +35,7 @@ Feature: Calculated grade items can be used in the gradebook
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 50 |
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
@ -62,7 +62,7 @@ Feature: Calculated grade items can be used in the gradebook
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 50 |
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
@ -76,7 +76,7 @@ Feature: Calculated grade items can be used in the gradebook
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 40 |
And I navigate to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
@ -124,7 +124,7 @@ Feature: Calculated grade items can be used in the gradebook
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade item "calc item" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item":
And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
| Maximum grade | 50 |
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
@ -142,7 +142,7 @@ Feature: Calculated grade items can be used in the gradebook
| calc item | 33.33 % | 37.50 | 050 | 75.00 % | 25.00 % |
| Course total | - | 112.50 | 0150 | 75.00 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "calc item":
And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 40 |
And I navigate to "View > Grader report" in the course gradebook

View File

@ -36,7 +36,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 50 |
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
@ -63,7 +63,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 50 |
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
@ -77,7 +77,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat":
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 40 |
And I navigate to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
@ -125,7 +125,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And I press "Save changes"
And I set "=[[gi1]]/2" calculation for grade item "calc item" with idnumbers:
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item":
And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
| Maximum grade | 50 |
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
@ -143,7 +143,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| calc item | 50.00 % | 37.50 | 0100 | 37.50 % | 18.75 % |
| Course total | - | 112.50 | 0200 | 56.25 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "calc item":
And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 40 |
And I navigate to "View > Grader report" in the course gradebook

View File

@ -57,7 +57,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Mean of grades aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Mean of grades |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -74,15 +74,15 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Weighted mean of grades aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "EN Test assignment one":
And I set the following settings for grade item "Test assignment one" of type "gradeitem" on "setup" page:
| Item weight | 2.0 |
And I set the following settings for grade item "EN Test assignment two":
And I set the following settings for grade item "Test assignment two" of type "gradeitem" on "setup" page:
| Item weight | 1.0 |
And I set the following settings for grade item "EN Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Item weight | 1.0 |
And I set the following settings for grade item "EN Sub category":
And I set the following settings for grade item "Sub category" of type "category" on "setup" page:
| Item weight | 1.0 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -99,11 +99,11 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Simple weighted mean of grades aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "EN Sub category":
And I set the following settings for grade item "Sub category" of type "category" on "setup" page:
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "EN Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -120,9 +120,9 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Mean of grades (with extra credits) aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Mean of grades (with extra credits) |
And I set the following settings for grade item "EN Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit weight | 1.0 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -139,7 +139,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Median of grades aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Median of grades |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -156,7 +156,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Lowest grade aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Lowest grade |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -173,7 +173,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Highest grade aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Highest grade |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -190,7 +190,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: Mode of grades aggregation
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Mode of grades |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -207,11 +207,11 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: View user report with mixed aggregation methods
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
And I set the following settings for grade item "EN Sub category":
And I set the following settings for grade item "Sub category" of type "category" on "setup" page:
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "EN Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
@ -230,7 +230,7 @@ Feature: We can understand the gradebook user report
@javascript @skip_chrome_zerosize
Scenario: View user report with natural aggregation
And I set the following settings for grade item "EN Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget

View File

@ -51,8 +51,8 @@ Feature: Editing a grade item
And I press "Save changes"
Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades
When I open the action menu in "Cat 1" "table_row"
And I choose "Edit settings" in the open action menu
Given I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
Then I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded"
And I expand all fieldsets
And I set the field "Grade type" to "Scale"
@ -61,8 +61,8 @@ Feature: Editing a grade item
And I set the field "Scale" to "ABCDEF"
And I press "Save changes"
And I should not see "You cannot change the type, as grades already exist for this item"
And I open the action menu in "Cat 1" "table_row"
And I choose "Edit settings" in the open action menu
And I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded"
And I expand all fieldsets
And I set the field "Scale" to "Letter scale"
@ -75,15 +75,15 @@ Feature: Editing a grade item
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Cat 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I expand all fieldsets
Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist
Scenario: Attempting to change a category item's scale when overridden grades already exist
Given I open the action menu in "Cat 1" "table_row"
And I choose "Edit settings" in the open action menu
Given I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I expand all fieldsets
And I set the field "Grade type" to "Scale"
And I set the field "Scale" to "ABCDEF"
@ -93,8 +93,8 @@ Feature: Editing a grade item
And I give the grade "C" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Cat 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I expand all fieldsets
Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type and scale cannot be changed."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist
@ -105,8 +105,8 @@ Feature: Editing a grade item
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Cat 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I expand all fieldsets
Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
And I should see "Choose" in the "Rescale overridden grades" "field"
@ -121,8 +121,8 @@ Feature: Editing a grade item
And I give the grade "20#00" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Cat 1" "table_row"
And I choose "Edit settings" in the open action menu
And I click on grade item menu "Cat 1" of type "category" on "setup" page
And I choose "Edit category" in the open action menu
And I expand all fieldsets
And I set the field "Rescale overridden grades" to "Yes"
And I set the field "Maximum grade" to "87#50"

View File

@ -55,13 +55,13 @@ Feature: Extra credit contributions are normalised when going out of bounds
Scenario Outline: The contribution of extra credit items is normalised
Given I navigate to "Setup > Gradebook setup" in the course gradebook
When I set the following settings for grade item "Course 1":
When I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | <aggregation> |
And I set the following settings for grade item "Manual item 2":
And I set the following settings for grade item "Manual item 2" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Manual item 3":
And I set the following settings for grade item "Manual item 3" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Manual item 4":
And I set the following settings for grade item "Manual item 4" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget

View File

@ -41,12 +41,9 @@ Feature: We can change the maximum and minimum number of points for manual items
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1"
And I press "Save changes"
When I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Manual item 1" "table_row"
And I choose "Edit settings" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Manual item 1" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 10 |
And I press "Save changes"
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
Then the following should exist in the "user-grade" table:
@ -57,8 +54,8 @@ Feature: We can change the maximum and minimum number of points for manual items
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 8.00 | 80.00 % |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "Manual item 1" "table_row"
And I choose "Edit settings" in the open action menu
And I click on grade item menu "Manual item 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
| Rescale existing grades | Yes |
| Maximum grade | 20 |

View File

@ -48,9 +48,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
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"
And I press "Save changes"
And I click on grade item menu "Test assignment four"
And I choose "Edit grade item" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Test assignment four" of type "gradeitem" on "grader" page:
| Hidden | 1 |
And I am on "Course 1" course homepage
And I navigate to "View > User report" in the course gradebook

View File

@ -38,9 +38,8 @@ Feature: Hidden grade items should be hidden when grade category is locked, but
And I give the grade "50.00" to the user "Student 1" for the grade item "Hidden item"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test locked category":
And I set the following settings for grade item "Test locked category" of type "category" on "setup" page:
| Locked | 1 |
And I press "Save changes"
And I log out
Scenario: Hidden grade items in locked category is hidden for teacher

View File

@ -32,8 +32,8 @@ Feature: We can duplicate grade items that already exist.
And I should not see "Duplicate Assignment1"
When I duplicate the grade item "Item1"
Then I should see "Item1 (copy)"
And I open the action menu in "Item1 (copy)" "table_row"
And I choose "Edit settings" in the open action menu
And I click on grade item menu "Item1 (copy)" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And the field "Item name" matches value "Item1 (copy)"
And the field "ID number" matches value ""
And the field "Grade type" matches value "Value"

View File

@ -38,8 +38,7 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
@javascript
Scenario: Hiding the activity using the drop-down hide link and then unhiding the activity using the edit settings form page
Given I click on "Actions" "link" in the "Test assignment name" "table_row"
And I click on "Hide" "link" in the "Test assignment name" "table_row"
Given I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should not see "50.00"
@ -48,8 +47,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I click on "Actions" "link" in the "Test assignment name" "table_row"
And I click on "Edit settings" "link" in the "Test assignment name" "table_row"
And I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And the field "Hidden" matches value "1"
And I set the field "Hidden" to "0"
And I press "Save changes"
@ -60,8 +59,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
@javascript
Scenario: Hiding the activity using the edit settings form page and then unhiding the activity using the drop-down show link
Given I click on "Actions" "link" in the "Test assignment name" "table_row"
And I click on "Edit settings" "link" in the "Test assignment name" "table_row"
Given I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I set the field "Hidden" to "1"
And I press "Save changes"
And I log out
@ -72,8 +71,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I click on "Actions" "link" in the "Test assignment name" "table_row"
And I click on "Show" "link" in the "Test assignment name" "table_row"
And I click on grade item menu "Test assignment name" of type "gradeitem" on "setup" page
And I choose "Show" in the open action menu
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
Then I should see "50.00"
@ -81,8 +80,7 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
@javascript
Scenario: Hiding the category using the drop-down hide link and then unhiding the category using the edit settings form page
Given I click on "Actions" "link" in the "Course 1" "table_row"
And I click on "Hide" "link" in the "Course 1" "table_row"
Given I hide the grade item "Course 1" of type "course" on "setup" page
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should not see "50.00"
@ -91,8 +89,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I click on "Actions" "link" in the "Course 1" "table_row"
And I click on "Edit settings" "link" in the "Course 1" "table_row"
And I click on grade item menu "Course 1" of type "course" on "setup" page
And I choose "Edit category" in the open action menu
And the field "Hidden" matches value "1"
And I set the field "Hidden" to "0"
And I press "Save changes"
@ -103,10 +101,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
@javascript
Scenario: Hiding the category using the edit settings form page and then unhiding the category using the drop-down show link
Given I click on "Actions" "link" in the "Course 1" "table_row"
And I click on "Edit settings" "link" in the "Course 1" "table_row"
And I set the field "Hidden" to "1"
And I press "Save changes"
Given I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Hidden | 1 |
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I should not see "50.00"
@ -115,8 +111,8 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I click on "Actions" "link" in the "Course 1" "table_row"
And I click on "Show" "link" in the "Course 1" "table_row"
And I click on grade item menu "Course 1" of type "course" on "setup" page
And I choose "Show" in the open action menu
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
Then I should see "50.00"

View File

@ -36,8 +36,8 @@ Feature: Grade item validation
And I press "Save changes"
Scenario: Being able to change the grade type, scale and maximum grade for a manual grade item when there are no grades
Given I open the action menu in "MI 1" "table_row"
And I choose "Edit settings" in the open action menu
Given I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
When I should not see "Some grades have already been awarded, so the grade type"
Then I set the field "Grade type" to "Scale"
And I press "Save changes"
@ -45,8 +45,8 @@ Feature: Grade item validation
And I set the field "Scale" to "ABCDEF"
And I press "Save changes"
And I should not see "You cannot change the type, as grades already exist for this item"
And I open the action menu in "MI 1" "table_row"
And I choose "Edit settings" in the open action menu
And I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I should not see "Some grades have already been awarded, so the grade type"
And I set the field "Scale" to "Letter scale"
And I press "Save changes"
@ -58,14 +58,14 @@ Feature: Grade item validation
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "MI 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist
Scenario: Attempting to change a manual item's scale when grades already exist
Given I open the action menu in "MI 1" "table_row"
And I choose "Edit settings" in the open action menu
Given I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I set the field "Grade type" to "Scale"
And I set the field "Scale" to "ABCDEF"
And I press "Save changes"
@ -74,8 +74,8 @@ Feature: Grade item validation
And I give the grade "C" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "MI 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist
@ -85,8 +85,8 @@ Feature: Grade item validation
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I open the action menu in "MI 1" "table_row"
When I choose "Edit settings" in the open action menu
And I click on grade item menu "MI 1" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
And I should see "Choose" in the "Rescale existing grades" "field"
And the "Maximum grade" "field" should be disabled

View File

@ -72,13 +72,13 @@ Feature: We can use a minimum grade different than zero
@javascript
Scenario: Natural aggregation with negative and positive grade
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Sub category 1":
And I set the following settings for grade item "Sub category 1" of type "category" on "setup" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 2":
And I set the following settings for grade item "Sub category 2" of type "category" on "setup" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I log out

View File

@ -61,7 +61,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "CAT1":
And I set the following settings for grade item "CAT1" of type "category" on "setup" page:
| Aggregation | Natural |
And I log out
And I log in as "teacher1"
@ -97,11 +97,11 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| CAT1 total | 33.33 % | 10.00 | 0100 | 10.00 % | - |
| Course total | - | 60.00 | 0300 | 20.00 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "MI 1":
And I set the following settings for grade item "MI 1" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
And I set the following settings for grade item "MI 3":
And I set the following settings for grade item "MI 3" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
@ -127,7 +127,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| CAT1 total | 25.00 % | 10.00 | 050 | 20.00 % | - |
| Course total | - | 60.00 | 0200 | 30.00 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "MI 5":
And I set the following settings for grade item "MI 5" of type "gradeitem" on "setup" page:
| Rescale existing grades | No |
| Maximum grade | 200.00 |
And I navigate to "View > User report" in the course gradebook

View File

@ -26,9 +26,9 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
And I set the following settings for grade item "Test assignment four (extra)" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)":
And I set the following settings for grade item "Test assignment five (extra)" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
@javascript
@ -95,11 +95,11 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
@javascript
Scenario: Make sure there are no errors when all items are marked as extra credit
And I set the following settings for grade item "Test assignment one":
And I set the following settings for grade item "Test assignment one" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment two":
And I set the following settings for grade item "Test assignment two" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
When I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on

View File

@ -27,9 +27,9 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
And I set the following settings for grade item "Test assignment four (extra)" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)":
And I set the following settings for grade item "Test assignment five (extra)" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
@javascript
@ -96,11 +96,11 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
@javascript
Scenario: Make sure there are no errors when all items are marked as extra credit (before the fix 20150619)
And I set the following settings for grade item "Test assignment one":
And I set the following settings for grade item "Test assignment one" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment two":
And I set the following settings for grade item "Test assignment two" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three":
And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
When I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on

View File

@ -98,7 +98,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
@javascript
Scenario: Grade items weights are not normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set respectful to number of items.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And the field "Weight of Test assignment five" matches value "66.667"
And the field "Weight of Test assignment six" matches value "33.333"
@ -121,7 +121,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum over 100). Extra credit is set respectful to number of items.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Override weight of Test assignment six" to "1"
@ -141,7 +141,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum under 100). Extra credit is set respectful to number of items.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Override weight of Test assignment six" to "1"
@ -161,7 +161,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
@javascript
Scenario: Grade items weights are normalised when not all grade item weights are overridden. Extra credit is set respectful to number of items.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Weight of Test assignment five" to "40"
@ -180,7 +180,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
Scenario: The extra credit grade item weight is overridden to a figure over one hundred and then
the grade item is set to normal.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment seven" to "1"
And I set the field "Weight of Test assignment seven" to "105"
@ -189,7 +189,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
And the field "Weight of Test assignment five" matches value "66.667"
And the field "Weight of Test assignment six" matches value "33.333"
And the field "Weight of Test assignment seven" matches value "105.0"
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 0 |
And I should see "Your weights have been adjusted to total 100."
@ -201,7 +201,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
Scenario: The extra credit grade item weight is overridden to a figure over one hundred and then
the grade category is reset.
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment seven" to "1"
And I set the field "Weight of Test assignment seven" to "105"
@ -229,7 +229,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
@javascript
Scenario: With one grade item set as extra credit, when I reset the weights for a category they return to the natural weights.
When I set the following settings for grade item "Test assignment five":
When I set the following settings for grade item "Test assignment five" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment six" to "1"
And I set the field "Override weight of Test assignment seven" to "1"

View File

@ -37,7 +37,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set to zero (before the fix 20150619).
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And the field "Weight of Test assignment five" matches value "66.667"
And the field "Weight of Test assignment six" matches value "33.333"
@ -60,7 +60,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum over 100). Extra credit is set to zero (before the fix 20150619).
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Override weight of Test assignment six" to "1"
@ -80,7 +80,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum under 100). Extra credit is set to zero (before the fix 20150619).
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Override weight of Test assignment six" to "1"
@ -100,7 +100,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
@javascript
Scenario: Grade items weights are normalised when not all grade item weights are overridden. Extra credit is set respectful to non-overridden items (before the fix 20150619).
When I set the following settings for grade item "Test assignment seven":
When I set the following settings for grade item "Test assignment seven" of type "gradeitem" on "setup" page:
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1"
And I set the field "Weight of Test assignment five" to "40"

View File

@ -42,11 +42,10 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
And I press "Save changes"
And I navigate to "View > Grader report" in the course gradebook
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I click on "Actions" "link" in the ".coursecategory" "css_element"
And I click on "Edit settings" "link" in the ".coursecategory" "css_element"
And I set the field "Aggregation" to "Weighted mean of grades"
And I set the field "Rescale overridden grades" to "Yes"
And I set the field "Maximum grade" to "200"
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Weighted mean of grades |
| Rescale overridden grades | Yes |
| Maximum grade | 200 |
And I press "Save changes"
@javascript

View File

@ -107,14 +107,9 @@ Feature: View gradebook when scales are used
| Course total | 4.00 | 05 | 80.00 % | - |
Scenario Outline: Test displaying scales in gradebook in all other aggregation methods
Given I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
Given I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | <aggregation> |
And I press "Save changes"
And I click on grade category menu "Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Sub category 1" of type "category" on "grader" page:
| Aggregation | <aggregation> |
| Category name | Sub category (<aggregation>) |
| Maximum grade | 5 |
@ -142,8 +137,8 @@ Feature: View gradebook when scales are used
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | A (5) |
| Sub category (<aggregation>) total<aggregation>. | |
| Course total<aggregation>. | |
| Sub category (<aggregation>) total | |
| Course total | |
And I log out
And I log in as "student2"
And I follow "Grades" in the user menu

View File

@ -44,11 +44,8 @@ Feature: Control the aggregation of the scales
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"
And I press "Save changes"
When I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | <aggregation> |
And I press "Save changes"
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
Then the following should exist in the "user-grade" table:
@ -88,16 +85,14 @@ Feature: Control the aggregation of the scales
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
When I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
When I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | Natural |
And I press "Save changes"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the field "Override weight of Grade me" to "1"
Then the field "Override weight of Grade me" matches value "100.00"
And I open the action menu in "Scale me" "table_row"
And I click on "Edit settings" "link" in the "Scale me" "table_row"
And I click on grade item menu "Scale me" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I follow "Show more..."
And I should not see "Weight adjusted"
And I should not see "Weight"
@ -109,8 +104,8 @@ Feature: Control the aggregation of the scales
And the field "Override weight of Grade me" matches value "95.238"
And I set the field "Override weight of Scale me" to "1"
And the field "Override weight of Scale me" matches value "4.8"
And I open the action menu in "Scale me" "table_row"
And I click on "Edit settings" "link" in the "Scale me" "table_row"
And I click on grade item menu "Scale me" of type "gradeitem" on "setup" page
And I choose "Edit grade item" in the open action menu
And I follow "Show more..."
And I should see "Weight adjusted"
And I should see "Weight"

View File

@ -86,17 +86,11 @@ Feature: View gradebook when single item scales are used
| Course total | 1.00 |
Scenario Outline: Test displaying single item scales in gradebook in all other aggregation methods
Given I click on course grade category menu "Course 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
Given I set the following settings for grade item "Course 1" of type "course" on "grader" page:
| Aggregation | <aggregation> |
And I press "Save changes"
And I click on grade category menu "<span lang='en' class='multilang'>EN</span><span lang='fr' class='multilang'>FR</span> Sub category 1"
And I choose "Edit category" in the open action menu
And I set the following fields to these values:
And I set the following settings for grade item "<span lang='en' class='multilang'>EN</span><span lang='fr' class='multilang'>FR</span> Sub category 1" of type "category" on "grader" page:
| Aggregation | <aggregation> |
| Category name | Sub category (<aggregation>) |
And I press "Save changes"
And I turn editing mode off
Then the following should exist in the "user-grades" table:
| -1- | -1- | -3- | -4- | -5- |
@ -117,8 +111,8 @@ Feature: View gradebook when single item scales are used
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | Ace! (1) |
| Sub category (<aggregation>) total<aggregation>. | 100.00 |
| Course total<aggregation>. | 100.00 |
| Sub category (<aggregation>) total | 100.00 |
| Course total | 100.00 |
Examples:
| aggregation | contrib1 | cattotal1 | coursetotal1 | catavg | overallavg |

View File

@ -90,7 +90,7 @@ Feature: We can enter in grades and view reports from the gradebook
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
When I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
And I set the following settings for grade item "Course 1" of type "course" on "setup" page:
| Aggregation | Weighted mean of grades |
And I set the field "Extra credit value for Test assignment name" to "0.72"
And I press "Save changes"