$status = array();
$typestr = get_string('type'.$this->type, 'assignment');
+ // ugly hack to support pluggable assignment type titles...
+ if($typestr === '[[type'.$this->type.']]'){
+ $typestr = get_string('type'.$this->type, 'assignment_'.$this->type);
+ }
if (!empty($data->reset_assignment_submissions)) {
$assignmentssql = "SELECT a.id
$names = get_plugin_list('assignment');
foreach ($names as $name=>$dir) {
$types[$name] = get_string('type'.$name, 'assignment');
+
+ // ugly hack to support pluggable assignment type titles..
+ if ($types[$name] == '[[type'.$name.']]') {
+ $types[$name] = get_string('type'.$name, 'assignment_'.$name);
+ }
}
asort($types);
return $types;
$type = new object();
$type->modclass = MOD_CLASS_ACTIVITY;
$type->type = "assignment&type=$assignmenttype";
- $type->typestr = get_string("type$assignmenttype", 'assignment');
+ $type->typestr = get_string("type$assignmenttype", 'assignment_'.$assignmenttype);
$types[] = $type;
}
}
$mform->addElement('select', 'preventlate', get_string('preventlate', 'assignment'), $ynoptions);
$mform->setDefault('preventlate', 0);
- $mform->addElement('header', 'typedesc', get_string('type'.$type,'assignment'));
+
+
+ $typetitle = get_string('type'.$type, 'assignment');
+
+ // hack to support pluggable assignment type titles
+ if ($typetitle === '[[type'.$type.']]') {
+ $typetitle = get_string('type'.$type, 'assignment_'.$type);
+ }
+
+ $mform->addElement('header', 'typedesc', $typetitle);
+
$assignmentinstance->setup_elements($mform);
$this->standard_coursemodule_elements();