Compare commits
197 Commits
v3.2.0-rc2
...
v3.2.0-rc4
| Author | SHA1 | Date | |
|---|---|---|---|
| a0352aa95e | |||
| d5d1d56f9c | |||
| 1270616023 | |||
| 06ded0ed5f | |||
| 220f3ac711 | |||
| 1e102ca3ca | |||
| 7621fe8399 | |||
| 0d5f5f7357 | |||
| 805659e1fa | |||
| 01dc1c11ec | |||
| 740dbe77a2 | |||
| 8b516a6a55 | |||
| 4a1165ba39 | |||
| 9eb8f6ec56 | |||
| dc3e3c0831 | |||
| 4d41cec8db | |||
| 12f7202177 | |||
| 8392a86068 | |||
| dc801cb6b9 | |||
| 1cbc346092 | |||
| c56c23720b | |||
| 7ad1d2da47 | |||
| 58ec5a315b | |||
| 6ee691d71b | |||
| 60ff24c0f1 | |||
| c811356efb | |||
| acefc7d963 | |||
| f59bab60c0 | |||
| 47b03b9170 | |||
| d442a3169c | |||
| 3df6e801b5 | |||
| 920778eb93 | |||
| d826c64c57 | |||
| 085e077fa3 | |||
| 341da3e3fb | |||
| 0395ec28e2 | |||
| dd106016ee | |||
| 2adf5ef946 | |||
| 6c4aba1e7e | |||
| 894b1825f6 | |||
| 27a3843d05 | |||
| 96813571b1 | |||
| c1722505e1 | |||
| 39f621305d | |||
| 1f5fbd1696 | |||
| cdef9e91a3 | |||
| 3eabedbb92 | |||
| 9441af9596 | |||
| c08a263134 | |||
| 392367c4f7 | |||
| 350d0ae6b7 | |||
| dfa707c994 | |||
| 0d9d55a3ad | |||
| b4f82837ba | |||
| bae517c616 | |||
| b68af8e6f8 | |||
| af46d1dd23 | |||
| b35c209d76 | |||
| a1e8265d48 | |||
| b71149c9ac | |||
| 262253f624 | |||
| c15f993cde | |||
| d2a44a71ac | |||
| 92fa8b8fde | |||
| 29c96d214b | |||
| 1adf21fc1d | |||
| d714aeb4f5 | |||
| c03f1de198 | |||
| edd837038a | |||
| ad76556b76 | |||
| 9cc9690575 | |||
| b001cd4b17 | |||
| 74b8557661 | |||
| 72a5842bd7 | |||
| 304e8a8d0c | |||
| c5c8f3a6f5 | |||
| 86ac6a3763 | |||
| 539de849cd | |||
| 68dde67d9f | |||
| 8b81daf4dd | |||
| 4de871f4ca | |||
| a955cf531c | |||
| 9a102866be | |||
| 8411e0a508 | |||
| 1fb687ea8f | |||
| 2fedc0da7c | |||
| 7dba450fd4 | |||
| 22b8c5b842 | |||
| 8c224317ee | |||
| 70b03eff02 | |||
| 7095f5be97 | |||
| 4213f7e236 | |||
| 45d5594ecb | |||
| bf07b81543 | |||
| be2247fb24 | |||
| b1e5624ad9 | |||
| b11916d3e7 | |||
| de4ca62e7a | |||
| b0842f61f4 | |||
| 4d85886b5f | |||
| 692c1bf345 | |||
| bb3a1d6f39 | |||
| b6f549d139 | |||
| 144c149704 | |||
| 2ecb3ffa97 | |||
| fa42b7bc69 | |||
| e24699cc7a | |||
| ff8b71ef7b | |||
| 55f8edfdf2 | |||
| 654efef456 | |||
| 65f0ef9e34 | |||
| febbb9f8cd | |||
| 8c35e49b37 | |||
| b3502be320 | |||
| 851b291998 | |||
| 813320fbb6 | |||
| 9d44510d60 | |||
| 4b287476f3 | |||
| c61d7c0802 | |||
| 183b1d6785 | |||
| 2a55269ce8 | |||
| 2ec4ed4dba | |||
| 242997744d | |||
| 203f51d627 | |||
| 9f82774a8b | |||
| c8012422eb | |||
| 68153d5cbc | |||
| be58f604b5 | |||
| 93b68886e9 | |||
| fd111ccabf | |||
| 2664ef1861 | |||
| 58c2684db2 | |||
| d14207fd25 | |||
| c0f89860ec | |||
| cb8057531f | |||
| 19d8b0f9e1 | |||
| 1b367ac6e8 | |||
| a954685767 | |||
| 020fb9d2dc | |||
| 2c0dfa7d33 | |||
| ea5084f7f1 | |||
| 270b2e443c | |||
| afa68a8174 | |||
| 2a58fef860 | |||
| d062d64fb8 | |||
| 862816eec3 | |||
| b487a7c028 | |||
| bea19e0dec | |||
| 1b669ebeba | |||
| e0c5ffb681 | |||
| 5bda9fe900 | |||
| 28e93cc41b | |||
| a60a98d900 | |||
| 44cf94a877 | |||
| d5c2829b06 | |||
| b3440a13cc | |||
| 52aeda247c | |||
| 48489fb93a | |||
| 7ee4a28719 | |||
| 1ac36fa9f7 | |||
| 6b7e523b5d | |||
| 8fb1b3bb68 | |||
| 3fd840072f | |||
| 44c3d0775c | |||
| 111d6b8f24 | |||
| 74138c7cd0 | |||
| 0484a0d511 | |||
| 95b25310ce | |||
| 1da2cf3bc0 | |||
| cb151980c4 | |||
| 03f450c10d | |||
| d3b13065ce | |||
| 73430100ff | |||
| 499f4a7823 | |||
| 7597ab0b99 | |||
| 2561e79fca | |||
| 45ed4271b7 | |||
| 51718b752d | |||
| 9c6c29932a | |||
| 8cdff4beda | |||
| 95210c6650 | |||
| 3c1cdac63f | |||
| 84979ab793 | |||
| a51122983c | |||
| e466e337b0 | |||
| a6a277f06c | |||
| 49cf53dd93 | |||
| 00f5c95590 | |||
| ef25d51f5b | |||
| 9741087ffd | |||
| fc14932c40 | |||
| edf2f7bdf1 | |||
| 030d8f22c2 | |||
| 40e0baf08e | |||
| 6e402aeb0a | |||
| 05a25f86dd | |||
| 8515e2d16d |
+16
-23
@@ -29,7 +29,7 @@ define("MAX_USERS_TO_LIST_PER_ROLE", 10);
|
||||
|
||||
$contextid = required_param('contextid', PARAM_INT);
|
||||
$roleid = optional_param('roleid', 0, PARAM_INT);
|
||||
$returnto = optional_param('return', null, PARAM_ALPHANUMEXT);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($contextid);
|
||||
|
||||
@@ -53,7 +53,13 @@ if ($course) {
|
||||
// Security.
|
||||
require_login($course, false, $cm);
|
||||
require_capability('moodle/role:assign', $context);
|
||||
$PAGE->set_url($url);
|
||||
|
||||
navigation_node::override_active_url($url);
|
||||
$pageurl = new moodle_url($url);
|
||||
if ($returnurl) {
|
||||
$pageurl->param('returnurl', $returnurl);
|
||||
}
|
||||
$PAGE->set_url($pageurl);
|
||||
$PAGE->set_context($context);
|
||||
|
||||
$contextname = $context->get_context_name();
|
||||
@@ -141,6 +147,10 @@ if (!empty($user) && ($user->id != $USER->id)) {
|
||||
}
|
||||
|
||||
$PAGE->set_pagelayout('admin');
|
||||
if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
// Do not show blocks when changing block's settings, it is confusing.
|
||||
$PAGE->blocks->show_only_fake_blocks(true);
|
||||
}
|
||||
$PAGE->set_title($title);
|
||||
|
||||
switch ($context->contextlevel) {
|
||||
@@ -186,9 +196,6 @@ if ($roleid) {
|
||||
|
||||
// Print the form.
|
||||
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
|
||||
if ($returnto !== null) {
|
||||
$assignurl->param('return', $returnto);
|
||||
}
|
||||
?>
|
||||
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
|
||||
@@ -235,18 +242,10 @@ if ($roleid) {
|
||||
// Print a form to swap roles, and a link back to the all roles list.
|
||||
echo '<div class="backlink">';
|
||||
|
||||
$newroleurl = new moodle_url($PAGE->url);
|
||||
if ($returnto !== null) {
|
||||
$newroleurl->param('return', $returnto);
|
||||
}
|
||||
$select = new single_select($newroleurl, 'roleid', $nameswithcounts, $roleid, null);
|
||||
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
|
||||
$select->label = get_string('assignanotherrole', 'core_role');
|
||||
echo $OUTPUT->render($select);
|
||||
$backurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $contextid));
|
||||
if ($returnto !== null) {
|
||||
$backurl->param('return', $returnto);
|
||||
}
|
||||
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
|
||||
echo '<p><a href="' . $PAGE->url . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
|
||||
echo '</div>';
|
||||
|
||||
} else if (empty($assignableroles)) {
|
||||
@@ -284,9 +283,6 @@ if ($roleid) {
|
||||
}
|
||||
} else if ($assigncounts[$roleid] > MAX_USERS_TO_LIST_PER_ROLE) {
|
||||
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
|
||||
if ($returnto !== null) {
|
||||
$assignurl->param('return', $returnto);
|
||||
}
|
||||
$roleholdernames[$roleid] = '<a href="'.$assignurl.'">'.$strmorethanmax.'</a>';
|
||||
} else {
|
||||
$roleholdernames[$roleid] = '';
|
||||
@@ -307,9 +303,6 @@ if ($roleid) {
|
||||
foreach ($assignableroles as $roleid => $rolename) {
|
||||
$description = format_string($DB->get_field('role', 'description', array('id'=>$roleid)));
|
||||
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
|
||||
if ($returnto !== null) {
|
||||
$assignurl->param('return', $returnto);
|
||||
}
|
||||
$row = array('<a href="'.$assignurl.'">'.$rolename.'</a>',
|
||||
$description, $assigncounts[$roleid]);
|
||||
if ($showroleholders) {
|
||||
@@ -322,8 +315,8 @@ if ($roleid) {
|
||||
|
||||
if ($context->contextlevel > CONTEXT_USER) {
|
||||
|
||||
if ($context->contextlevel === CONTEXT_COURSECAT && $returnto === 'management') {
|
||||
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
|
||||
if ($returnurl) {
|
||||
$url = new moodle_url($returnurl);
|
||||
} else {
|
||||
$url = $context->get_url();
|
||||
}
|
||||
|
||||
+19
-12
@@ -25,6 +25,7 @@
|
||||
require_once(__DIR__ . '/../../config.php');
|
||||
|
||||
$contextid = required_param('contextid', PARAM_INT);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($contextid);
|
||||
|
||||
@@ -49,7 +50,13 @@ require_login($course, false, $cm);
|
||||
if (!has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride', 'moodle/role:override', 'moodle/role:manage'), $context)) {
|
||||
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'core_role'));
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
||||
navigation_node::override_active_url($url);
|
||||
$pageurl = new moodle_url($url);
|
||||
if ($returnurl) {
|
||||
$pageurl->param('returnurl', $returnurl);
|
||||
}
|
||||
$PAGE->set_url($pageurl);
|
||||
|
||||
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
|
||||
$PAGE->navbar->includesettingsbase = true;
|
||||
@@ -75,6 +82,10 @@ $userselector->set_rows(20);
|
||||
$title = get_string('checkpermissionsin', 'core_role', $contextname);
|
||||
|
||||
$PAGE->set_pagelayout('admin');
|
||||
if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
// Do not show blocks when changing block's settings, it is confusing.
|
||||
$PAGE->blocks->show_only_fake_blocks(true);
|
||||
}
|
||||
$PAGE->set_title($title);
|
||||
|
||||
switch ($context->contextlevel) {
|
||||
@@ -156,16 +167,7 @@ if (!is_null($reportuser)) {
|
||||
|
||||
// Show UI for choosing a user to report on.
|
||||
echo $OUTPUT->box_start('generalbox boxwidthnormal boxaligncenter', 'chooseuser');
|
||||
echo '<form method="get" action="' . $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php" >';
|
||||
|
||||
// Hidden fields.
|
||||
echo '<input type="hidden" name="contextid" value="' . $context->id . '" />';
|
||||
if (!empty($user->id)) {
|
||||
echo '<input type="hidden" name="userid" value="' . $user->id . '" />';
|
||||
}
|
||||
if ($isfrontpage) {
|
||||
echo '<input type="hidden" name="courseid" value="' . $courseid . '" />';
|
||||
}
|
||||
echo '<form method="post" action="' . $PAGE->url . '" >';
|
||||
|
||||
// User selector.
|
||||
echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>', 3);
|
||||
@@ -180,7 +182,12 @@ echo $OUTPUT->box_end();
|
||||
// Appropriate back link.
|
||||
if ($context->contextlevel > CONTEXT_USER) {
|
||||
echo html_writer::start_tag('div', array('class'=>'backlink'));
|
||||
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>$context->get_url()));
|
||||
if ($returnurl) {
|
||||
$backurl = new moodle_url($returnurl);
|
||||
} else {
|
||||
$backurl = $context->get_url();
|
||||
}
|
||||
echo html_writer::link($backurl, get_string('backto', '', $contextname));
|
||||
echo html_writer::end_tag('div');
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ $prevent = optional_param('prevent', 0, PARAM_BOOL);
|
||||
$allow = optional_param('allow', 0, PARAM_BOOL);
|
||||
$unprohibit = optional_param('unprohibit', 0, PARAM_BOOL);
|
||||
$prohibit = optional_param('prohibit', 0, PARAM_BOOL);
|
||||
$return = optional_param('return', null, PARAM_ALPHANUMEXT);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($contextid);
|
||||
|
||||
@@ -56,7 +56,13 @@ if ($course) {
|
||||
// Security first.
|
||||
require_login($course, false, $cm);
|
||||
require_capability('moodle/role:review', $context);
|
||||
$PAGE->set_url($url);
|
||||
|
||||
navigation_node::override_active_url($url);
|
||||
$pageurl = new moodle_url($url);
|
||||
if ($returnurl) {
|
||||
$pageurl->param('returnurl', $returnurl);
|
||||
}
|
||||
$PAGE->set_url($pageurl);
|
||||
|
||||
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
|
||||
$PAGE->navbar->includesettingsbase = true;
|
||||
@@ -85,6 +91,11 @@ $straction = get_string('permissions', 'core_role'); // Used by tabs.php.
|
||||
$currenttab = 'permissions';
|
||||
|
||||
$PAGE->set_pagelayout('admin');
|
||||
if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
// Do not show blocks when changing block's settings, it is confusing.
|
||||
$PAGE->blocks->show_only_fake_blocks(true);
|
||||
}
|
||||
|
||||
$PAGE->set_title($title);
|
||||
switch ($context->contextlevel) {
|
||||
case CONTEXT_SYSTEM:
|
||||
@@ -219,8 +230,8 @@ echo $OUTPUT->box_end();
|
||||
|
||||
if ($context->contextlevel > CONTEXT_USER) {
|
||||
|
||||
if ($context->contextlevel === CONTEXT_COURSECAT && $return === 'management') {
|
||||
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
|
||||
if ($returnurl) {
|
||||
$url = new moodle_url($returnurl);
|
||||
} else {
|
||||
$url = $context->get_url();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
'3' => '3',
|
||||
'4' => '4',
|
||||
'5' => '5')));
|
||||
$temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null, 0,
|
||||
$temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null,
|
||||
GRADE_NAVMETHOD_TABS,
|
||||
array(GRADE_NAVMETHOD_DROPDOWN => new lang_string('dropdown', 'grades'),
|
||||
GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'),
|
||||
GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades'))));
|
||||
|
||||
@@ -35,35 +35,25 @@
|
||||
}}
|
||||
<div class="form-password">
|
||||
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
|
||||
<span class="visibleifjs">
|
||||
<span data-passwordunmask="editor">
|
||||
<input type="hidden"
|
||||
name="{{ name }}"
|
||||
id="{{ id }}"
|
||||
value="{{ value }}"
|
||||
size="{{ size }}"
|
||||
>
|
||||
</span>
|
||||
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
|
||||
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
|
||||
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
|
||||
</a>
|
||||
<a href="#" data-passwordunmask="unmask" title="{{ unmaskhint }}">
|
||||
{{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }}
|
||||
</a>
|
||||
<span data-passwordunmask="instructions" class="form-text text-muted" style="display: none;">
|
||||
{{# str }} passwordunmaskinstructions, form {{/ str }}
|
||||
</span>
|
||||
</span>
|
||||
<noscript>
|
||||
<!-- Backwards compatability for Behat -->
|
||||
<input type="password"
|
||||
<span data-passwordunmask="editor">
|
||||
<input type="hidden"
|
||||
name="{{ name }}"
|
||||
id="{{ id }}"
|
||||
value="{{ value }}"
|
||||
size="{{ size }}"
|
||||
data-size="{{ size }}"
|
||||
class="form-control d-inline-block"
|
||||
>
|
||||
</noscript>
|
||||
</span>
|
||||
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
|
||||
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
|
||||
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
|
||||
</a>
|
||||
<a href="#" data-passwordunmask="unmask" title="{{ unmaskhint }}">
|
||||
{{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }}
|
||||
</a>
|
||||
<span data-passwordunmask="instructions" class="form-text text-muted" style="display: none;">
|
||||
{{# str }} passwordunmaskinstructions, form {{/ str }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
{{#js}}
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
Then I should see "Grade category 1"
|
||||
And I should see "Grade sub category 2"
|
||||
|
||||
@@ -349,9 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Grade Item 1"
|
||||
And I follow "Edit Test Grade Item 1"
|
||||
And I expand all fieldsets
|
||||
@@ -380,8 +378,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "Scales"
|
||||
And I go to "Scales" in the course gradebook
|
||||
Then I should see "Test Scale 1"
|
||||
And I should see "Disappointing, Good, Very good, Excellent"
|
||||
|
||||
@@ -432,9 +429,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Outcome Grade Item 1"
|
||||
And I follow "Edit Test Outcome Grade Item 1"
|
||||
And the field "Outcome" matches value "Grade outcome 1"
|
||||
|
||||
@@ -15,6 +15,7 @@ Feature: Forms manipulation
|
||||
Then the field "First name" matches value "Field value"
|
||||
And the "Select a country" select box should contain "Japan"
|
||||
And the field "New password" matches value "TestPass"
|
||||
And I take focus off "Update profile" "button"
|
||||
And I press "Update profile"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -101,6 +101,7 @@ class api {
|
||||
*/
|
||||
public static function get_public_config() {
|
||||
global $CFG, $SITE, $PAGE, $OUTPUT;
|
||||
require_once($CFG->libdir . '/authlib.php');
|
||||
|
||||
$context = context_system::instance();
|
||||
// We need this to make work the format text functions.
|
||||
@@ -132,8 +133,12 @@ class api {
|
||||
}
|
||||
$settings['typeoflogin'] = $typeoflogin;
|
||||
|
||||
// Check if the user can sign-up to return the launch URL in that case.
|
||||
$cansignup = signup_is_enabled();
|
||||
|
||||
if ($typeoflogin == self::LOGIN_VIA_BROWSER or
|
||||
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER) {
|
||||
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER or
|
||||
$cansignup) {
|
||||
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
|
||||
$settings['launchurl'] = $url->out(false);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class renderer extends \plugin_renderer_base {
|
||||
protected function render_add_button($courseid) {
|
||||
global $CFG;
|
||||
|
||||
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'));
|
||||
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'), ['class' => 'btn btn-primary']);
|
||||
$addurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('courseid' => $courseid));
|
||||
return \html_writer::link($addurl, $button);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ Feature: tool_monitor_subscriptions
|
||||
And I trigger cron
|
||||
And I am on site homepage
|
||||
When I click on ".popover-region-notifications" "css_element"
|
||||
And I click on "View more" "link" in the ".popover-region-notifications" "css_element"
|
||||
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
|
||||
Then I should see "New rule site level"
|
||||
And I should see "The course was viewed"
|
||||
|
||||
@@ -137,7 +137,7 @@ Feature: tool_monitor_subscriptions
|
||||
And I trigger cron
|
||||
And I am on site homepage
|
||||
When I click on ".popover-region-notifications" "css_element"
|
||||
And I click on "View more" "link" in the ".popover-region-notifications" "css_element"
|
||||
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
|
||||
Then I should see "New rule course level"
|
||||
And I should see "The course was viewed"
|
||||
|
||||
|
||||
@@ -65,6 +65,6 @@ Feature: Backup user data
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
When I click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "User report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -96,12 +96,12 @@ echo $OUTPUT->box_start(); // The forms section at the top
|
||||
|
||||
<div class="mdl-align">
|
||||
|
||||
<form method="post" action="index.php">
|
||||
<form method="post" action="index.php" class="form-inline spamcleanerform">
|
||||
<div>
|
||||
<label class="accesshide" for="keyword_el"><?php print_string('spamkeyword', 'tool_spamcleaner') ?></label>
|
||||
<input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
|
||||
<input type="text" class="form-control" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey();?>" />
|
||||
<input type="submit" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
|
||||
<input type="submit" class="btn btn-primary" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
|
||||
</div>
|
||||
</form>
|
||||
<p><?php echo get_string('spameg', 'tool_spamcleaner');?></p>
|
||||
@@ -110,7 +110,8 @@ echo $OUTPUT->box_start(); // The forms section at the top
|
||||
|
||||
<form method="post" action="index.php">
|
||||
<div>
|
||||
<input type="submit" name="autodetect" value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
|
||||
<input type="submit" class="btn btn-primary" name="autodetect"
|
||||
value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -256,7 +257,9 @@ function print_user_list($users_rs, $keywords) {
|
||||
foreach ($users_rs as $rs){
|
||||
foreach ($rs as $user) {
|
||||
if (!$count) {
|
||||
echo '<table border="1" width="100%" id="data-grid"><tr><th> </th><th>'.get_string('user','admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th><th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
|
||||
echo '<table class="table table-bordered" border="1" width="100%" id="data-grid"><tr><th> </th>
|
||||
<th>'.get_string('user', 'admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th>
|
||||
<th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
|
||||
}
|
||||
$count++;
|
||||
filter_user($user, $keywords, $count);
|
||||
@@ -269,7 +272,7 @@ function print_user_list($users_rs, $keywords) {
|
||||
} else {
|
||||
echo '</table>';
|
||||
echo '<div class="mld-align">
|
||||
<button id="removeall_btn">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
|
||||
<button id="removeall_btn" class="btn btn-secondary">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
@@ -357,8 +360,10 @@ function print_user_entry($user, $keywords, $count) {
|
||||
|
||||
$html .= '<td align="left">'.format_text($user->description, $user->descriptionformat, array('overflowdiv'=>true)).'</td>';
|
||||
$html .= '<td width="100px" align="center">';
|
||||
$html .= '<button onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.get_string('deleteuser', 'admin').'</button><br />';
|
||||
$html .= '<button onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.get_string('ignore', 'admin').'</button>';
|
||||
$html .= '<button class="btn btn-primary" onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.
|
||||
get_string('deleteuser', 'admin').'</button><br />';
|
||||
$html .= '<button class="btn btn-secondary" onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.
|
||||
get_string('ignore', 'admin').'</button>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
return $html;
|
||||
|
||||
@@ -61,6 +61,10 @@ class behat_auth extends behat_base {
|
||||
* @Given /^I log out$/
|
||||
*/
|
||||
public function i_log_out() {
|
||||
|
||||
// Wait for page to be loaded.
|
||||
$this->wait_for_pending_js();
|
||||
|
||||
// Click on logout link in footer, as it's much faster.
|
||||
$this->execute('behat_general::i_click_on_in_the', array(get_string('logout'), 'link', '#page-footer', "css_element"));
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ information provided here is intended especially for developers.
|
||||
* The authentication plugin auth_radius has been moved to https://github.com/moodlehq/moodle-auth_radius
|
||||
* New auth_email::user_signup_with_confirmation() method has a new optional parameter $confirmationurl to provide a different
|
||||
confirmation URL.
|
||||
* New signup_is_enabled() function available in lib/authlib.php to safely check if sign-up is enabled in the site.
|
||||
|
||||
=== 3.0 ===
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ Feature: Import course's contents into another course
|
||||
| Description | Test forum description |
|
||||
And I add the "Comments" block
|
||||
And I add the "Recent blog entries" block
|
||||
And I turn editing mode off
|
||||
When I import "Course 1" course into "Course 2" course using this options:
|
||||
Then I should see "Test database name"
|
||||
And I should see "Test forum name"
|
||||
|
||||
@@ -26,7 +26,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
|
||||
| Grouping 2 | C1 | GROUPING2 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
|
||||
Scenario: Include groups and groupings when importing a course to another course
|
||||
Given I import "Course 1" course into "Course 2" course using this options:
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -83,16 +83,19 @@ Scenario: Block should select current activity by default
|
||||
When I add the "Activity results" block
|
||||
And I configure the "Activity results" block
|
||||
Then the field "id_config_activitygradeitemid" matches value "Test assignment 1"
|
||||
And I press "Cancel"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment 2"
|
||||
And I add the "Activity results" block
|
||||
And I configure the "Activity results" block
|
||||
And the field "id_config_activitygradeitemid" matches value "Test assignment 2"
|
||||
And I press "Cancel"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment 3"
|
||||
And I add the "Activity results" block
|
||||
And I configure the "Activity results" block
|
||||
And the field "id_config_activitygradeitemid" matches value "Test assignment 3"
|
||||
And I press "Cancel"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test page name"
|
||||
And I add 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -26,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -42,7 +41,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -60,7 +59,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -26,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -42,7 +41,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Scales" node in "Grade administration"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -60,7 +59,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -33,6 +33,8 @@ class block_login extends block_base {
|
||||
|
||||
function get_content () {
|
||||
global $USER, $CFG, $SESSION, $OUTPUT;
|
||||
require_once($CFG->libdir . '/authlib.php');
|
||||
|
||||
$wwwroot = '';
|
||||
$signup = '';
|
||||
|
||||
@@ -48,11 +50,8 @@ class block_login extends block_base {
|
||||
$wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
|
||||
}
|
||||
|
||||
if (!empty($CFG->registerauth)) {
|
||||
$authplugin = get_auth_plugin($CFG->registerauth);
|
||||
if ($authplugin->can_signup()) {
|
||||
$signup = $wwwroot . '/login/signup.php';
|
||||
}
|
||||
if (signup_is_enabled()) {
|
||||
$signup = $wwwroot . '/login/signup.php';
|
||||
}
|
||||
// TODO: now that we have multiauth it is hard to find out if there is a way to change password
|
||||
$forgot = $wwwroot . '/login/forgot_password.php';
|
||||
|
||||
@@ -18,7 +18,6 @@ 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"
|
||||
|
||||
@@ -113,4 +113,24 @@ class behat_blocks extends behat_base {
|
||||
array("Configure", "link", $this->escape($blockname), "block")
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that block can be added to the page but does not actually add it.
|
||||
*
|
||||
* @Then /^the add block selector should contain "(?P<block_name_string>(?:[^"]|\\")*)" block$/
|
||||
* @param string $blockname
|
||||
*/
|
||||
public function the_add_block_selector_should_contain_block($blockname) {
|
||||
$this->execute('behat_forms::the_select_box_should_contain', [get_string('addblock'), $blockname]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that block can not be added to the page.
|
||||
*
|
||||
* @Then /^the add block selector should not contain "(?P<block_name_string>(?:[^"]|\\")*)" block$/
|
||||
* @param string $blockname
|
||||
*/
|
||||
public function the_add_block_selector_should_not_contain_block($blockname) {
|
||||
$this->execute('behat_forms::the_select_box_should_not_contain', [get_string('addblock'), $blockname]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,5 +38,5 @@ Feature: Allowed blocks controls
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
Then the "Add a block" select box should not contain "Activities"
|
||||
And the "Add a block" select box should not contain "Course completion status"
|
||||
Then the add block selector should not contain "Activities" block
|
||||
And the add block selector should not contain "Course completion status" block
|
||||
|
||||
Vendored
+11
-5
@@ -1786,6 +1786,12 @@ class core_cache_testcase extends advanced_testcase {
|
||||
$this->assertArrayHasKey('cache_is_searchable', $cache->phpunit_get_store_implements());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test static acceleration
|
||||
*
|
||||
* Note: All the assertGreaterThanOrEqual() in this test should be assertGreaterThan() be because of some microtime()
|
||||
* resolution problems under some OSs / PHP versions, we are accepting equal as valid outcome. For more info see MDL-57147.
|
||||
*/
|
||||
public function test_static_acceleration() {
|
||||
$instance = cache_config_testing::instance();
|
||||
$instance->phpunit_add_definition('phpunit/accelerated', array(
|
||||
@@ -1892,7 +1898,7 @@ class core_cache_testcase extends advanced_testcase {
|
||||
$this->assertTrue($cache->set('b', $cacheableobject2));
|
||||
$staticaccelerationreturntime = $cache->phpunit_static_acceleration_get('a')->propertytime;
|
||||
$staticaccelerationreturntimeb = $cache->phpunit_static_acceleration_get('b')->propertytime;
|
||||
$this->assertGreaterThan($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
|
||||
$this->assertGreaterThanOrEqual($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
|
||||
|
||||
// Reset the static cache without resetting backing store.
|
||||
$cache->phpunit_static_acceleration_purge();
|
||||
@@ -1900,12 +1906,12 @@ class core_cache_testcase extends advanced_testcase {
|
||||
// Get the value from the backend store, populating the static cache.
|
||||
$cachevalue = $cache->get('a');
|
||||
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
|
||||
$this->assertGreaterThan($staticaccelerationreturntime, $cachevalue->propertytime);
|
||||
$this->assertGreaterThanOrEqual($staticaccelerationreturntime, $cachevalue->propertytime);
|
||||
$backingstorereturntime = $cachevalue->propertytime;
|
||||
|
||||
$results = $cache->get_many(array('b'));
|
||||
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
|
||||
$this->assertGreaterThan($staticaccelerationreturntimeb, $results['b']->propertytime);
|
||||
$this->assertGreaterThanOrEqual($staticaccelerationreturntimeb, $results['b']->propertytime);
|
||||
$backingstorereturntimeb = $results['b']->propertytime;
|
||||
|
||||
// Obtain the value again and confirm that static cache is using wake_from_cache.
|
||||
@@ -1913,11 +1919,11 @@ class core_cache_testcase extends advanced_testcase {
|
||||
// value is stored serialized in the static acceleration cache.
|
||||
$cachevalue = $cache->phpunit_static_acceleration_get('a');
|
||||
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
|
||||
$this->assertGreaterThan($backingstorereturntime, $cachevalue->propertytime);
|
||||
$this->assertGreaterThanOrEqual($backingstorereturntime, $cachevalue->propertytime);
|
||||
|
||||
$results = $cache->get_many(array('b'));
|
||||
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
|
||||
$this->assertGreaterThan($backingstorereturntimeb, $results['b']->propertytime);
|
||||
$this->assertGreaterThanOrEqual($backingstorereturntimeb, $results['b']->propertytime);
|
||||
|
||||
/** @var cache_phpunit_application $cache */
|
||||
$cache = cache::make('phpunit', 'accelerated2');
|
||||
|
||||
+48
-36
@@ -144,7 +144,8 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'action', 'value' => 'new'));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'course', 'value' => $courseid));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'time', 'value' => $time));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'submit', 'value' => get_string('newevent', 'calendar')));
|
||||
$attributes = array('type' => 'submit', 'value' => get_string('newevent', 'calendar'), 'class' => 'btn btn-secondary');
|
||||
$output .= html_writer::empty_tag('input', $attributes);
|
||||
$output .= html_writer::end_tag('div');
|
||||
$output .= html_writer::end_tag('form');
|
||||
$output .= html_writer::end_tag('div');
|
||||
@@ -222,6 +223,37 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$context = $event->context;
|
||||
$output = '';
|
||||
|
||||
$output .= $this->output->box_start('card-header clearfix');
|
||||
if (calendar_edit_event_allowed($event) && $showactions) {
|
||||
if (empty($event->cmid)) {
|
||||
$editlink = new moodle_url(CALENDAR_URL.'event.php', array('action' => 'edit', 'id' => $event->id));
|
||||
$deletelink = new moodle_url(CALENDAR_URL.'delete.php', array('id' => $event->id));
|
||||
if (!empty($event->calendarcourseid)) {
|
||||
$editlink->param('course', $event->calendarcourseid);
|
||||
$deletelink->param('course', $event->calendarcourseid);
|
||||
}
|
||||
} else {
|
||||
$params = array('update' => $event->cmid, 'return' => true, 'sesskey' => sesskey());
|
||||
$editlink = new moodle_url('/course/mod.php', $params);
|
||||
$deletelink = null;
|
||||
}
|
||||
|
||||
$commands = html_writer::start_tag('div', array('class' => 'commands pull-xs-right'));
|
||||
$commands .= html_writer::start_tag('a', array('href' => $editlink));
|
||||
$url = $this->output->pix_url('t/edit');
|
||||
$str = get_string('tt_editevent', 'calendar');
|
||||
$commands .= html_writer::empty_tag('img', array('src' => $url, 'alt' => $str, 'title' => $str, 'class' => 'icon'));
|
||||
$commands .= html_writer::end_tag('a');
|
||||
if ($deletelink != null) {
|
||||
$commands .= html_writer::start_tag('a', array('href' => $deletelink));
|
||||
$url = $this->output->pix_url('t/delete');
|
||||
$str = get_string('tt_deleteevent', 'calendar');
|
||||
$commands .= html_writer::empty_tag('img', array('src' => $url, 'alt' => $str, 'title' => $str, 'class' => 'icon'));
|
||||
$commands .= html_writer::end_tag('a');
|
||||
}
|
||||
$commands .= html_writer::end_tag('div');
|
||||
$output .= $commands;
|
||||
}
|
||||
if (!empty($event->icon)) {
|
||||
$output .= $event->icon;
|
||||
} else {
|
||||
@@ -234,12 +266,9 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= $this->output->heading(
|
||||
format_string($event->name, false, array('context' => $context)),
|
||||
3,
|
||||
array('class' => 'name')
|
||||
array('class' => 'name d-inline-block')
|
||||
);
|
||||
}
|
||||
if (!empty($event->courselink)) {
|
||||
$output .= html_writer::tag('div', $event->courselink, array('class' => 'course'));
|
||||
}
|
||||
// Show subscription source if needed.
|
||||
if (!empty($event->subscription) && $CFG->calendar_showicalsource) {
|
||||
if (!empty($event->subscription->url)) {
|
||||
@@ -251,48 +280,31 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::tag('div', $source, array('class' => 'subscription'));
|
||||
}
|
||||
if (!empty($event->time)) {
|
||||
$output .= html_writer::tag('span', $event->time, array('class' => 'date'));
|
||||
$output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right m-r-1'));
|
||||
} else {
|
||||
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), array('class' => 'date'));
|
||||
$attrs = array('class' => 'date pull-xs-right m-r-1');
|
||||
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs);
|
||||
}
|
||||
if (!empty($event->courselink)) {
|
||||
$output .= html_writer::tag('div', $event->courselink, array('class' => 'course'));
|
||||
}
|
||||
|
||||
$output .= $this->output->box_end();
|
||||
$eventdetailshtml = '';
|
||||
$eventdetailsclasses = '';
|
||||
|
||||
$eventdetailshtml .= format_text($event->description, $event->format, array('context' => $context));
|
||||
$eventdetailsclasses .= 'description';
|
||||
$eventdetailsclasses .= 'description card-block';
|
||||
if (isset($event->cssclass)) {
|
||||
$eventdetailsclasses .= ' '.$event->cssclass;
|
||||
}
|
||||
|
||||
$output .= html_writer::tag('div', $eventdetailshtml, array('class' => $eventdetailsclasses));
|
||||
|
||||
if (calendar_edit_event_allowed($event) && $showactions) {
|
||||
if (empty($event->cmid)) {
|
||||
$editlink = new moodle_url(CALENDAR_URL.'event.php', array('action'=>'edit', 'id'=>$event->id));
|
||||
$deletelink = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id));
|
||||
if (!empty($event->calendarcourseid)) {
|
||||
$editlink->param('course', $event->calendarcourseid);
|
||||
$deletelink->param('course', $event->calendarcourseid);
|
||||
}
|
||||
} else {
|
||||
$editlink = new moodle_url('/course/mod.php', array('update'=>$event->cmid, 'return'=>true, 'sesskey'=>sesskey()));
|
||||
$deletelink = null;
|
||||
}
|
||||
|
||||
$commands = html_writer::start_tag('div', array('class'=>'commands'));
|
||||
$commands .= html_writer::start_tag('a', array('href'=>$editlink));
|
||||
$commands .= html_writer::empty_tag('img', array('src'=>$this->output->pix_url('t/edit'), 'alt'=>get_string('tt_editevent', 'calendar'), 'title'=>get_string('tt_editevent', 'calendar')));
|
||||
$commands .= html_writer::end_tag('a');
|
||||
if ($deletelink != null) {
|
||||
$commands .= html_writer::start_tag('a', array('href'=>$deletelink));
|
||||
$commands .= html_writer::empty_tag('img', array('src'=>$this->output->pix_url('t/delete'), 'alt'=>get_string('tt_deleteevent', 'calendar'), 'title'=>get_string('tt_deleteevent', 'calendar')));
|
||||
$commands .= html_writer::end_tag('a');
|
||||
}
|
||||
$commands .= html_writer::end_tag('div');
|
||||
$output .= $commands;
|
||||
if (!empty($eventdetailshtml)) {
|
||||
$output .= html_writer::tag('div', $eventdetailshtml, array('class' => $eventdetailsclasses));
|
||||
}
|
||||
return html_writer::tag('div', $output , array('class' => 'event', 'id' => 'event_' . $event->id));
|
||||
|
||||
$eventhtml = html_writer::tag('div', $output, array('class' => 'card'));
|
||||
return html_writer::tag('div', $eventhtml, array('class' => 'event', 'id' => 'event_' . $event->id));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -580,7 +592,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$courseurl = new moodle_url($returnurl);
|
||||
$courseurl->remove_params('course');
|
||||
$select = new single_select($courseurl, 'course', $courseoptions, $selected, null);
|
||||
$select->class = 'cal_courses_flt';
|
||||
$select->class = 'cal_courses_flt m-r-1';
|
||||
if ($label !== null) {
|
||||
$select->set_label($label);
|
||||
} else {
|
||||
|
||||
@@ -96,7 +96,7 @@ Feature: Perform basic calendar functionality
|
||||
| Type of event | user |
|
||||
| Event title | Really awesome event! |
|
||||
| Description | Come join this awesome event, sucka! |
|
||||
And I click on "//div[@class='commands']//a[contains(@href, 'delete')]" "xpath_element"
|
||||
And I click on "Delete event" "link" in the ".event div.commands" "css_element"
|
||||
And I click on "Delete" "button"
|
||||
And I should not see "Really awesome event!"
|
||||
|
||||
@@ -105,7 +105,7 @@ Feature: Perform basic calendar functionality
|
||||
| Type of event | user |
|
||||
| Event title | Really awesome event! |
|
||||
| Description | Come join this awesome event, sucka! |
|
||||
And I click on "//div[@class='commands']//a[contains(@href, 'edit')]" "xpath_element"
|
||||
And I click on "Edit event" "link" in the ".event div.commands" "css_element"
|
||||
And I set the following fields to these values:
|
||||
| Event title | Mediocre event :( |
|
||||
| Description | Wait, this event isn't that great. |
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ if (!empty($CFG->enablecalendarexport)) {
|
||||
array('preset_what'=>'all', 'preset_time' => 'recentupcoming', 'userid' => $USER->id, 'authtoken'=>$authtoken)
|
||||
);
|
||||
echo html_writer::tag('a', 'iCal',
|
||||
array('href' => $link, 'title' => get_string('quickdownloadcalendar', 'calendar'), 'class' => 'ical-link'));
|
||||
array('href' => $link, 'title' => get_string('quickdownloadcalendar', 'calendar'), 'class' => 'ical-link m-l-1'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -88,7 +88,8 @@ if (empty($action)) {
|
||||
$return = $manager->print_comments($page);
|
||||
// if no comments available, $return will be false
|
||||
if ($return) {
|
||||
echo '<input type="submit" id="comments_delete" name="batchdelete" value="'.get_string('delete').'" />';
|
||||
echo '<input type="submit" class="btn btn-primary" id="comments_delete" name="batchdelete"
|
||||
value="'.get_string('delete').'" />';
|
||||
}
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
@@ -157,7 +157,8 @@ class comment_manager {
|
||||
|
||||
$table = new html_table();
|
||||
$table->head = array (
|
||||
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id'=>'comment_select_all', 'class'=>'comment-report-selectall')),
|
||||
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id' => 'comment_select_all',
|
||||
'class' => 'm-r-1')),
|
||||
get_string('author', 'search'),
|
||||
get_string('content'),
|
||||
get_string('action')
|
||||
|
||||
@@ -168,6 +168,7 @@ class helper {
|
||||
* @return array
|
||||
*/
|
||||
public static function get_category_listitem_actions(\coursecat $category) {
|
||||
global $PAGE;
|
||||
$baseurl = new \moodle_url('/course/management.php', array('categoryid' => $category->id, 'sesskey' => \sesskey()));
|
||||
$actions = array();
|
||||
// Edit.
|
||||
@@ -249,11 +250,11 @@ class helper {
|
||||
);
|
||||
}
|
||||
|
||||
// Roles.
|
||||
// Assign roles.
|
||||
if ($category->can_review_roles()) {
|
||||
$actions['assignroles'] = array(
|
||||
'url' => new \moodle_url('/admin/roles/assign.php', array('contextid' => $category->get_context()->id,
|
||||
'return' => 'management')),
|
||||
'returnurl' => $PAGE->url->out_as_local_url(false))),
|
||||
'icon' => new \pix_icon('t/assignroles', new \lang_string('assignroles', 'role')),
|
||||
'string' => new \lang_string('assignroles', 'role')
|
||||
);
|
||||
@@ -263,12 +264,22 @@ class helper {
|
||||
if ($category->can_review_permissions()) {
|
||||
$actions['permissions'] = array(
|
||||
'url' => new \moodle_url('/admin/roles/permissions.php', array('contextid' => $category->get_context()->id,
|
||||
'return' => 'management')),
|
||||
'returnurl' => $PAGE->url->out_as_local_url(false))),
|
||||
'icon' => new \pix_icon('i/permissions', new \lang_string('permissions', 'role')),
|
||||
'string' => new \lang_string('permissions', 'role')
|
||||
);
|
||||
}
|
||||
|
||||
// Check permissions.
|
||||
if ($category->can_review_permissions()) {
|
||||
$actions['checkroles'] = array(
|
||||
'url' => new \moodle_url('/admin/roles/check.php', array('contextid' => $category->get_context()->id,
|
||||
'returnurl' => $PAGE->url->out_as_local_url(false))),
|
||||
'icon' => new \pix_icon('i/checkpermissions', new \lang_string('checkpermissions', 'role')),
|
||||
'string' => new \lang_string('checkpermissions', 'role')
|
||||
);
|
||||
}
|
||||
|
||||
// Cohorts.
|
||||
if ($category->can_review_cohorts()) {
|
||||
$actions['cohorts'] = array(
|
||||
|
||||
@@ -71,7 +71,7 @@ class format_social extends format_base {
|
||||
public function get_default_blocks() {
|
||||
return array(
|
||||
BLOCK_POS_LEFT => array(),
|
||||
BLOCK_POS_RIGHT => array()
|
||||
BLOCK_POS_RIGHT => array('social_activities')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+13
-1
@@ -3707,7 +3707,19 @@ function course_get_user_navigation_options($context, $course = null) {
|
||||
$sitecontext = context_system::instance();
|
||||
}
|
||||
|
||||
$options = new stdClass;
|
||||
// Sets defaults for all options.
|
||||
$options = (object) [
|
||||
'badges' => false,
|
||||
'blogs' => false,
|
||||
'calendar' => false,
|
||||
'competencies' => false,
|
||||
'grades' => false,
|
||||
'notes' => false,
|
||||
'participants' => false,
|
||||
'search' => false,
|
||||
'tags' => false,
|
||||
];
|
||||
|
||||
$options->blogs = !empty($CFG->enableblogs) &&
|
||||
($CFG->bloglevel == BLOG_GLOBAL_LEVEL ||
|
||||
($CFG->bloglevel == BLOG_SITE_LEVEL and ($isloggedin and !$isguestuser)))
|
||||
|
||||
+25
-3
@@ -81,9 +81,31 @@ if ($switchrole > 0 && has_capability('moodle/role:switchroles', $context)) {
|
||||
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();
|
||||
// Overall criteria aggregation.
|
||||
$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;
|
||||
}
|
||||
}
|
||||
echo $OUTPUT->box(markdown_to_html(get_string('switchroleto_help')));
|
||||
|
||||
foreach ($roles as $key => $role) {
|
||||
$url = new moodle_url('/course/switchrole.php', array('id' => $id, 'switchrole' => $key, 'returnurl' => $returnurl));
|
||||
echo $OUTPUT->container($OUTPUT->single_button($url, $role), 'm-x-3 m-b-1');
|
||||
}
|
||||
|
||||
$url = new moodle_url($returnurl);
|
||||
echo $OUTPUT->container($OUTPUT->action_link($url, get_string('cancel')), 'm-x-3 m-b-1');
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
|
||||
@@ -121,7 +121,7 @@ Feature: Test category management actions
|
||||
And I click on "Back to Category: Cat 1" "link"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-listing h3" "css_element"
|
||||
And "Cat 1" "link" should exist in the "#category-listing" "css_element"
|
||||
|
||||
Scenario: Test I can set access permissions for a category through the management interface.
|
||||
Given the following "categories" exist:
|
||||
@@ -140,7 +140,7 @@ Feature: Test category management actions
|
||||
And I click on "Back to Category: Cat 1" "link"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-listing h3" "css_element"
|
||||
And I should see "Cat 1" in the "#course-listing" "css_element"
|
||||
|
||||
Scenario: Test clicking to manage cohorts for a category through the management interface.
|
||||
Given the following "categories" exist:
|
||||
|
||||
@@ -26,9 +26,9 @@ Feature: Rename roles within a course
|
||||
| Your word for 'Non-editing teacher' | Tutor |
|
||||
| Your word for 'Student' | Learner |
|
||||
And I press "Save and display"
|
||||
And I expand "Switch role to..." node
|
||||
Then I should see "Tutor"
|
||||
And I should see "Learner"
|
||||
And I follow "Switch role to..." in the user menu
|
||||
Then "Tutor" "button" should exist
|
||||
And "Learner" "button" should exist
|
||||
And I follow "Participants"
|
||||
And the "roleid" select box should contain "Tutor"
|
||||
And the "roleid" select box should contain "Learner"
|
||||
@@ -38,10 +38,10 @@ Feature: Rename roles within a course
|
||||
| Your word for 'Non-editing teacher' | |
|
||||
| Your word for 'Student' | |
|
||||
And I press "Save and display"
|
||||
And I expand "Switch role to..." node
|
||||
And I follow "Switch role to..." in the user menu
|
||||
And I should see "Teacher"
|
||||
And I should see "Student"
|
||||
And I should not see "Learner"
|
||||
And "Student" "button" should exist
|
||||
And "Learner" "button" should not exist
|
||||
And I follow "Participants"
|
||||
And the "roleid" select box should contain "Non-editing teacher"
|
||||
And the "roleid" select box should contain "Student"
|
||||
|
||||
@@ -2935,12 +2935,20 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertTrue($navoptions->tags);
|
||||
$this->assertFalse($navoptions->search);
|
||||
$this->assertTrue($navoptions->calendar);
|
||||
$this->assertTrue($navoptions->competencies);
|
||||
|
||||
// Enable global search now.
|
||||
$CFG->enableglobalsearch = 1;
|
||||
$navoptions = course_get_user_navigation_options($context, $course);
|
||||
$this->assertTrue($navoptions->search);
|
||||
|
||||
// Disable competencies.
|
||||
$oldcompetencies = get_config('core_competency', 'enabled');
|
||||
set_config('enabled', false, 'core_competency');
|
||||
$navoptions = course_get_user_navigation_options($context, $course);
|
||||
$this->assertFalse($navoptions->competencies);
|
||||
set_config('enabled', $oldcompetencies, 'core_competency');
|
||||
|
||||
// Now try with a standard user.
|
||||
$user = $this->getDataGenerator()->create_user();
|
||||
$this->setUser($user);
|
||||
|
||||
@@ -1851,23 +1851,26 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
foreach ($course['options'] as $option) {
|
||||
$navoptions->{$option['name']} = $option['available'];
|
||||
}
|
||||
$this->assertCount(9, $course['options']);
|
||||
if ($course['id'] == SITEID) {
|
||||
$this->assertCount(8, $course['options']);
|
||||
$this->assertTrue($navoptions->blogs);
|
||||
$this->assertFalse($navoptions->notes);
|
||||
$this->assertFalse($navoptions->participants);
|
||||
$this->assertTrue($navoptions->badges);
|
||||
$this->assertTrue($navoptions->tags);
|
||||
$this->assertFalse($navoptions->grades);
|
||||
$this->assertFalse($navoptions->search);
|
||||
$this->assertTrue($navoptions->calendar);
|
||||
$this->assertTrue($navoptions->competencies);
|
||||
} else {
|
||||
$this->assertCount(6, $course['options']);
|
||||
$this->assertTrue($navoptions->blogs);
|
||||
$this->assertFalse($navoptions->notes);
|
||||
$this->assertTrue($navoptions->participants);
|
||||
$this->assertTrue($navoptions->badges);
|
||||
$this->assertFalse($navoptions->tags);
|
||||
$this->assertTrue($navoptions->grades);
|
||||
$this->assertFalse($navoptions->search);
|
||||
$this->assertFalse($navoptions->calendar);
|
||||
$this->assertTrue($navoptions->competencies);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1088,8 +1088,11 @@ class core_course_management_helper_test extends advanced_testcase {
|
||||
* Tests the fetching of actions for a category.
|
||||
*/
|
||||
public function test_get_category_listitem_actions() {
|
||||
global $PAGE;
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$PAGE->set_url(new moodle_url('/course/management.php'));
|
||||
|
||||
$generator = $this->getDataGenerator();
|
||||
$category = $generator->create_category();
|
||||
$context = context_system::instance();
|
||||
|
||||
@@ -64,6 +64,11 @@ class behat_enrol extends behat_base {
|
||||
// Set form fields.
|
||||
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $table);
|
||||
|
||||
// Ensure we get button in focus, before pressing button.
|
||||
if ($this->running_javascript()) {
|
||||
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
|
||||
}
|
||||
|
||||
// Save changes.
|
||||
$this->execute("behat_forms::press_button", get_string('addinstance', 'enrol'));
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text
|
||||
When I set the field "Grade report" to "Plain text file"
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I click on "Course total" "checkbox"
|
||||
And I set the field "Grade export decimal points" to "1"
|
||||
@@ -41,7 +41,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using real
|
||||
When I set the field "Grade report" to "Plain text file"
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Real | 1 |
|
||||
@@ -52,7 +52,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using percentages and letters
|
||||
When I set the field "Grade report" to "Plain text file"
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Percentage | 1 |
|
||||
| Letter | 1 |
|
||||
@@ -65,7 +65,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using real, percentages and letters
|
||||
When I set the field "Grade report" to "Plain text file"
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Real | 1 |
|
||||
| Percentage | 1 |
|
||||
|
||||
@@ -21,14 +21,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text
|
||||
When I navigate to "XML file" node in "Grade administration > Export"
|
||||
When I go to "Export > XML file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I set the field "Grade export decimal points" to "1"
|
||||
And I press "Download"
|
||||
|
||||
@@ -228,7 +228,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
|
||||
$remarkparams = array(
|
||||
'name' => '{NAME}[criteria][{CRITERION-id}][remark]',
|
||||
'id' => $remarkid,
|
||||
'cols' => '65', 'rows' => '5', 'class' => 'markingguideremark',
|
||||
'cols' => '65', 'rows' => '5', 'class' => 'markingguideremark form-control',
|
||||
'aria-labelledby' => '{NAME}-remarklabel{CRITERION-id}'
|
||||
);
|
||||
|
||||
@@ -239,7 +239,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
|
||||
if (!empty($comments)) {
|
||||
// Frequently used comments chooser.
|
||||
$chooserbuttonid = 'criteria-' . $criterion['id'] . '-commentchooser';
|
||||
$commentchooserparams = array('id' => $chooserbuttonid, 'class' => 'commentchooser');
|
||||
$commentchooserparams = array('id' => $chooserbuttonid, 'class' => 'commentchooser btn btn-secondary');
|
||||
$commentchooser = html_writer::tag('button', get_string('insertcomment', 'gradingform_guide'),
|
||||
$commentchooserparams);
|
||||
|
||||
@@ -273,7 +273,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
|
||||
$scoreinputparams = array(
|
||||
'type' => 'text',
|
||||
'name' => '{NAME}[criteria][{CRITERION-id}][score]',
|
||||
'class' => $scoreclass,
|
||||
'class' => $scoreclass . ' form-control',
|
||||
'id' => '{NAME}-criteria-{CRITERION-id}-score',
|
||||
'size' => '3',
|
||||
'value' => $currentscore,
|
||||
@@ -534,7 +534,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$html = html_writer::start_tag('div', array('class' => 'options'));
|
||||
$html .= html_writer::tag('div', get_string('guideoptions', 'gradingform_guide'), array('class' => 'optionsheading'));
|
||||
$attrs = array('type' => 'hidden', 'name' => '{NAME}[options][optionsset]', 'value' => 1);
|
||||
$attrs = array('type' => 'hidden', 'name' => '{NAME}[options][optionsset]', 'value' => 1, 'class' => 'form-control');
|
||||
$html .= html_writer::empty_tag('input', $attrs);
|
||||
foreach ($options as $option => $value) {
|
||||
$html .= html_writer::start_tag('div', array('class' => 'option '.$option));
|
||||
|
||||
+14
-4
@@ -813,13 +813,23 @@ function grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=fa
|
||||
}
|
||||
}
|
||||
|
||||
$tabs[] = $top_row;
|
||||
$tabs[] = $bottom_row;
|
||||
// Do not display rows that contain only one item, they are not helpful.
|
||||
if (count($top_row) > 1) {
|
||||
$tabs[] = $top_row;
|
||||
}
|
||||
if (count($bottom_row) > 1) {
|
||||
$tabs[] = $bottom_row;
|
||||
}
|
||||
if (empty($tabs)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rv = html_writer::div(print_tabs($tabs, $active_plugin, $inactive, $activated, true), 'grade-navigation');
|
||||
|
||||
if ($return) {
|
||||
return print_tabs($tabs, $active_plugin, $inactive, $activated, true);
|
||||
return $rv;
|
||||
} else {
|
||||
print_tabs($tabs, $active_plugin, $inactive, $activated);
|
||||
echo $rv;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -93,7 +93,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -16- |
|
||||
| Student 1 | 90.00 |
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -6- | -7- | -13- | -16- |
|
||||
| Student 1 | - | - | - | 90.00 |
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -126,7 +126,9 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
And I set the field "ajaxgrade" to "Very good"
|
||||
And I set the field "ajaxfeedback" to "Student 2 SU feedback"
|
||||
And I press key "13" in the field "ajaxfeedback"
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
# Reload grader report:
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -7- | -13- | -16- |
|
||||
| Student 2 | 33.00 | Very good | 36.00 |
|
||||
@@ -142,7 +144,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 +164,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 +195,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
And I should see "Course total"
|
||||
@@ -97,8 +96,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
And I should see "Course total"
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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,11 +52,11 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
|
||||
@javascript
|
||||
Scenario: I can update grades, add feedback and exclude grades.
|
||||
Given I select "Single view" from the "Grade report" singleselect
|
||||
Given I go to "View > Single view" in the course gradebook
|
||||
And I select "Student 4" from the "Select user..." singleselect
|
||||
And I set the field "Override for Test assignment one" to "1"
|
||||
When I set the following fields to these values:
|
||||
@@ -97,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I click on "Single view" "option"
|
||||
Given I go to "View > Single view" in the course gradebook
|
||||
And I click on "Student 4" "option"
|
||||
And the "Exclude for Test assignment one" "checkbox" should be disabled
|
||||
And the "Override for Test assignment one" "checkbox" should be enabled
|
||||
@@ -106,7 +105,7 @@ Feature: We can use Single view
|
||||
Scenario: Single view links work on grade report.
|
||||
Given I follow "Single view for Test assignment one"
|
||||
Then I should see "Test assignment one"
|
||||
Then I follow "Grader report"
|
||||
Then I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Single view for Student 1"
|
||||
Then I should see "Student 1"
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ Feature: View the user report as the student will see it
|
||||
| assign | C1 | a6 | Test assignment six | Submit something! | 100 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Gradebook setup" node in "Course administration"
|
||||
And I go 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -48,7 +48,7 @@ Feature: View the user report as the student will see it
|
||||
And I change window size to "medium"
|
||||
|
||||
Scenario: View the report as the teacher themselves
|
||||
When I navigate to "User report" node in "Grade administration"
|
||||
When I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -64,7 +64,7 @@ Feature: View the user report as the student will see it
|
||||
| Course total | - | 383.00 | 0–600 | 63.83 % | - |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective
|
||||
When I navigate to "User report" node in "Grade administration"
|
||||
When I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "User report" in the course gradebook
|
||||
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 % | - |
|
||||
@@ -99,10 +99,10 @@ Feature: View the user report as the student will see it
|
||||
| Test assignment six |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective with totals excluding hidden
|
||||
Given I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
Given I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I navigate to "User report" node in "Grade administration"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "User report" in the course gradebook
|
||||
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 % |
|
||||
@@ -137,10 +137,10 @@ Feature: View the user report as the student will see it
|
||||
| Test assignment six |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective with totals including hidden
|
||||
Given I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
Given I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals including hidden items"
|
||||
And I press "Save changes"
|
||||
And I navigate to "User report" node in "Grade administration"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "User report" in the course gradebook
|
||||
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 % |
|
||||
@@ -183,11 +183,10 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Gradebook setup" node in "Course administration"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I navigate to "User report" node in "Grade administration"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -204,7 +203,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "User report" in the course gradebook
|
||||
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,6 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I go to "View > User report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -245,4 +245,49 @@ class behat_grade extends behat_base {
|
||||
$courseid = $DB->get_field('course', 'id', array('shortname' => $coursename), MUST_EXIST);
|
||||
set_config('gradebook_calculations_freeze_' . $courseid, $version);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
|
||||
*
|
||||
* Examples:
|
||||
* - I go to "Setup > Gradebook setup" in the course gradebook
|
||||
* - I go to "Scales" in the course gradebook
|
||||
* - I go to "Letters > View" in the course gradebook
|
||||
* - I go to "View > User report" in the course gradebook // for teachers
|
||||
* - I go to "User report" in the course gradebook // for students
|
||||
*
|
||||
* @Given /^I go to "(?P<gradepath_string>(?:[^"]|\\")*)" in the course gradebook$/
|
||||
* @param string $gradepath
|
||||
*/
|
||||
public function i_go_to_in_the_course_gradebook($gradepath) {
|
||||
$gradepath = preg_split('/\s*>\s*/', trim($gradepath));
|
||||
if (count($gradepath) > 2) {
|
||||
throw new DriverException('Grade path is too long (must have no more than two items separated with ">")');
|
||||
}
|
||||
|
||||
// If we are not on one of the gradebook pages already, follow "Grades" link in the navigation block.
|
||||
$xpath = '//div[contains(@class,\'grade-navigation\')]';
|
||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpath)) {
|
||||
$this->execute("behat_general::i_click_on_in_the", array(get_string('grades'), 'link',
|
||||
get_string('pluginname', 'block_navigation'), 'block'));
|
||||
}
|
||||
|
||||
// If the first row of the grade-navigation tabs does not have $gradepath[0] as active tab, click on it.
|
||||
$link = '\'' . $this->escape($gradepath[0]) . '\'';
|
||||
$xpathrow1 = $xpath . '//ul[1]//*[contains(@class,\'active\') and contains(normalize-space(.), ' . $link . ')]';
|
||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow1)) {
|
||||
$this->find('xpath', $xpath . '//ul[1]/li/a[text()=' . $link . ']')->click();
|
||||
$this->wait_for_pending_js();
|
||||
}
|
||||
|
||||
if (isset($gradepath[1])) {
|
||||
// If the second row of the grade-navigation tabs does not have $gradepath[1] as active tab, click on it.
|
||||
$link = '\'' . $this->escape($gradepath[1]) . '\'';
|
||||
$xpathrow2 = $xpath . '//ul[2]//*[contains(@class,\'active\') and contains(normalize-space(.), ' . $link . ')]';
|
||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow2)) {
|
||||
$this->find('xpath', $xpath . '//ul[2]/li/a[text()=' . $link . ']')->click();
|
||||
$this->wait_for_pending_js();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -60,7 +60,7 @@ Feature: We can use calculated grade totals
|
||||
And I set the following settings for grade item "Test assignment eight":
|
||||
| Hidden | 1 |
|
||||
And I change window size to "medium"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Grade display type" to "Real (percentage)"
|
||||
And I press "Save changes"
|
||||
|
||||
@@ -74,7 +74,7 @@ Feature: We can use calculated grade totals
|
||||
| Exclude empty grades | 0 |
|
||||
And I turn editing mode off
|
||||
Then I should see "30.00 (30.00 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -96,7 +96,7 @@ Feature: We can use calculated grade totals
|
||||
| Item weight | 3 |
|
||||
And I turn editing mode off
|
||||
Then I should see "27.14 (27.14 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -116,7 +116,7 @@ Feature: We can use calculated grade totals
|
||||
| Extra credit | 1 |
|
||||
And I turn editing mode off
|
||||
Then I should see "45.19 (45.19 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -136,7 +136,7 @@ Feature: We can use calculated grade totals
|
||||
| Extra credit weight | 2 |
|
||||
And I turn editing mode off
|
||||
Then I should see "42.50 (42.50 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -154,7 +154,7 @@ Feature: We can use calculated grade totals
|
||||
| Exclude empty grades | 0 |
|
||||
And I turn editing mode off
|
||||
Then I should see "26.67 (26.67 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -176,7 +176,7 @@ Feature: We can use calculated grade totals
|
||||
| Hidden | 1 |
|
||||
And I turn editing mode off
|
||||
Then I should see "0.00 (0.00 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -196,7 +196,7 @@ Feature: We can use calculated grade totals
|
||||
| Hidden | 1 |
|
||||
And I turn editing mode off
|
||||
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -216,7 +216,7 @@ Feature: We can use calculated grade totals
|
||||
| Hidden | 1 |
|
||||
And I turn editing mode off
|
||||
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
@@ -236,16 +236,15 @@ 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 expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
| Include outcomes in aggregation | 1 |
|
||||
| Exclude empty grades | 0 |
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
@@ -258,9 +257,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Test outcome item one":
|
||||
| Extra credit | 1 |
|
||||
And I log out
|
||||
@@ -272,9 +269,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
| Include outcomes in aggregation | 0 |
|
||||
@@ -297,9 +292,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I expand "Setup" node
|
||||
And I follow "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
| Include outcomes in aggregation | 1 |
|
||||
@@ -307,10 +300,10 @@ Feature: We can use calculated grade totals
|
||||
And I set the following settings for grade item "Test outcome item one":
|
||||
| Weight adjusted | 1 |
|
||||
| aggregationcoef2 | 100 |
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
@@ -338,13 +331,13 @@ Feature: We can use calculated grade totals
|
||||
| Extra credit | 1 |
|
||||
And I turn editing mode off
|
||||
Then I should see "152.68 (24.43 %)" in the ".course" "css_element"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I press "Save changes"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
@@ -379,7 +372,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I set the following settings for grade item "Sub category 1":
|
||||
| Aggregation | Natural |
|
||||
@@ -390,7 +383,7 @@ Feature: We can use calculated grade totals
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
| Exclude empty grades | 0 |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Category name | Sub category 3 |
|
||||
@@ -412,7 +405,7 @@ Feature: We can use calculated grade totals
|
||||
| Item name | Manual item 3 |
|
||||
| Grade category | Sub category 3 |
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I give the grade "60.00" to the user "Student 1" for the grade item "Manual item 1"
|
||||
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
|
||||
And I give the grade "40.00" to the user "Student 1" for the grade item "Manual item 3"
|
||||
@@ -446,18 +439,18 @@ Feature: We can use calculated grade totals
|
||||
And I press "Save changes"
|
||||
And I turn editing mode off
|
||||
And I should see "250.00 (25.25 %)" in the ".course" "css_element"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Category name | Sub sub category 1 |
|
||||
| Parent category | Sub category 3 |
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I should see "270.00 (24.77 %)" in the ".course" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: Natural aggregation from the setup screen
|
||||
And I select "Gradebook setup" from the "Grade report" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
And I set the following settings for grade item "Sub category 1":
|
||||
@@ -519,7 +512,7 @@ Feature: We can use calculated grade totals
|
||||
| Aggregation | Natural |
|
||||
| Exclude empty grades | 0 |
|
||||
And I turn editing mode off
|
||||
And I select "Gradebook setup" from the "Grade report" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Override weight of Test assignment one" to "1"
|
||||
And I set the field "Weight of Test assignment one" to "0"
|
||||
And I set the field "Override weight of Test assignment six" to "1"
|
||||
@@ -527,14 +520,14 @@ Feature: We can use calculated grade totals
|
||||
And I set the field "Override weight of Test assignment nine" to "1"
|
||||
And I set the field "Weight of Test assignment nine" to "100"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I press "Save changes"
|
||||
Then I should see "75.00 (16.85 %)" in the ".course" "css_element"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
|
||||
@@ -35,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I follow "Edit Cat mean"
|
||||
And I set the following fields to these values:
|
||||
@@ -336,13 +335,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
@javascript
|
||||
Scenario: Switching grade items between categories
|
||||
# Move to same aggregation (Natural).
|
||||
Given I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
Given I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
When I select "Cat natural" from the "Move selected items to" singleselect
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
Then the field "Weight adjusted" matches value "0"
|
||||
And the field "Extra credit" matches value "0"
|
||||
@@ -362,13 +361,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
And the field "Extra credit" matches value "1"
|
||||
And I press "Cancel"
|
||||
# Move to Mean of grades (with extra credit).
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
And I select "Cat ec" from the "Move selected items to" singleselect
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
And the field "Extra credit" matches value "0"
|
||||
And I press "Cancel"
|
||||
@@ -382,13 +381,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
And the field "Extra credit" matches value "1"
|
||||
And I press "Cancel"
|
||||
# Move to Simple weight mean of grades.
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
And I select "Cat simple" from the "Move selected items to" singleselect
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
And the field "Extra credit" matches value "0"
|
||||
And I press "Cancel"
|
||||
@@ -402,13 +401,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
And the field "Extra credit" matches value "1"
|
||||
And I press "Cancel"
|
||||
# Move to Weighted mean of grades.
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
And I select "Cat weighted" from the "Move selected items to" singleselect
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
And the field "Item weight" matches value "1"
|
||||
And I set the field "Item weight" to "2"
|
||||
@@ -426,14 +425,14 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
And I set the field "Item weight" to "11"
|
||||
And I press "Save changes"
|
||||
# Move to same (Weighted mean of grades).
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
And I select "Cat weighted2" from the "Move selected items to" singleselect
|
||||
And I wait "2" seconds
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
And the field "Item weight" matches value "2"
|
||||
And I press "Save changes"
|
||||
@@ -447,13 +446,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
|
||||
And the field "Item weight" matches value "11"
|
||||
And I press "Save changes"
|
||||
# Move back to Natural.
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Select Item a1" to "1"
|
||||
And I set the field "Select Item a2" to "1"
|
||||
And I set the field "Select Item a3" to "1"
|
||||
And I set the field "Select Item a4" to "1"
|
||||
And I select "Course 1" from the "Move selected items to" singleselect
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I follow "Edit Item a1"
|
||||
And the field "Weight adjusted" matches value "0"
|
||||
And the field "Extra credit" matches value "0"
|
||||
|
||||
@@ -24,19 +24,18 @@ Feature: Average grades are displayed in the gradebook
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
# Enable averages
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Show average | Show |
|
||||
And I press "Save changes"
|
||||
# Add a manual grade item
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | Manual item 1 |
|
||||
And I press "Save changes"
|
||||
# Give all student the same grade for the manual grade item
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 1"
|
||||
And I give the grade "50.00" to the user "Student 2" for the grade item "Manual item 1"
|
||||
@@ -52,7 +51,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 +60,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "User report" in the course gradebook
|
||||
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,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
|
||||
@javascript
|
||||
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed
|
||||
@@ -39,11 +38,11 @@ Feature: Calculated grade items can be used in the gradebook
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 50 |
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -66,24 +65,24 @@ Feature: Calculated grade items can be used in the gradebook
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 50 |
|
||||
And I follow "Grader report"
|
||||
And I turn editing mode on
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I press "Turn editing on"
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
|
||||
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–50 | 75.00 % | - |
|
||||
| Course total | - | 37.50 | 0–50 | 75.00 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 40 |
|
||||
And I follow "Grader report"
|
||||
And I go 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"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -96,11 +95,11 @@ Feature: Calculated grade items can be used in the gradebook
|
||||
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
|
||||
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–40 | 81.25 % | - |
|
||||
| Course total | - | 32.50 | 0–40 | 81.25 % | - |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Min and max grades used in calculation | Initial min and max grades |
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -128,29 +127,29 @@ Feature: Calculated grade items can be used in the gradebook
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "calc item":
|
||||
| Maximum grade | 50 |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Min and max grades used in calculation | Initial min and max grades |
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I turn editing mode on
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I press "Turn editing on"
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| grade item 1 | 66.67 % | 75.00 | 0–100 | 75.00 % | 50.00 % |
|
||||
| calc item | 33.33 % | 37.50 | 0–50 | 75.00 % | 25.00 % |
|
||||
| Course total | - | 112.50 | 0–150 | 75.00 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "calc item":
|
||||
| Rescale existing grades | No |
|
||||
| Maximum grade | 40 |
|
||||
And I follow "Grader report"
|
||||
And I go 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"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -22,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
|
||||
@javascript
|
||||
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed
|
||||
@@ -40,11 +39,11 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 50 |
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -67,24 +66,24 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 50 |
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
|
||||
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - |
|
||||
| Course total | - | 37.50 | 0–100 | 37.50 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Calc cat":
|
||||
| Maximum grade | 40 |
|
||||
And I follow "Grader report"
|
||||
And I go 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"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -97,11 +96,11 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
|
||||
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
|
||||
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–100 | 32.50 % | - |
|
||||
| Course total | - | 32.50 | 0–100 | 32.50 % | - |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Min and max grades used in calculation | Initial min and max grades |
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -129,29 +128,29 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
|
||||
| grade item 1 | gi1 |
|
||||
And I set the following settings for grade item "calc item":
|
||||
| Maximum grade | 50 |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Min and max grades used in calculation | Initial min and max grades |
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| grade item 1 | 50.00 % | 75.00 | 0–100 | 75.00 % | 37.50 % |
|
||||
| calc item | 50.00 % | 37.50 | 0–100 | 37.50 % | 18.75 % |
|
||||
| Course total | - | 112.50 | 0–200 | 56.25 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "calc item":
|
||||
| Rescale existing grades | No |
|
||||
| Maximum grade | 40 |
|
||||
And I follow "Grader report"
|
||||
And I go 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"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -39,11 +39,11 @@ Feature: We can understand the gradebook user report
|
||||
And I give the grade "70.00" to the user "Student 1" for the grade item "Test assignment five"
|
||||
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment six"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add category"
|
||||
And I set the field "Category name" to "Sub category"
|
||||
And I press "Save changes"
|
||||
@@ -59,7 +59,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: Mean of grades aggregation
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Mean of grades |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -84,7 +84,7 @@ Feature: We can understand the gradebook user report
|
||||
| Item weight | 1.0 |
|
||||
And I set the following settings for grade item "Sub category":
|
||||
| Item weight | 1.0 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -105,7 +105,7 @@ Feature: We can understand the gradebook user report
|
||||
| Aggregation | Simple weighted mean of grades |
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit | 1 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -124,7 +124,7 @@ Feature: We can understand the gradebook user report
|
||||
| Aggregation | Mean of grades (with extra credits) |
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit weight | 1.0 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -141,7 +141,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: Median of grades aggregation
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Median of grades |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -158,7 +158,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: Lowest grade aggregation
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Lowest grade |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -175,7 +175,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: Highest grade aggregation
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Highest grade |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -192,7 +192,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: Mode of grades aggregation
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Mode of grades |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -213,7 +213,7 @@ Feature: We can understand the gradebook user report
|
||||
| Aggregation | Weighted mean of grades |
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit | 1 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
@@ -232,7 +232,7 @@ Feature: We can understand the gradebook user report
|
||||
Scenario: View user report with natural aggregation
|
||||
And I set the following settings for grade item "Test assignment three":
|
||||
| Extra credit | 1 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
|
||||
# Check the values in the weights column.
|
||||
|
||||
@@ -34,7 +34,7 @@ Feature: Editing a grade item
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Gradebook setup" node in "Course administration"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Category name | Cat 1 |
|
||||
@@ -69,11 +69,11 @@ Feature: Editing a grade item
|
||||
And I should not see "You cannot change the scale, as grades already exist for this item"
|
||||
|
||||
Scenario: Attempting to change a category item's grade type when overridden grades already exist
|
||||
Given I navigate to "Grader report" node in "Grade administration"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "Cat 1" "table_row"
|
||||
When I click on "Edit settings" "link" in the "Cat 1" "table_row"
|
||||
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."
|
||||
@@ -85,22 +85,22 @@ Feature: Editing a grade item
|
||||
And I set the field "Grade type" to "Scale"
|
||||
And I set the field "Scale" to "ABCDEF"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "Cat 1" "table_row"
|
||||
When I click on "Edit settings" "link" in the "Cat 1" "table_row"
|
||||
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
|
||||
|
||||
Scenario: Attempting to change a category item's maximum grade when no rescaling option has been chosen
|
||||
Given I navigate to "Grader report" node in "Grade administration"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "Cat 1" "table_row"
|
||||
And I click on "Edit settings" "link" in the "Cat 1" "table_row"
|
||||
And I set the field "Maximum grade" to "50"
|
||||
|
||||
@@ -21,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | Manual item 1 |
|
||||
@@ -40,14 +39,14 @@ Feature: Extra credit contributions are normalised when going out of bounds
|
||||
And I set the following fields to these values:
|
||||
| Item name | Manual item 4 |
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weighting" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -56,7 +55,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
|
||||
And I press "Save changes"
|
||||
|
||||
Scenario Outline: The contribution of extra credit items is normalised
|
||||
Given I set the field "Grade report" to "Gradebook setup"
|
||||
Given I go to "Setup > Gradebook setup" in the course gradebook
|
||||
When I set the following settings for grade item "Course 1":
|
||||
| Aggregation | <aggregation> |
|
||||
And I set the following settings for grade item "Manual item 2":
|
||||
@@ -65,7 +64,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
|
||||
| Extra credit | 1 |
|
||||
And I set the following settings for grade item "Manual item 4":
|
||||
| Extra credit | 1 |
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
|
||||
@@ -22,34 +22,33 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | Manual item 1 |
|
||||
| Minimum grade | 0 |
|
||||
| Maximum grade | 100 |
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
|
||||
Scenario: Change maximum number of points on a graded item.
|
||||
And I follow "Course 1"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
And I press "Save changes"
|
||||
When I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
When I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "Manual item 1" "table_row"
|
||||
And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Maximum grade | 10 |
|
||||
| Rescale existing grades | No |
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
@@ -58,14 +57,14 @@ Feature: We can change the maximum and minimum number of points for manual items
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
| Manual item 1 | 100.00 % | 8.00 | 80.00 % |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "Manual item 1" "table_row"
|
||||
And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Maximum grade | 20 |
|
||||
| Rescale existing grades | Yes |
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -57,8 +56,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "User report" node in "Grade administration"
|
||||
And I go to "User report" in the course gradebook
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % |
|
||||
|
||||
@@ -30,7 +30,7 @@ Feature: Editing a grade item
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Gradebook setup" node in "Course administration"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | MI 1 |
|
||||
@@ -54,11 +54,11 @@ Feature: Editing a grade item
|
||||
And I should not see "You cannot change the scale, as grades already exist for this item"
|
||||
|
||||
Scenario: Attempting to change a manual item's grade type when grades already exist
|
||||
Given I navigate to "Grader report" node in "Grade administration"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "MI 1" "table_row"
|
||||
When I click on "Edit settings" "link" in the "MI 1" "table_row"
|
||||
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."
|
||||
@@ -70,22 +70,22 @@ Feature: Editing a grade item
|
||||
And I set the field "Grade type" to "Scale"
|
||||
And I set the field "Scale" to "ABCDEF"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Grader report" node in "Grade administration"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "MI 1" "table_row"
|
||||
When I click on "Edit settings" "link" in the "MI 1" "table_row"
|
||||
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
|
||||
|
||||
Scenario: Attempting to change a manual item's maximum grade when no rescaling option has been chosen
|
||||
Given I navigate to "Grader report" node in "Grade administration"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
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 "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I click on "Edit" "link" in the "MI 1" "table_row"
|
||||
And I click on "Edit settings" "link" in the "MI 1" "table_row"
|
||||
And I set the field "Maximum grade" to "50"
|
||||
|
||||
@@ -22,18 +22,17 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Course grade settings" from the "Grade report" singleselect
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Grade display type | Letter |
|
||||
And I press "Save changes"
|
||||
And I navigate to "Letters" node in "Grade administration"
|
||||
And I go to "Letters" in the course gradebook
|
||||
And I follow "Edit grade letters"
|
||||
And I set the following fields to these values:
|
||||
| id_override | 1 |
|
||||
| id_gradeboundary10 | 57 |
|
||||
And I press "Save changes"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I press "Turn editing on"
|
||||
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I press "Save changes"
|
||||
|
||||
@@ -23,18 +23,17 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I select "Course grade settings" from the "Grade report" singleselect
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Grade display type | Letter |
|
||||
And I press "Save changes"
|
||||
And I navigate to "Letters" node in "Grade administration"
|
||||
And I go to "Letters" in the course gradebook
|
||||
And I follow "Edit grade letters"
|
||||
And I set the following fields to these values:
|
||||
| id_override | 1 |
|
||||
| id_gradeboundary10 | 57 |
|
||||
And I press "Save changes"
|
||||
And I select "Grader report" from the "Grade report" singleselect
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I press "Turn editing on"
|
||||
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one"
|
||||
And I press "Save changes"
|
||||
|
||||
@@ -27,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | Manual item 1 |
|
||||
@@ -66,14 +65,14 @@ Feature: We can use a minimum grade different than zero
|
||||
| Minimum grade | 50 |
|
||||
| Grade category | Sub category 2 |
|
||||
And I press "Save changes"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
|
||||
@javascript
|
||||
Scenario: Natural aggregation with negative and positive grade
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Sub category 1":
|
||||
| Aggregation | Natural |
|
||||
| Exclude empty grades | 0 |
|
||||
@@ -86,7 +85,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -101,7 +100,7 @@ Feature: We can use a minimum grade different than zero
|
||||
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 5"
|
||||
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 6"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Contribution to course total |
|
||||
|
||||
@@ -26,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I press "Add grade item"
|
||||
And I set the following fields to these values:
|
||||
| Item name | MI 1 |
|
||||
@@ -57,18 +56,18 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| MI 1 | mi1 |
|
||||
| MI 2 | mi2 |
|
||||
| MI 3 | mi3 |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Min and max grades used in calculation" to "Default (Min and max grades as specified in grade item settings)"
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "CAT1":
|
||||
| Aggregation | Natural |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "C1"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -77,7 +76,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
And I give the grade "20.00" to the user "Student 2" for the grade item "MI 1"
|
||||
And I give the grade "10.00" to the user "Student 2" for the grade item "MI 3"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -98,7 +97,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| MI 5 | 33.33 % | 30.00 | 0–100 | 30.00 % | 10.00 % |
|
||||
| CAT1 total | 33.33 % | 10.00 | 0–100 | 10.00 % | - |
|
||||
| Course total | - | 60.00 | 0–300 | 20.00 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "MI 1":
|
||||
| Maximum grade | 50.00 |
|
||||
| Minimum grade | 5.00 |
|
||||
@@ -107,7 +106,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| Maximum grade | 50.00 |
|
||||
| Minimum grade | 5.00 |
|
||||
| Rescale existing grades | No |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -128,11 +127,11 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| MI 5 | 50.00 % | 30.00 | 0–100 | 30.00 % | 15.00 % |
|
||||
| CAT1 total | 25.00 % | 10.00 | 0–50 | 20.00 % | - |
|
||||
| Course total | - | 60.00 | 0–200 | 30.00 % | - |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "MI 5":
|
||||
| Maximum grade | 200.00 |
|
||||
| Rescale existing grades | No |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -143,10 +142,10 @@ Feature: We can choose what min or max grade to use when aggregating grades.
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| MI 5 | 66.67 % | 30.00 | 0–200 | 15.00 % | 10.00 % |
|
||||
| Course total | - | 60.00 | 0–300 | 20.00 % | - |
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
When I set the field "Min and max grades used in calculation" to "Initial min and max grades"
|
||||
And I press "Save changes"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -25,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Test assignment four (extra)":
|
||||
| Extra credit | 1 |
|
||||
And I set the following settings for grade item "Test assignment five (extra)":
|
||||
@@ -34,7 +33,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -42,7 +41,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -56,14 +55,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -77,12 +76,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -102,14 +101,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -126,7 +125,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -134,7 +133,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -151,14 +150,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -175,12 +174,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -199,7 +198,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -207,7 +206,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -226,14 +225,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -252,12 +251,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -26,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Test assignment four (extra)":
|
||||
| Extra credit | 1 |
|
||||
And I set the following settings for grade item "Test assignment five (extra)":
|
||||
@@ -35,7 +34,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -43,7 +42,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -57,14 +56,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -78,12 +77,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -103,14 +102,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -127,7 +126,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -135,7 +134,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -153,14 +152,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -178,12 +177,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -202,7 +201,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
@@ -210,7 +209,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -230,14 +229,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
@@ -257,12 +256,12 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
When I go to "View > Grader report" in the course gradebook
|
||||
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)"
|
||||
And I press "Save changes"
|
||||
And I set the field "Grade report" to "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I set the field "Select all or one user" to "Student 1"
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
|
||||
@@ -32,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
|
||||
@javascript
|
||||
Scenario: Setting all weights in a category to exactly one hundred in total.
|
||||
|
||||
@@ -33,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I set the field "Grade report" to "Gradebook setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
|
||||
@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).
|
||||
|
||||
@@ -16,9 +16,7 @@ Feature: Grade letters can be overridden
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "Letters"
|
||||
And I follow "Edit grade letters"
|
||||
And I go to "Letters > Edit" in the course gradebook
|
||||
|
||||
Scenario Outline: Grade letters can be completely overridden
|
||||
When I set the following fields to these values:
|
||||
|
||||
@@ -71,12 +71,11 @@ Feature: View gradebook when scales are used
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I follow "Course 1"
|
||||
And I click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
|
||||
Scenario: Test displaying scales in gradebook in aggregation method Natural
|
||||
@@ -92,14 +91,14 @@ Feature: View gradebook when scales are used
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Range | F–A | 0.00–5.00 | 0.00–5.00 |
|
||||
| Overall average | C | 3.00 | 3.00 |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 3" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | C | F–A | 50.00 % | 60.00 % |
|
||||
| Sub category 1 total | 3.00 | 0–5 | 60.00 % | - |
|
||||
| Course total | 3.00 | 0–5 | 60.00 % | - |
|
||||
And I select "Gradebook setup" from the "Grade report" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And the following should exist in the "grade_edit_tree_table" table:
|
||||
| Name | Max grade |
|
||||
| Test assignment one | 5.00 |
|
||||
@@ -138,14 +137,14 @@ Feature: View gradebook when scales are used
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Range | F–A | 1.00–5.00 | 0.00–100.00 |
|
||||
| Overall average | C | 3.00 | <overallavg> |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 3" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | C | F–A | 50.00 % | <contrib3> |
|
||||
| Sub category (<aggregation>) total<aggregation>. | 3.00 | 1–5 | 50.00 % | - |
|
||||
| Course total<aggregation>. | <coursetotal3> | 0–100 | <courseperc3> | - |
|
||||
And I select "Gradebook setup" from the "Grade report" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And the following should exist in the "grade_edit_tree_table" table:
|
||||
| Name | Max grade |
|
||||
| Test assignment one | A (5) |
|
||||
|
||||
@@ -39,14 +39,14 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
And I press "Save changes"
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| Aggregation | <aggregation> |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Percentage | Contribution to course total |
|
||||
@@ -60,8 +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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Percentage | Contribution to course total |
|
||||
@@ -85,11 +84,11 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
When I set the following settings for grade item "Course 1":
|
||||
| Aggregation | Natural |
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go 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 click on "Edit" "link" in the "Scale me" "table_row"
|
||||
@@ -100,8 +99,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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the field "Override weight of Grade me" to "1"
|
||||
And the field "Override weight of Grade me" matches value "95.238"
|
||||
And I set the field "Override weight of Scale me" to "1"
|
||||
|
||||
@@ -49,12 +49,11 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field "Show weightings" to "Show"
|
||||
And I set the field "Show contribution to course total" to "Show"
|
||||
And I press "Save changes"
|
||||
And I follow "Grader report"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
|
||||
Scenario: Test displaying single item scales in gradebook in aggregation method Natural
|
||||
@@ -66,7 +65,7 @@ Feature: View gradebook when single item scales are used
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Range | Ace!–Ace! | 0.00–1.00 | 0.00–1.00 |
|
||||
| Overall average | Ace! | 1.00 | 1.00 |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Contribution to course total |
|
||||
@@ -79,7 +78,7 @@ Feature: View gradebook when single item scales are used
|
||||
| Test assignment one | - | Ace!–Ace! | - |
|
||||
| Sub category 1 total| - | 0–1 | - |
|
||||
| Course total | - | 0–1 | - |
|
||||
And I select "Gradebook setup" from the "jump" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And the following should exist in the "grade_edit_tree_table" table:
|
||||
| Name | Max grade |
|
||||
| Test assignment one | 1.00 |
|
||||
@@ -104,14 +103,14 @@ Feature: View gradebook when single item scales are used
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Range | Ace!–Ace! | 0.00–100.0 | 0.00–100.00 |
|
||||
| Overall average | Ace! | <catavg> | <overallavg> |
|
||||
And I follow "User report"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Grade | Range | Contribution to course total |
|
||||
| Test assignment one | Ace! | Ace!–Ace! | <contrib1> |
|
||||
| Sub category (<aggregation>) total<aggregation>. | <cattotal1> | 0–100 | - |
|
||||
| Course total<aggregation>. | <coursetotal1> | 0–100 | - |
|
||||
And I select "Gradebook setup" from the "jump" singleselect
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And the following should exist in the "grade_edit_tree_table" table:
|
||||
| Name | Max grade |
|
||||
| Test assignment one | Ace! (1) |
|
||||
|
||||
@@ -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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I click on "Edit glossary Test Glossary 1" "link"
|
||||
And I expand all fieldsets
|
||||
|
||||
@@ -51,17 +51,16 @@ 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 click on "Grades" "link" in the "Navigation" "block"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
And I press "Save changes"
|
||||
|
||||
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
|
||||
When I select "User report" from the "Grade report" singleselect
|
||||
And the "Grade report" select box should contain "Grader report"
|
||||
And the "Grade report" select box should contain "Outcomes report"
|
||||
And the "Grade report" select box should contain "User report"
|
||||
When I go to "View > User report" in the course gradebook
|
||||
And "Grader report" "link" should exist
|
||||
And "Outcomes report" "link" should exist
|
||||
And the "Select all or one user" select box should contain "All users (1)"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
@@ -80,13 +79,12 @@ Feature: We can enter in grades and view reports from the gradebook
|
||||
And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00"
|
||||
|
||||
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
|
||||
When I select "Gradebook setup" from the "Grade report" singleselect
|
||||
When I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I set the following settings for grade item "Course 1":
|
||||
| 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"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I navigate to "Course grade settings" node in "Grade administration > Setup"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Show weightings | Show |
|
||||
And I press "Save changes"
|
||||
|
||||
@@ -74,7 +74,10 @@ $string['pathssubdataroot'] = '<p>Moodle potřebuje prostor, kam si bude ukláda
|
||||
<p>Tento adresář ale zároveň nesmí být dostupný přímo přes webové rozhraní. .</p>
|
||||
<p>Instalační skript se pokusí tento adresář vytvořit, pokud nebude existovat..</p>';
|
||||
$string['pathssubdirroot'] = '<p>Absolutní cesta k adresáři s instalací Moodle.</p>';
|
||||
$string['pathssubwwwroot'] = 'Zadejte úplnou webovou adresu, na níž bude Moodle dostupný. Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít. Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.';
|
||||
$string['pathssubwwwroot'] = '<p>Zadejte úplnou webovou adresu, na níž bude Moodle dostupný, t.j. adresa, kterou zadají uživatelé do adresního řádku svého prohlížeče, aby spustili Moodle.</p>
|
||||
<p>Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít.</p>
|
||||
<p> Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.</p>
|
||||
<p>Pokud aktuální adresa není správná, změňte URL adresu v adresním řádku prohlížeče a spusťte instalaci.</p>';
|
||||
$string['pathsunsecuredataroot'] = 'Umístění datového adresáře není bezpečné';
|
||||
$string['pathswrongadmindir'] = 'Adresář pro správu serveru (admin) neexistuje';
|
||||
$string['phpextension'] = '{$a} PHP rozšíření';
|
||||
|
||||
@@ -66,4 +66,5 @@ $string['phpversionhelp'] = '<p>Moodle necesită o versiune PHP de cel puțin 4
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Vedeți această pagină deoarece ați instalat și lansat cu succes pachetul <strong>{$a->packname} {$a->packversion}</strong> în computerul dumneavoastră. Felicitări!';
|
||||
$string['welcomep40'] = 'Pachetul include și <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep70'] = 'Click pe butonul "Next" de mai jos pentru a continua setarea <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Adresă Web';
|
||||
|
||||
+5
-1
@@ -29,15 +29,18 @@ $string['allusers'] = 'All messages from all users';
|
||||
$string['backupmessageshelp'] = 'If enabled, then instant messages will be included in SITE automated backups';
|
||||
$string['blockcontact'] = 'Block contact';
|
||||
$string['blocknoncontacts'] = 'Prevent non-contacts from messaging me';
|
||||
$string['canceledit'] = 'Cancel editing messages';
|
||||
$string['contactblocked'] = 'Contact blocked';
|
||||
$string['contacts'] = 'Contacts';
|
||||
$string['defaultmessageoutputs'] = 'Default message outputs';
|
||||
$string['defaults'] = 'Defaults';
|
||||
$string['deleteallconfirm'] = "Are you sure you would like to delete this entire conversation?";
|
||||
$string['deleteallmessages'] = "Delete all messages";
|
||||
$string['deleteselectedmessages'] = 'Delete selected messages';
|
||||
$string['disableall'] = 'Disable notifications';
|
||||
$string['disabled'] = 'Messaging is disabled on this site';
|
||||
$string['disallowed'] = 'Disallowed';
|
||||
$string['editmessages'] = 'Edit messages';
|
||||
$string['emailtagline'] = 'This is a copy of a message sent to you at "{$a->sitename}". Go to {$a->url} to reply.';
|
||||
$string['enabled'] = 'Enabled';
|
||||
$string['errorcallingprocessor'] = 'Error calling defined output';
|
||||
@@ -94,6 +97,7 @@ $string['outputnotconfigured'] = 'Not configured';
|
||||
$string['permitted'] = 'Permitted';
|
||||
$string['processorsettings'] = 'Processor settings';
|
||||
$string['removecontact'] = 'Remove contact';
|
||||
$string['removecoursefilter'] = 'Remove filter for course {$a}';
|
||||
$string['removefromyourcontacts'] = 'Remove from your contacts';
|
||||
$string['requiresconfiguration'] = 'Requires configuration';
|
||||
$string['searchforuser'] = 'Search for a user';
|
||||
@@ -122,8 +126,8 @@ $string['unreadnotification'] = 'Unread notification: {$a}';
|
||||
$string['unreadnewmessage'] = 'New message from {$a}';
|
||||
$string['userisblockingyou'] = 'This user has blocked you from sending messages to them';
|
||||
$string['userisblockingyounoncontact'] = '{$a} only accepts messages from their contacts.';
|
||||
$string['viewfullnotification'] = 'View full notification';
|
||||
$string['viewinganotherusersmessagearea'] = 'You are viewing another user\'s message area.';
|
||||
$string['viewmessages'] = 'View messages';
|
||||
$string['viewmessageswith'] = 'View messages with {$a}';
|
||||
$string['viewnotificationresource'] = 'Go to: {$a}';
|
||||
$string['viewunreadmessageswith'] = 'View unread messages with {$a}';
|
||||
|
||||
@@ -1831,6 +1831,9 @@ $string['switchdevicedefault'] = 'Switch to the standard theme';
|
||||
$string['switchdevicerecommended'] = 'Switch to the recommended theme for your device';
|
||||
$string['switchrolereturn'] = 'Return to my normal role';
|
||||
$string['switchroleto'] = 'Switch role to...';
|
||||
$string['switchroleto_help'] = 'Choose a role to get an idea of how someone with that role will see this course.
|
||||
|
||||
Please note that this view may not be perfect (<a href="https://docs.moodle.org/en/Switch_roles">See details and alternatives</a>).';
|
||||
$string['tag'] = 'Tag';
|
||||
$string['tagalready'] = 'This tag already exists';
|
||||
$string['tagmanagement'] = 'Add/delete tags ...';
|
||||
|
||||
@@ -3169,6 +3169,11 @@ function get_assignable_roles(context $context, $rolenamedisplay = ROLENAME_ALIA
|
||||
function get_switchable_roles(context $context) {
|
||||
global $USER, $DB;
|
||||
|
||||
// You can't switch roles without this capability.
|
||||
if (!has_capability('moodle/role:switchroles', $context)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$extrajoins = '';
|
||||
$extrawhere = '';
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
define(["jquery","core/modal_factory","core/templates","core/str","core/notification"],function(a,b,c,d,e){return{init:function(f){var g=a("[data-key=addblock]");d.get_string("addblock").done(function(e){var h=[];a.each(f.blocks,function(a,b){h[h.length]={key:"pluginname",component:"block_"+b}});var i=[];d.get_strings(h).done(function(d){a.each(d,function(a,b){i[i.length]={name:f.blocks[a],title:b}}),f.blocks=i,b.create({title:e,body:c.render("core/add_block_body",f),type:"CANCEL"},g)})}).fail(e.exception)}}});
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
define(["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_events"],function(a,b,c,d,e){var f={CANCEL_BUTTON:'[data-action="cancel"]'},g=function(a){d.call(this,a),this.getFooter().find(f.CANCEL_BUTTON).length||b.exception({message:"No cancel button found"})};return g.prototype=Object.create(d.prototype),g.prototype.constructor=g,g.prototype.setFooter=function(){b.exception({message:"Can not change the footer of a cancel modal"})},g.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this),this.getModal().on(c.events.activate,f.CANCEL_BUTTON,function(b,c){var d=a.Event(e.cancel);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this))},g});
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
define(["jquery","core/modal_events","core/modal","core/modal_save_cancel","core/modal_confirm","core/templates","core/notification","core/custom_interaction_events"],function(a,b,c,d,e,f,g,h){var i={DEFAULT:"core/modal",SAVE_CANCEL:"core/modal_save_cancel",CONFIRM:"core/modal_confirm"},j={DEFAULT:c,SAVE_CANCEL:d,CONFIRM:e},k={DEFAULT:"DEFAULT",SAVE_CANCEL:"SAVE_CANCEL",CONFIRM:"CONFIRM"},l=function(a,c){"undefined"!=typeof c&&(h.define(c,[h.events.activate]),c.on(h.events.activate,function(){a.show()}),a.getRoot().on(b.hidden,function(){c.focus()}))},m=function(b,c,d){c=a(c);var e=j[b],f=new e(c);return l(f,d),f},n=function(b,c){var d=i[b];return f.render(d,{}).then(function(d){var e=a(d);return m(b,e,c)}).fail(g.exception)},o=function(a,b){var c=a.type||k.DEFAULT,d=!!a.large;return k[c]||(c=k.DEFAULT),n(c,b).then(function(b){return"undefined"!=typeof a.title&&b.setTitle(a.title),"undefined"!=typeof a.body&&b.setBody(a.body),"undefined"!=typeof a.footer&&b.setFooter(a.footer),d&&b.setLarge(),b})};return{create:o,types:k}});
|
||||
define(["jquery","core/modal_events","core/modal","core/modal_save_cancel","core/modal_confirm","core/modal_cancel","core/templates","core/notification","core/custom_interaction_events"],function(a,b,c,d,e,f,g,h,i){var j={DEFAULT:"core/modal",SAVE_CANCEL:"core/modal_save_cancel",CONFIRM:"core/modal_confirm",CANCEL:"core/modal_cancel"},k={DEFAULT:c,SAVE_CANCEL:d,CONFIRM:e,CANCEL:f},l={DEFAULT:"DEFAULT",SAVE_CANCEL:"SAVE_CANCEL",CONFIRM:"CONFIRM",CANCEL:"CANCEL"},m=function(a,c){"undefined"!=typeof c&&(i.define(c,[i.events.activate]),c.on(i.events.activate,function(b,c){a.show(),c.originalEvent.preventDefault()}),a.getRoot().on(b.hidden,function(){c.focus()}))},n=function(b,c,d){c=a(c);var e=k[b],f=new e(c);return m(f,d),f},o=function(b,c){var d=j[b];return g.render(d,{}).then(function(d){var e=a(d);return n(b,e,c)}).fail(h.exception)},p=function(a,b){var c=a.type||l.DEFAULT,d=!!a.large;return l[c]||(c=l.DEFAULT),o(c,b).then(function(b){return"undefined"!=typeof a.title&&b.setTitle(a.title),"undefined"!=typeof a.body&&b.setBody(a.body),"undefined"!=typeof a.footer&&b.setFooter(a.footer),d&&b.setLarge(),b})};return{create:p,types:l}});
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
define(["core/yui","jquery","core/log"],function(a,b,c){var d={types:{success:"core/notification_success",info:"core/notification_info",warning:"core/notification_warning",error:"core/notification_error"},fieldName:"user-notifications",fetchNotifications:function(){require(["core/ajax"],function(a){var b=a.call([{methodname:"core_fetch_notifications",args:{contextid:d.contextid}}]);b[0].done(d.addNotifications)})},addNotifications:function(a){a||(a=[]),b.each(a,function(a,b){d.renderNotification(b.template,b.variables)})},setupTargetRegion:function(){var a=b("#"+d.fieldName);if(a.length)return!1;var c=b("<span>").attr("id",d.fieldName);return a=b("#region-main"),a.length?a.prepend(c):(a=b('[role="main"]'),a.length?a.prepend(c):(a=b("body"),a.prepend(c)))},addNotification:function(a){var c=d.types.error;return a=b.extend({closebutton:!0,announce:!0,type:"error"},a),a.template?(c=a.template,delete a.template):a.type&&("undefined"!=typeof d.types[a.type]&&(c=d.types[a.type]),delete a.type),d.renderNotification(c,a)},renderNotification:function(a,e){return"undefined"!=typeof e.message&&e.message?void require(["core/templates"],function(c){c.render(a,e).done(function(a,e){b("#"+d.fieldName).prepend(a),c.runTemplateJS(e)}).fail(d.exception)}):void c.debug("Notification received without content. Skipping.")},alert:function(b,c,d){a.use("moodle-core-notification-alert",function(){var a=new M.core.alert({title:b,message:c,yesLabel:d});a.show()})},confirm:function(b,c,d,e,f,g){a.use("moodle-core-notification-confirm",function(){var a=new M.core.confirm({title:b,question:c,yesLabel:d,noLabel:e});a.on("complete-yes",function(){f()}),g&&a.on("complete-no",function(){g()}),a.show()})},exception:function(b){b.backtrace&&(b.lineNumber=b.backtrace[0].line,b.fileName=b.backtrace[0].file,b.fileName="..."+b.fileName.substr(b.fileName.length-20),b.stack=b.debuginfo,b.name=b.errorcode),a.use("moodle-core-notification-exception",function(){var a=new M.core.exception(b);a.show()})}};return{init:function(a,b){d.contextid=a,d.setupTargetRegion(),d.addNotifications(b),d.fetchNotifications()},fetchNotifications:d.fetchNotifications,addNotification:d.addNotification,alert:d.alert,confirm:d.confirm,exception:d.exception}});
|
||||
define(["core/yui","jquery","core/log"],function(a,b,c){var d={types:{success:"core/notification_success",info:"core/notification_info",warning:"core/notification_warning",error:"core/notification_error"},fieldName:"user-notifications",fetchNotifications:function(){require(["core/ajax"],function(a){var b=a.call([{methodname:"core_fetch_notifications",args:{contextid:d.contextid}}]);b[0].done(d.addNotifications)})},addNotifications:function(a){a||(a=[]),b.each(a,function(a,b){d.renderNotification(b.template,b.variables)})},setupTargetRegion:function(){var a=b("#"+d.fieldName);if(a.length)return!1;var c=b("<span>").attr("id",d.fieldName);return a=b("#region-main"),a.length?a.prepend(c):(a=b('[role="main"]'),a.length?a.prepend(c):(a=b("body"),a.prepend(c)))},addNotification:function(a){var c=d.types.error;return a=b.extend({closebutton:!0,announce:!0,type:"error"},a),a.template?(c=a.template,delete a.template):a.type&&("undefined"!=typeof d.types[a.type]&&(c=d.types[a.type]),delete a.type),d.renderNotification(c,a)},renderNotification:function(a,e){return"undefined"!=typeof e.message&&e.message?void require(["core/templates"],function(c){c.render(a,e).done(function(a,e){b("#"+d.fieldName).prepend(a),c.runTemplateJS(e)}).fail(d.exception)}):void c.debug("Notification received without content. Skipping.")},alert:function(b,c,d){a.use("moodle-core-notification-alert",function(){var a=new M.core.alert({title:b,message:c,yesLabel:d});a.show()})},confirm:function(b,c,d,e,f,g){a.use("moodle-core-notification-confirm",function(){var a=new M.core.confirm({title:b,question:c,yesLabel:d,noLabel:e});a.on("complete-yes",function(){f()}),g&&a.on("complete-no",function(){g()}),a.show()})},exception:function(b){if("undefined"==typeof b.stack&&(b.stack=""),b.debuginfo&&(b.stack+=b.debuginfo+"\n"),b.backtrace){b.stack+=b.backtrace;var c=b.backtrace.match(/line ([^ ]*) of/),d=b.backtrace.match(/ of ([^:]*): /);c&&c[1]&&(b.lineNumber=c[1]),d&&d[1]&&(b.fileName=d[1],b.fileName.length>30&&(b.fileName="..."+b.fileName.substr(b.fileName.length-27)))}"undefined"==typeof b.name&&b.errorcode&&(b.name=b.errorcode),a.use("moodle-core-notification-exception",function(){var a=new M.core.exception(b);a.show()})}};return{init:function(a,b){d.contextid=a,d.setupTargetRegion(),d.addNotifications(b),d.fetchNotifications()},fetchNotifications:d.fetchNotifications,addNotification:d.addNotification,alert:d.alert,confirm:d.confirm,exception:d.exception}});
|
||||
@@ -0,0 +1,64 @@
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* Show an add block modal instead of doing it on a separate page.
|
||||
*
|
||||
* @module core/addblockmodal
|
||||
* @class addblockmodal
|
||||
* @package core
|
||||
* @copyright 2016 Damyon Wiese <damyon@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
define(['jquery', 'core/modal_factory', 'core/templates', 'core/str', 'core/notification'],
|
||||
function($, ModalFactory, Templates, Str, Notification) {
|
||||
|
||||
|
||||
return /** @alias module:core/addblockmodal */ {
|
||||
/**
|
||||
* Global init function for this module.
|
||||
*
|
||||
* @method init
|
||||
* @param {Object} context The template context for rendering this modal body.
|
||||
*/
|
||||
init: function(context) {
|
||||
var addblocklink = $('[data-key=addblock]');
|
||||
|
||||
// We need the fetch the names of the blocks. It was too much to send in the page.
|
||||
Str.get_string('addblock').done(function(title) {
|
||||
|
||||
var titlerequests = [];
|
||||
$.each(context.blocks, function(index, key) {
|
||||
titlerequests[titlerequests.length] = {key: 'pluginname', component: 'block_' + key};
|
||||
});
|
||||
|
||||
var blocks = [];
|
||||
Str.get_strings(titlerequests).done(function(titles) {
|
||||
$.each(titles, function(index, title) {
|
||||
blocks[blocks.length] = {name: context.blocks[index], title: title};
|
||||
});
|
||||
|
||||
context.blocks = blocks;
|
||||
|
||||
ModalFactory.create({
|
||||
title: title,
|
||||
body: Templates.render('core/add_block_body', context),
|
||||
type: 'CANCEL',
|
||||
}, addblocklink);
|
||||
});
|
||||
}).fail(Notification.exception);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* Contain the logic for the cancel modal.
|
||||
*
|
||||
* @module core/modal_cancel
|
||||
* @class modal_cancel
|
||||
* @package core
|
||||
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/modal', 'core/modal_events'],
|
||||
function($, Notification, CustomEvents, Modal, ModalEvents) {
|
||||
|
||||
var SELECTORS = {
|
||||
CANCEL_BUTTON: '[data-action="cancel"]',
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor for the Modal.
|
||||
*
|
||||
* @param {object} root The root jQuery element for the modal
|
||||
*/
|
||||
var ModalCancel = function(root) {
|
||||
Modal.call(this, root);
|
||||
|
||||
if (!this.getFooter().find(SELECTORS.CANCEL_BUTTON).length) {
|
||||
Notification.exception({message: 'No cancel button found'});
|
||||
}
|
||||
};
|
||||
|
||||
ModalCancel.prototype = Object.create(Modal.prototype);
|
||||
ModalCancel.prototype.constructor = ModalCancel;
|
||||
|
||||
/**
|
||||
* Override parent implementation to prevent changing the footer content.
|
||||
*/
|
||||
ModalCancel.prototype.setFooter = function() {
|
||||
Notification.exception({message: 'Can not change the footer of a cancel modal'});
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up all of the event handling for the modal.
|
||||
*
|
||||
* @method registerEventListeners
|
||||
*/
|
||||
ModalCancel.prototype.registerEventListeners = function() {
|
||||
// Apply parent event listeners.
|
||||
Modal.prototype.registerEventListeners.call(this);
|
||||
|
||||
this.getModal().on(CustomEvents.events.activate, SELECTORS.CANCEL_BUTTON, function(e, data) {
|
||||
var cancelEvent = $.Event(ModalEvents.cancel);
|
||||
this.getRoot().trigger(cancelEvent, this);
|
||||
|
||||
if (!cancelEvent.isDefaultPrevented()) {
|
||||
this.hide();
|
||||
data.originalEvent.preventDefault();
|
||||
}
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
return ModalCancel;
|
||||
});
|
||||
@@ -22,15 +22,16 @@
|
||||
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', 'core/modal_confirm',
|
||||
define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', 'core/modal_confirm', 'core/modal_cancel',
|
||||
'core/templates', 'core/notification', 'core/custom_interaction_events'],
|
||||
function($, ModalEvents, Modal, ModalSaveCancel, ModalConfirm, Templates, Notification, CustomEvents) {
|
||||
function($, ModalEvents, Modal, ModalSaveCancel, ModalConfirm, ModalCancel, Templates, Notification, CustomEvents) {
|
||||
|
||||
// The templates for each type of modal.
|
||||
var TEMPLATES = {
|
||||
DEFAULT: 'core/modal',
|
||||
SAVE_CANCEL: 'core/modal_save_cancel',
|
||||
CONFIRM: 'core/modal_confirm',
|
||||
CANCEL: 'core/modal_cancel',
|
||||
};
|
||||
|
||||
// The JS classes for each type of modal.
|
||||
@@ -38,6 +39,7 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
|
||||
DEFAULT: Modal,
|
||||
SAVE_CANCEL: ModalSaveCancel,
|
||||
CONFIRM: ModalConfirm,
|
||||
CANCEL: ModalCancel,
|
||||
};
|
||||
|
||||
// The available types of modals.
|
||||
@@ -45,6 +47,7 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
|
||||
DEFAULT: 'DEFAULT',
|
||||
SAVE_CANCEL: 'SAVE_CANCEL',
|
||||
CONFIRM: 'CONFIRM',
|
||||
CANCEL: 'CANCEL',
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -58,8 +61,9 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
|
||||
var setUpTrigger = function(modal, triggerElement) {
|
||||
if (typeof triggerElement != 'undefined') {
|
||||
CustomEvents.define(triggerElement, [CustomEvents.events.activate]);
|
||||
triggerElement.on(CustomEvents.events.activate, function() {
|
||||
triggerElement.on(CustomEvents.events.activate, function(e, data) {
|
||||
modal.show();
|
||||
data.originalEvent.preventDefault();
|
||||
});
|
||||
|
||||
modal.getRoot().on(ModalEvents.hidden, function() {
|
||||
|
||||
@@ -162,13 +162,30 @@ function(Y, $, log) {
|
||||
|
||||
exception: function(ex) {
|
||||
// Fudge some parameters.
|
||||
if (typeof ex.stack == 'undefined') {
|
||||
ex.stack = '';
|
||||
}
|
||||
if (ex.debuginfo) {
|
||||
ex.stack += ex.debuginfo + '\n';
|
||||
}
|
||||
if (ex.backtrace) {
|
||||
ex.lineNumber = ex.backtrace[0].line;
|
||||
ex.fileName = ex.backtrace[0].file;
|
||||
ex.fileName = '...' + ex.fileName.substr(ex.fileName.length - 20);
|
||||
ex.stack = ex.debuginfo;
|
||||
ex.stack += ex.backtrace;
|
||||
var ln = ex.backtrace.match(/line ([^ ]*) of/);
|
||||
var fn = ex.backtrace.match(/ of ([^:]*): /);
|
||||
if (ln && ln[1]) {
|
||||
ex.lineNumber = ln[1];
|
||||
}
|
||||
if (fn && fn[1]) {
|
||||
ex.fileName = fn[1];
|
||||
if (ex.fileName.length > 30) {
|
||||
ex.fileName = '...' + ex.fileName.substr(ex.fileName.length - 27);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (typeof ex.name == 'undefined' && ex.errorcode) {
|
||||
ex.name = ex.errorcode;
|
||||
}
|
||||
|
||||
Y.use('moodle-core-notification-exception', function() {
|
||||
var modal = new M.core.exception(ex);
|
||||
|
||||
|
||||
@@ -916,3 +916,21 @@ function signup_get_user_confirmation_authplugin() {
|
||||
}
|
||||
return $authplugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if sign-up is enabled in the site. If is enabled, the function will return the authplugin instance.
|
||||
*
|
||||
* @return mixed false if sign-up is not enabled, the authplugin instance otherwise.
|
||||
* @since Moodle 3.2
|
||||
*/
|
||||
function signup_is_enabled() {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->registerauth)) {
|
||||
$authplugin = get_auth_plugin($CFG->registerauth);
|
||||
if ($authplugin->can_signup()) {
|
||||
return $authplugin;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -573,6 +573,41 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the provided node has a attribute value set. This step can be used to check if specific
|
||||
* JS has finished modifying the node.
|
||||
*
|
||||
* @throws ExpectationException
|
||||
* @param NodeElement $node
|
||||
* @param string $attribute attribute name
|
||||
* @param string $attributevalue attribute value to check.
|
||||
* @return void Throws an exception if it times out without the element being visible
|
||||
*/
|
||||
protected function ensure_node_attribute_is_set($node, $attribute, $attributevalue) {
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Exception if it timesout and the element is still there.
|
||||
$msg = 'The "' . $node->getXPath() . '" xpath node is not visible and it should be visible';
|
||||
$exception = new ExpectationException($msg, $this->getSession());
|
||||
|
||||
// It will stop spinning once the $args[1]) == $args[2], and method returns true.
|
||||
$this->spin(
|
||||
function($context, $args) {
|
||||
if ($args[0]->getAttribute($args[1]) == $args[2]) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
array($node, $attribute, $attributevalue),
|
||||
self::EXTENDED_TIMEOUT,
|
||||
$exception,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the provided element is visible and we can interact with it.
|
||||
*
|
||||
|
||||
@@ -134,13 +134,6 @@ function behat_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// No need to report the before_scenario warning generated to clear last error.
|
||||
// As error_clear_last is only available in php 7.0+, we trigger E_USER_WARNING
|
||||
// to clear any last error which was generated during reset in before_scenario.
|
||||
if (($errno === E_USER_WARNING) && $errstr == 'before_scenario') {
|
||||
return;
|
||||
}
|
||||
|
||||
// This error handler receives E_ALL | E_STRICT, running the behat test site the debug level is
|
||||
// set to DEVELOPER and will always include E_NOTICE,E_USER_NOTICE... as part of E_ALL, if the current
|
||||
// error_reporting() value does not include one of those levels is because it has been forced through
|
||||
@@ -183,13 +176,6 @@ function behat_shutdown_function() {
|
||||
// Ignore E_WARNING, as they might come via ( @ )suppression and might lead to false failure.
|
||||
if (isset($error['type']) && !($error['type'] & E_WARNING)) {
|
||||
|
||||
// No need to report the before_scenario warning generated to clear last error.
|
||||
// As error_clear_last is only available in php 7.0+, we trigger E_USER_WARNING
|
||||
// to clear any last error which was generated during reset in before_scenario.
|
||||
if (($error['type'] & E_USER_WARNING) && $error['message'] == 'before_scenario') {
|
||||
return;
|
||||
}
|
||||
|
||||
$errors = behat_get_shutdown_process_errors();
|
||||
|
||||
$errors[] = $error;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user