From f83f95e9c7d1953b7e760feea862e45304cd9443 Mon Sep 17 00:00:00 2001
From: Jean-Michel Vedrine <vedrine@vedrine.org>
Date: Sun, 28 Apr 2019 09:54:37 +0200
Subject: New version of mobile support

---
 classes/output/mobile.php | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

(limited to 'classes/output')

diff --git a/classes/output/mobile.php b/classes/output/mobile.php
index 86c6bd3..c2b11de 100644
--- a/classes/output/mobile.php
+++ b/classes/output/mobile.php
@@ -15,11 +15,11 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * Mobile output class for algebra question type.
+ * Mobile output class for qtype_algebra
  *
- * @package qtype_algebra
- * @copyright 2019 Jean-Michel Vedrine
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @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;
@@ -27,24 +27,29 @@ namespace qtype_algebra\output;
 defined('MOODLE_INTERNAL') || die();
 
 /**
- * Mobile output class for question type algebra.
- * @copyright 2019 Jean-Michel Vedrine
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Mobile output class for algebra question type
+ *
+ * @package    qtype_algebra
+ * @copyright  2019 Jean-Michel vedrine
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class mobile {
+
     /**
-     * Returns the algebra question view for the mobile app.
+     * Returns the algebra question type for the quiz the mobile app.
      *
      * @return void
      */
-    public static function algebra_view() {
+    public static function mobile_get_algebra() {
         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')
+            'templates' => [
+                [
+                    'id' => 'main',
+                    'html' => file_get_contents($CFG->dirroot .'/question/type/algebra/mobile/qtype-algebra.html')
+                    ]
+            ],
+            'javascript' => file_get_contents($CFG->dirroot . '/question/type/algebra/mobile/mobile.js')
         ];
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3