Merge branch 'MDL-41428-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE

This commit is contained in:
Dan Poltawski
2013-09-03 12:31:12 +08:00
2 changed files with 9 additions and 3 deletions
+1
View File
@@ -328,6 +328,7 @@ $string['courselegacyfiles_help'] = 'The course files area provides some backwar
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.';
$string['courselegacyfiles_link'] = 'coursefiles2';
$string['courselegacyfilesofcourse'] = 'Legacy course files: {$a}';
$string['courseoverview'] = 'Course overview';
$string['courseoverviewgraph'] = 'Course overview graph';
$string['courseprofiles'] = 'Course profiles';
+8 -3
View File
@@ -180,10 +180,15 @@ class repository_coursefiles extends repository {
return parent::is_visible();
}
/**
* Return the repository name.
*
* @return string
*/
public function get_name() {
list($context, $course, $cm) = get_context_info_array($this->context->id);
if (!empty($course)) {
return get_string('courselegacyfiles') . format_string($course->shortname, true, array('context' => get_course_context($context)));
$context = $this->context->get_course_context(false);
if ($context) {
return get_string('courselegacyfilesofcourse', 'moodle', $context->get_context_name(false, true));
} else {
return get_string('courselegacyfiles');
}