MDL-16409 Make a new admin report to list all questions of a particular type, by context
Partially done. This has the settings form, and queries the database for the right data, but does not format it correctly yet.
This commit is contained in:
+7
-2
@@ -10,6 +10,7 @@
|
||||
require_login();
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
require_capability('moodle/question:config', $systemcontext);
|
||||
$canviewreports = has_capability('moodle/site:viewreports', $systemcontext);
|
||||
|
||||
admin_externalpage_setup('manageqtypes');
|
||||
|
||||
@@ -179,8 +180,12 @@
|
||||
} else {
|
||||
$strcount = $counts[$qtypename]->numquestions;
|
||||
}
|
||||
$row[] = '<a href="' . admin_url('/report/questioninstances/index.php?qtype=' . $qtypename) .
|
||||
'">' . $strcount . '</a>';
|
||||
if ($canviewreports) {
|
||||
$row[] = '<a href="' . admin_url('/report/questioninstances/index.php?qtype=' . $qtypename) .
|
||||
'">' . $strcount . '</a>';
|
||||
} else {
|
||||
$strcount;
|
||||
}
|
||||
} else {
|
||||
$row[] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user