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 ++++++++++++++++++++++++++++++++++++++++++++ classes/privacy/provider.php | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 classes/output/mobile.php (limited to 'classes') 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 diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 65b0a17..9fbda10 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -18,7 +18,7 @@ * Privacy main class. * * @package qtype_algebra - * @copyright 2018 Jean-Michel vedrine + * @copyright 2018 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -- cgit v1.2.3