mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-72774' of https://github.com/paulholden/moodle
This commit is contained in:
commit
043a43b089
4 changed files with 15 additions and 13 deletions
|
@ -41,11 +41,10 @@ Feature: View task logs report and use its filters
|
||||||
And I set the following fields in the "Duration" "core_reportbuilder > Filter" to these values:
|
And I set the following fields in the "Duration" "core_reportbuilder > Filter" to these values:
|
||||||
| Duration operator | <operator> |
|
| Duration operator | <operator> |
|
||||||
| Duration value | 2 |
|
| Duration value | 2 |
|
||||||
| Duration unit | minutes |
|
| Duration unit | minute(s) |
|
||||||
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
||||||
Then I should see "Filters applied"
|
Then I should see "Filters applied"
|
||||||
And I <shouldornotsee> "Nothing to display"
|
And I <shouldornotsee> "Nothing to display"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| operator | shouldornotsee |
|
| operator | shouldornotsee |
|
||||||
| Less than | should not see |
|
| Less than | should not see |
|
||||||
|
|
|
@ -35,14 +35,17 @@ $string['errorsourceinvalid'] = 'Could not find valid report source';
|
||||||
$string['errorsourceunavailable'] = 'Report source is not available';
|
$string['errorsourceunavailable'] = 'Report source is not available';
|
||||||
$string['filtercontains'] = 'Contains';
|
$string['filtercontains'] = 'Contains';
|
||||||
$string['filterdatecurrent'] = 'Current';
|
$string['filterdatecurrent'] = 'Current';
|
||||||
$string['filterdatedays'] = 'Day(s)';
|
$string['filterdatedays'] = 'day(s)';
|
||||||
$string['filterdatefrom'] = 'Date from';
|
$string['filterdatefrom'] = 'Date from';
|
||||||
$string['filterdatemonths'] = 'Month(s)';
|
$string['filterdatehours'] = 'hour(s)';
|
||||||
|
$string['filterdateminutes'] = 'minute(s)';
|
||||||
|
$string['filterdatemonths'] = 'month(s)';
|
||||||
$string['filterdatenext'] = 'Next';
|
$string['filterdatenext'] = 'Next';
|
||||||
$string['filterdateprevious'] = 'Previous';
|
$string['filterdateprevious'] = 'Previous';
|
||||||
|
$string['filterdateseconds'] = 'second(s)';
|
||||||
$string['filterdateto'] = 'Date to';
|
$string['filterdateto'] = 'Date to';
|
||||||
$string['filterdateweeks'] = 'Week(s)';
|
$string['filterdateweeks'] = 'week(s)';
|
||||||
$string['filterdateyears'] = 'Year(s)';
|
$string['filterdateyears'] = 'year(s)';
|
||||||
$string['filterdoesnotcontain'] = 'Does not contain';
|
$string['filterdoesnotcontain'] = 'Does not contain';
|
||||||
$string['filterdurationunit'] = '{$a} unit';
|
$string['filterdurationunit'] = '{$a} unit';
|
||||||
$string['filterendswith'] = 'Ends with';
|
$string['filterendswith'] = 'Ends with';
|
||||||
|
|
|
@ -109,7 +109,7 @@ class date extends base {
|
||||||
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_NOT_EMPTY);
|
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_NOT_EMPTY);
|
||||||
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_EMPTY);
|
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_EMPTY);
|
||||||
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_RANGE);
|
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_RANGE);
|
||||||
$mform->disabledIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_CURRENT);
|
$mform->hideIf("{$this->name}_value", "{$this->name}_operator", 'eq', self::DATE_CURRENT);
|
||||||
|
|
||||||
// Unit selector for previous and next operators.
|
// Unit selector for previous and next operators.
|
||||||
$unitlabel = get_string('filterdurationunit', 'core_reportbuilder', $this->get_header());
|
$unitlabel = get_string('filterdurationunit', 'core_reportbuilder', $this->get_header());
|
||||||
|
@ -129,7 +129,7 @@ class date extends base {
|
||||||
$mform->hideIf("{$this->name}_unit", "{$this->name}_operator", 'eq', self::DATE_RANGE);
|
$mform->hideIf("{$this->name}_unit", "{$this->name}_operator", 'eq', self::DATE_RANGE);
|
||||||
|
|
||||||
// Add operator/value/unit group.
|
// Add operator/value/unit group.
|
||||||
$mform->addGroup($elements, "{$this->name}_group", '', null, false);
|
$mform->addGroup($elements, "{$this->name}_group", '', '', false);
|
||||||
|
|
||||||
// Date selectors for range operator.
|
// Date selectors for range operator.
|
||||||
$mform->addElement('date_selector', "{$this->name}_from", get_string('filterdatefrom', 'core_reportbuilder'),
|
$mform->addElement('date_selector', "{$this->name}_from", get_string('filterdatefrom', 'core_reportbuilder'),
|
||||||
|
|
|
@ -84,10 +84,10 @@ class duration extends base {
|
||||||
// Unit.
|
// Unit.
|
||||||
$unitlabel = get_string('filterdurationunit', 'core_reportbuilder', $this->get_header());
|
$unitlabel = get_string('filterdurationunit', 'core_reportbuilder', $this->get_header());
|
||||||
$units = [
|
$units = [
|
||||||
1 => get_string('seconds'),
|
1 => get_string('filterdateseconds', 'core_reportbuilder'),
|
||||||
MINSECS => get_string('minutes'),
|
MINSECS => get_string('filterdateminutes', 'core_reportbuilder'),
|
||||||
HOURSECS => get_string('hours'),
|
HOURSECS => get_string('filterdatehours', 'core_reportbuilder'),
|
||||||
DAYSECS => get_string('days'),
|
DAYSECS => get_string('filterdatedays', 'core_reportbuilder'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$elements[] = $mform->createElement('select', "{$this->name}_unit", $unitlabel, $units);
|
$elements[] = $mform->createElement('select', "{$this->name}_unit", $unitlabel, $units);
|
||||||
|
@ -95,7 +95,7 @@ class duration extends base {
|
||||||
$mform->setDefault("{$this->name}_unit", 1);
|
$mform->setDefault("{$this->name}_unit", 1);
|
||||||
$mform->hideIf("{$this->name}_unit", "{$this->name}_operator", 'eq', self::DURATION_ANY);
|
$mform->hideIf("{$this->name}_unit", "{$this->name}_operator", 'eq', self::DURATION_ANY);
|
||||||
|
|
||||||
$mform->addGroup($elements, "{$this->name}_group", '', null, false);
|
$mform->addGroup($elements, "{$this->name}_group", '', '', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue