From e010f2a162db93a92f65392ac1e0533417b8dcea Mon Sep 17 00:00:00 2001 From: Peter Mayer Date: Thu, 7 Mar 2024 11:36:30 +0100 Subject: [PATCH] MBS-8820: Add pdf coversheet handling --- classes/Report.php | 1 + classes/local/coversheet.php | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 classes/local/coversheet.php diff --git a/classes/Report.php b/classes/Report.php index bc749ce..6427fdd 100644 --- a/classes/Report.php +++ b/classes/Report.php @@ -562,6 +562,7 @@ public function generate_full_page(int $attemptid, array $sections, bool $fix_re // Build HTML tree $html = ""; $html .= $OUTPUT->header(); + $html .= \quiz_archiver\local\coversheet::get_coversheet($attemptid); $html .= self::generate($attemptid, $sections); $html .= $OUTPUT->footer(); diff --git a/classes/local/coversheet.php b/classes/local/coversheet.php new file mode 100644 index 0000000..52af564 --- /dev/null +++ b/classes/local/coversheet.php @@ -0,0 +1,51 @@ +. + +namespace quiz_archiver\local; + +/** + * Custom util functions + * + * @package quiz_archiver + * @copyright 2024, ISB Bayern + * @author Dr. Peter Mayer + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class coversheet { + + /** + * Collects all information needed for the coversheet and returns the resulting html. + * @param int $attemptid + * @return string + */ + public static function get_coversheet(int $attemptid):string { + $html = ""; + return $html; + } + + + + +// foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) { +// if (get_string_manager()->string_exists('pluginname', 'local_' . $plugin)) { +// $strpluginname = get_string('pluginname', 'local_' . $plugin); +// } else { +// $strpluginname = $plugin; +// } +// $plugins[$plugin] = $strpluginname; +// } + +}