mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-78285-master' of https://github.com/sarjona/moodle
This commit is contained in:
commit
e6ea75570d
@ -227,6 +227,8 @@ function resource_get_coursemodule_info($coursemodule) {
|
||||
if (count($files) >= 1) {
|
||||
$mainfile = reset($files);
|
||||
$resource->mainfile = $mainfile->get_filename();
|
||||
$info->icon = file_file_icon($mainfile);
|
||||
$info->customdata['filtericon'] = true;
|
||||
}
|
||||
|
||||
$display = resource_get_final_display_type($resource);
|
||||
|
@ -144,11 +144,13 @@ class lib_test extends \advanced_testcase {
|
||||
$info = resource_get_coursemodule_info(
|
||||
$DB->get_record('course_modules', array('id' => $resource2->cmid)));
|
||||
$this->assertEquals('R2', $info->name);
|
||||
$this->assertEquals('f/text', $info->icon);
|
||||
|
||||
// For third one, it should use the highest sortorder icon.
|
||||
$info = resource_get_coursemodule_info(
|
||||
$DB->get_record('course_modules', array('id' => $resource3->cmid)));
|
||||
$this->assertEquals('R3', $info->name);
|
||||
$this->assertEquals('f/document', $info->icon);
|
||||
}
|
||||
|
||||
public function test_resource_core_calendar_provide_event_action() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user