Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
e689d68b
Commit
e689d68b
authored
Apr 14, 2016
by
David Monllaó
Browse files
Merge branch 'MDL-52954-master-behat-fixes' of
git://github.com/damyon/moodle
parents
3dd89357
5267d632
Changes
3
Show whitespace changes
Inline
Side-by-side
mod/assign/tests/behat/rescale_grades.feature
View file @
e689d68b
@mod
@mod_assign
@
bug
@mod
@mod_assign
@
javascript
Feature
:
Check that the assignment grade can be rescaled when the max grade is changed
In order to ensure that the percentages are not affected by changes to the max grade
As a teacher
...
...
@@ -27,17 +27,20 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
|
Description
|
Test
assignment
description
|
And
I follow
"Test assignment name"
And
I follow
"View all submissions"
And
I click on
"Grade
Student 1
"
"link"
in the
"Student 1"
"table_row"
And
I click on
"Grade"
"link"
in the
"Student 1"
"table_row"
And
I set the field
"Grade out of 100"
to
"40"
And
I press
"Save changes"
And
I press
"Continue"
And
I press
"Ok"
And
I click on
"Edit settings"
"link"
And
I follow
"Test assignment name"
And
I follow
"View all submissions"
And
"Student 1"
row
"Grade"
column of
"generaltable"
table should contain
"40.00"
Scenario
:
Update the max grade for an assignment without rescaling existing grades
Given
I follow
"Edit settings"
And
I expand all fieldsets
And
I set the field
"Maximum grade"
to
"80"
And
I set the field
"Rescale existing grades"
to
"No"
And
I set the field
"Maximum grade"
to
"80"
When
I press
"Save and display"
And
I follow
"View all submissions"
Then
"Student 1"
row
"Grade"
column of
"generaltable"
table should contain
"40.00"
...
...
@@ -45,22 +48,8 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Scenario
:
Update the max grade for an assignment rescaling existing grades
Given
I follow
"Edit settings"
And
I expand all fieldsets
And
I set the field
"Maximum grade"
to
"50"
And
I set the field
"Rescale existing grades"
to
"Yes"
And
I set the field
"Maximum grade"
to
"50"
When
I press
"Save and display"
And
I follow
"View all submissions"
Then
"Student 1"
row
"Grade"
column of
"generaltable"
table should contain
"20.00"
Scenario
:
A
rescale existing grades is not needed when keeping max grade unchanged
Given
I follow
"Edit settings"
And
I expand all fieldsets
And
I set the field
"Maximum grade"
to
"100"
When
I press
"Save and display"
Then
I should not see
"You must choose whether to rescale existing grades or not."
Scenario
:
A
rescale existing grades must be selected when max grade changes
Given
I follow
"Edit settings"
And
I expand all fieldsets
And
I set the field
"Maximum grade"
to
"50"
When
I press
"Save and display"
Then
I should see
"You must choose whether to rescale existing grades or not."
mod/assign/version.php
View file @
e689d68b
...
...
@@ -25,6 +25,6 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
component
=
'mod_assign'
;
// Full name of the plugin (used for diagnostics).
$plugin
->
version
=
201
5111603
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
version
=
201
6041300
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
requires
=
2015111000
;
// Requires this Moodle version.
$plugin
->
cron
=
60
;
user/externallib.php
View file @
e689d68b
...
...
@@ -536,6 +536,9 @@ class core_user_external extends external_api {
// Retrieve the users.
$users
=
$DB
->
get_records_list
(
'user'
,
$field
,
$cleanedvalues
,
'id'
);
$context
=
context_system
::
instance
();
self
::
validate_context
(
$context
);
// Finally retrieve each users information.
$returnedusers
=
array
();
foreach
(
$users
as
$user
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment