MDL-20065 new implementation of File module, modules sub-types are being migrated to separate modules; remaining issues to be listed as sub-tasks in tracker

This commit is contained in:
skodak
2009-08-13 20:45:50 +00:00
parent 3b804d2d09
commit aa54ed7b02
58 changed files with 2632 additions and 6727 deletions
-27
View File
@@ -48,9 +48,6 @@ if (!empty($file)) {
}
// The remaining horrible hardcoded special cases should be delegated to modules somehow.
if ($module == 'moodle'&& $file == 'resource/types.html') { // RESOURCES
include_help_for_each_resource($forcelang, $skiplocal);
}
if ($module == 'moodle' && $file == 'assignment/types.html') { // ASSIGNMENTS
include_help_for_each_assignment_type($forcelang, $skiplocal);
}
@@ -182,30 +179,6 @@ function include_help_for_qtype($qtype, $localizedname) {
echo '<p>' . get_string($qtype . 'summary', 'qtype_' . $qtype) . "</p>\n\n";
}
function include_help_for_each_resource($forcelang, $skiplocal) {
global $CFG;
require_once($CFG->dirroot .'/mod/resource/lib.php');
$typelist = resource_get_types();
//add label type
$labelType = new object();
$labelType->modclass = MOD_CLASS_RESOURCE;
$resourcetype = 'label';
$labelType->name = $resourcetype;
$labelType->type = "resource&amp;type=$resourcetype";
$labelType->typestr = get_string("resourcetype$resourcetype", 'resource');
$typelist[] = $labelType;
foreach ($typelist as $type) {
list($filepath, $foundlang) = string_manager::instance()->find_help_file('type/' . $type->name . '.html', 'resource', $forcelang, $skiplocal);
if ($filepath) {
echo '<hr />';
include($filepath);
}
}
}
function include_help_for_each_assignment_type() {
global $CFG;