aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2019-04-28 09:54:37 +0200
committerJean-Michel Vedrine <vedrine@vedrine.org>2019-04-28 09:54:37 +0200
commitf83f95e9c7d1953b7e760feea862e45304cd9443 (patch)
tree4d065bf22881900010650fa63b46729f3a1c9819 /classes
parente0dda838a0cffd6b1f4fd3706e75537c1906b5ec (diff)
New version of mobile support
Diffstat (limited to 'classes')
-rw-r--r--classes/output/mobile.php35
1 files changed, 20 insertions, 15 deletions
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
+}