mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-47694-master' of git://github.com/zbdd/moodle
This commit is contained in:
commit
2da9d573c3
3 changed files with 42 additions and 2 deletions
|
@ -404,7 +404,8 @@ function assign_print_overview($courses, &$htmlarray) {
|
||||||
g.attemptnumber = s.attemptnumber
|
g.attemptnumber = s.attemptnumber
|
||||||
WHERE
|
WHERE
|
||||||
( g.timemodified is NULL OR
|
( g.timemodified is NULL OR
|
||||||
s.timemodified > g.timemodified ) AND
|
s.timemodified > g.timemodified OR
|
||||||
|
g.grade IS NULL ) AND
|
||||||
s.timemodified IS NOT NULL AND
|
s.timemodified IS NOT NULL AND
|
||||||
s.status = ? AND
|
s.status = ? AND
|
||||||
s.latest = 1 AND
|
s.latest = 1 AND
|
||||||
|
|
|
@ -1506,7 +1506,7 @@ class assign {
|
||||||
s.assignment = :assignid AND
|
s.assignment = :assignid AND
|
||||||
s.timemodified IS NOT NULL AND
|
s.timemodified IS NOT NULL AND
|
||||||
s.status = :submitted AND
|
s.status = :submitted AND
|
||||||
(s.timemodified > g.timemodified OR g.timemodified IS NULL)';
|
(s.timemodified > g.timemodified OR g.timemodified IS NULL OR g.grade IS NULL)';
|
||||||
|
|
||||||
return $DB->count_records_sql($sql, $params);
|
return $DB->count_records_sql($sql, $params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,45 @@ Feature: In an assignment, teachers grade multiple students on one page
|
||||||
As a teacher
|
As a teacher
|
||||||
I need to grade multiple students on one page
|
I need to grade multiple students on one page
|
||||||
|
|
||||||
|
Scenario: Saving but not grading a grade should
|
||||||
|
not indicate the grade is graded.
|
||||||
|
Given the following "courses" exist:
|
||||||
|
| fullname | shortname | category | groupmode |
|
||||||
|
| Course 1 | C1 | 0 | 1 |
|
||||||
|
And the following "users" exist:
|
||||||
|
| username | firstname | lastname | email |
|
||||||
|
| teacher1 | Teacher | 1 | teacher1@asd.com |
|
||||||
|
| student1 | Student | 1 | student1@asd.com |
|
||||||
|
And the following "course enrolments" exist:
|
||||||
|
| user | course | role |
|
||||||
|
| teacher1 | C1 | editingteacher |
|
||||||
|
| student1 | C1 | student |
|
||||||
|
When I log in as "admin"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I turn editing mode on
|
||||||
|
And I add a "Assignment" to section "1" and I fill the form with:
|
||||||
|
| Assignment name | Test assignment name |
|
||||||
|
| Description | Submit your online text |
|
||||||
|
| assignsubmission_onlinetext_enabled | 1 |
|
||||||
|
And I log out
|
||||||
|
And I log in as "student1"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I follow "Test assignment name"
|
||||||
|
And I press "Add submission"
|
||||||
|
And I set the following fields to these values:
|
||||||
|
| Online text | I'm the student1 submission |
|
||||||
|
And I press "Save changes"
|
||||||
|
And I log out
|
||||||
|
And I log in as "admin"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I follow "Test assignment name"
|
||||||
|
And I follow "View/grade all submissions"
|
||||||
|
And I click on "Grade Student 1" "link" in the "Student 1" "table_row"
|
||||||
|
And I press "Save changes"
|
||||||
|
And I press "Continue"
|
||||||
|
And I follow "Test assignment name"
|
||||||
|
Then I should see "1" in the "Needs grading" "table_row"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: Grade multiple students on one page
|
Scenario: Grade multiple students on one page
|
||||||
Given the following "courses" exist:
|
Given the following "courses" exist:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue