Merge branch 'MDL-75292-main' of https://github.com/mihailges/moodle
This commit is contained in:
@@ -321,6 +321,11 @@ class assign_grading_table extends table_sql implements renderable {
|
||||
$where .= '))';
|
||||
$params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
|
||||
|
||||
} else if ($filter == ASSIGN_FILTER_GRADED) {
|
||||
$where .= ' AND (s.timemodified IS NOT NULL AND
|
||||
s.timemodified < g.timemodified AND g.grade IS NOT NULL)';
|
||||
$params['submitted'] = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
|
||||
|
||||
} else if ($filter == ASSIGN_FILTER_GRANTED_EXTENSION) {
|
||||
$where .= ' AND uf.extensionduedate > 0 ';
|
||||
|
||||
|
||||
@@ -312,6 +312,7 @@ $string['filesubmissions'] = 'File submissions';
|
||||
$string['filter'] = 'Filter';
|
||||
$string['filterall'] = 'All';
|
||||
$string['filterdraft'] = 'Draft';
|
||||
$string['filtergraded'] = 'Graded';
|
||||
$string['filtergrantedextension'] = 'Granted extension';
|
||||
$string['filternone'] = 'No filter';
|
||||
$string['filternotsubmitted'] = 'Not submitted';
|
||||
|
||||
@@ -38,6 +38,7 @@ define('ASSIGN_FILTER_SUBMITTED', 'submitted');
|
||||
define('ASSIGN_FILTER_NOT_SUBMITTED', 'notsubmitted');
|
||||
define('ASSIGN_FILTER_SINGLE_USER', 'singleuser');
|
||||
define('ASSIGN_FILTER_REQUIRE_GRADING', 'requiregrading');
|
||||
define('ASSIGN_FILTER_GRADED', 'graded');
|
||||
define('ASSIGN_FILTER_GRANTED_EXTENSION', 'grantedextension');
|
||||
define('ASSIGN_FILTER_DRAFT', 'draft');
|
||||
|
||||
@@ -9591,6 +9592,7 @@ class assign {
|
||||
ASSIGN_FILTER_DRAFT,
|
||||
ASSIGN_FILTER_SUBMITTED,
|
||||
ASSIGN_FILTER_REQUIRE_GRADING,
|
||||
ASSIGN_FILTER_GRADED,
|
||||
],
|
||||
[
|
||||
ASSIGN_FILTER_GRANTED_EXTENSION,
|
||||
|
||||
@@ -4295,7 +4295,7 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
$assign = $this->create_instance($course);
|
||||
$valid = $assign->get_filters();
|
||||
|
||||
$this->assertEquals(count($valid), 6);
|
||||
$this->assertEquals(count($valid), 7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user