MDL-61589 Questions: Top question category naming improvement
Display the context name next to the top question category name.
This commit is contained in:
+2
-1
@@ -1422,7 +1422,8 @@ function question_fix_top_names($categories) {
|
||||
|
||||
foreach ($categories as $id => $category) {
|
||||
if ($category->parent == 0) {
|
||||
$categories[$id]->name = get_string('top');
|
||||
$context = context::instance_by_id($category->contextid);
|
||||
$categories[$id]->name = get_string('topfor', 'question', $context->get_context_name(false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user