mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-80150-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
d8f055240a
@ -227,6 +227,7 @@ function resource_get_coursemodule_info($coursemodule) {
|
||||
if (count($files) >= 1) {
|
||||
$mainfile = reset($files);
|
||||
$resource->mainfile = $mainfile->get_filename();
|
||||
$info->icon = file_file_icon($mainfile, 24);
|
||||
}
|
||||
|
||||
$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-24', $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-24', $info->icon);
|
||||
}
|
||||
|
||||
public function test_resource_core_calendar_provide_event_action() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user