mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-77178-master' of https://github.com/aanabit/moodle
This commit is contained in:
commit
718108c52f
@ -24,6 +24,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Event monitoring rules" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Event monitoring rules"
|
||||
And the field "Report" matches value "Event monitoring rules"
|
||||
Then "Report type" "field" should exist
|
||||
And I should see "Event monitoring rules" in the "Report type" "field"
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
namespace core;
|
||||
use moodle_url;
|
||||
use url_select;
|
||||
|
||||
/**
|
||||
* A helper class with static methods to help report plugins
|
||||
@ -75,12 +74,20 @@ class report_helper {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$select = new url_select($menuarray, $activeurl, null, 'choosecoursereport');
|
||||
$select->set_label(get_string('reporttype'), ['class' => 'accesshide']);
|
||||
echo \html_writer::tag('div', $OUTPUT->render($select), ['class' => 'tertiary-navigation']);
|
||||
$selectmenu = new \core\output\select_menu('reporttype', $menuarray, $activeurl);
|
||||
$selectmenu->set_label(get_string('reporttype'), ['class' => 'sr-only']);
|
||||
$options = \html_writer::tag(
|
||||
'div',
|
||||
$OUTPUT->render_from_template('core/tertiary_navigation_selector', $selectmenu->export_for_template($OUTPUT)),
|
||||
['class' => 'row pb-3']
|
||||
);
|
||||
echo \html_writer::tag(
|
||||
'div',
|
||||
$options,
|
||||
['class' => 'tertiary-navigation full-width-bottom-border ml-0', 'id' => 'tertiary-navigation']);
|
||||
} else {
|
||||
echo $OUTPUT->heading($pluginname, 2, 'mb-3');
|
||||
}
|
||||
echo $OUTPUT->heading($pluginname, 2, 'mb-3');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,42 +75,4 @@ class report_helper_test extends \advanced_testcase {
|
||||
|
||||
$this->assertEquals($USER->course_last_report[$courseid2], $url2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing the report selector dropdown shown.
|
||||
*
|
||||
* Verify that the dropdowns have the pages to be displayed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_print_report_selector():void {
|
||||
global $PAGE;
|
||||
|
||||
$this->resetAfterTest();
|
||||
|
||||
$user = $this->getDataGenerator()->create_user();
|
||||
|
||||
$PAGE->set_url('/');
|
||||
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
$PAGE->set_course($course);
|
||||
|
||||
$this->getDataGenerator()->enrol_user($user->id, $course->id, 'teacher');
|
||||
|
||||
$this->setUser($user);
|
||||
|
||||
ob_start();
|
||||
report_helper::print_report_selector('Logs');
|
||||
$output = $this->getActualOutput();
|
||||
ob_end_clean();
|
||||
|
||||
$log = '<option value="/report/log/index.php?id=' . $course->id .'" selected>Logs</option>';
|
||||
$competency = '<option value="/report/competency/index.php?id=' . $course->id . '" >Competency breakdown</option>';
|
||||
$loglive = '<option value="/report/loglive/index.php?id=' . $course->id . '" >Live logs</option>';
|
||||
$participation = '<option value="/report/participation/index.php?id=' . $course->id . '" >Course participation</option>';
|
||||
$this->assertStringContainsString($log, $output);
|
||||
$this->assertStringContainsString($competency, $output);
|
||||
$this->assertStringContainsString($loglive, $output);
|
||||
$this->assertStringContainsString($participation, $output);
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Competency breakdown" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Competency breakdown"
|
||||
And the field "Report" matches value "Competency breakdown"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Competency breakdown" in the "tertiary-navigation" "region"
|
||||
|
@ -28,6 +28,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Course completion" "link" in the "region-main" "region"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Course completion"
|
||||
And the field "Report" matches value "Course completion"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Course completion" in the "tertiary-navigation" "region"
|
||||
|
@ -22,6 +22,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Logs" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Logs"
|
||||
And the field "Report" matches value "Logs"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Logs" in the "tertiary-navigation" "region"
|
||||
|
@ -22,6 +22,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Live logs" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Live logs"
|
||||
And the field "Report" matches value "Live logs"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Live logs" in the "tertiary-navigation" "region"
|
||||
|
@ -22,6 +22,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Activity report" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Activity report"
|
||||
And the field "Report" matches value "Activity report"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Activity report" in the "tertiary-navigation" "region"
|
||||
|
@ -22,6 +22,5 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Course participation" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Course participation"
|
||||
And the field "Report" matches value "Course participation"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Course participation" in the "tertiary-navigation" "region"
|
||||
|
@ -28,9 +28,8 @@ Feature: In a course administration page, navigate through report page, test for
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reports" in current page administration
|
||||
And I click on "Activity completion" "link"
|
||||
Then "Report" "field" should exist
|
||||
And the "Report" select box should contain "Activity completion"
|
||||
And the field "Report" matches value "Activity completion"
|
||||
Then "Report" "field" should exist in the "tertiary-navigation" "region"
|
||||
And I should see "Activity completion" in the "tertiary-navigation" "region"
|
||||
|
||||
Scenario: Custom profile fields selected for identity should display on the activity completion report
|
||||
Given the following "custom profile fields" exist:
|
||||
|
Loading…
x
Reference in New Issue
Block a user