MDL-77745 core_question: Show question version in info box

This commit is contained in:
Mark Johnson
2023-07-13 11:11:43 +01:00
parent ef93325f27
commit ab8a4dd8cb
13 changed files with 257 additions and 11 deletions
+4
View File
@@ -23,6 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use core_question\local\bank\question_edit_contexts;
defined('MOODLE_INTERNAL') || die();
@@ -903,6 +904,9 @@ class question_attempt {
global $PAGE;
$page = $PAGE;
}
if (is_null($options->versioninfo)) {
$options->versioninfo = (new question_edit_contexts($page->context))->have_one_edit_tab_cap('questions');
}
$qoutput = $page->get_renderer('core', 'question');
$qtoutput = $this->question->get_renderer($page);
return $this->behaviour->render($options, $number, $qoutput, $qtoutput);