From 76c8063a28713326c1feb54649dd56399077cebd Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Sat, 2 Feb 2019 08:33:28 +0100 Subject: First try at mobile 3.x support --- classes/output/mobile.php | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 classes/output/mobile.php (limited to 'classes/output') diff --git a/classes/output/mobile.php b/classes/output/mobile.php new file mode 100644 index 0000000..17f7415 --- /dev/null +++ b/classes/output/mobile.php @@ -0,0 +1,50 @@ +. + +/** + * Mobile output class for question type algebra. + * + * @package qtype_algebra + * @copyright 2019 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qtype_algebra\output; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Mobile output class for question type algebra. + * @copyright 2018 Joseph Rézeau + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class mobile { + /** + * Returns the algebra question view for the mobile app. + * + * @return void + */ + public static function algebra_view() { + global $CFG; + return [ + 'templates' => [[ + 'id' => 'main', + 'html' => file_get_contents($CFG->dirroot . '/question/type/algebra/mobile/algebra.html') + ]], + 'javascript' => file_get_contents($CFG->dirroot . '/question/type/algebra/mobile/algebra.js') + ]; + } +} \ No newline at end of file -- cgit v1.2.3