diff options
author | Jean-Michel Vedrine <vedrine@vedrine.org> | 2019-04-28 09:18:15 +0200 |
---|---|---|
committer | Jean-Michel Vedrine <vedrine@vedrine.org> | 2019-04-28 09:18:15 +0200 |
commit | f2352f6e189fc1a40836957e39f5243b9d826521 (patch) | |
tree | 35d734633847eea3db0325ef7e7b27d6781c5c35 | |
parent | 51c7a042ab96f90a9ddfada266aba118c0f869bf (diff) |
Remove obsolete and buggy mobile support
-rw-r--r-- | db/mobile.php | 54 | ||||
-rw-r--r-- | mobile/algebra.html | 25 | ||||
-rw-r--r-- | mobile/algebra.js | 51 | ||||
-rw-r--r-- | mobile/styles_app.css | 34 |
4 files changed, 0 insertions, 164 deletions
diff --git a/db/mobile.php b/db/mobile.php deleted file mode 100644 index 6fc65a7..0000000 --- a/db/mobile.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -// This file is part of Moodle - http://moodle.org/ -// -// Moodle is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Moodle is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Moodle. If not, see <http://www.gnu.org/licenses/>. - -/** - * Mobile plugin. - * - * @package qtype_algebra - * @copyright 2019 Jean-Michel Vedrine - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); -// To enable moodle mobile test site to upload my css files. -header('Access-Control-Allow-Origin: *'); - -$addons = array( - "qtype_algebra" => array( - "handlers" => array( // Different places where the add-on will display content. - 'algebra' => array( // Handler unique name (can be anything). - 'displaydata' => array( - 'title' => 'Algebra', - 'icon' => '/question/type/algebra/pix/icon.gif', - 'class' => '', // What does this do? - ), - 'delegate' => 'CoreQuestionDelegate', // Delegate (where to display the link to the add-on). - 'method' => 'algebra_view', - 'offlinefunctions' => array( - 'mobile_get_algebra' => array(), - ), // Function needs caching for offline. - - 'styles' => array( - 'url' => '/question/type/algebra/mobile/styles_app.css', - 'version' => '1.00' - ), - 'lang' => array( - array('pluginname', 'qtype_algebra') - ) - ) - ), - ) -);
\ No newline at end of file diff --git a/mobile/algebra.html b/mobile/algebra.html deleted file mode 100644 index 4f08aad..0000000 --- a/mobile/algebra.html +++ /dev/null @@ -1,25 +0,0 @@ -<section class="qtype-algebra" ion-list *ngIf="question.text || question.text === ''"> - <ion-item text-wrap> - <core-format-text [component]="component" - [componentId]="componentId" [text]="question.text"> - </core-format-text> - </ion-item> - <ion-item> - <ion-label - stacked - color="gray" - padding-left> - {{ 'core.question.answer' | translate }}: - </ion-label> - <ion-input - padding-left - type="text" - [attr.name]="question.input.name" - [value]="question.input.value" - autocorrect="off" - [disabled]="question.input.readOnly" - [ngClass]="[question.input.correctClass]" - > - </ion-input> - </ion-item> -</section> diff --git a/mobile/algebra.js b/mobile/algebra.js deleted file mode 100644 index fa3e6d1..0000000 --- a/mobile/algebra.js +++ /dev/null @@ -1,51 +0,0 @@ -var that = this; -var result = { - - componentInit: function() { - - if (!this.question) { - console.warn('Aborting because of no question received.'); - return that.CoreQuestionHelperProvider.showComponentError(that.onAbort); - } - const div = document.createElement('div'); - div.innerHTML = this.question.html; - // Get question questiontext. - const questiontext = div.querySelector('.qtext'); - // Get question input. - const input = div.querySelector('input[type="text"][name*=answer]'); - - if (div.querySelector('.readonly') !== null) { - this.question.readonly = true; - } - if (div.querySelector('.feedback') !== null) { - this.question.feedback = div.querySelector('.feedback'); - this.question.feedbackHTML = true; - } - - this.question.text = questiontext.innerHTML; - this.question.input = input; - - if (typeof this.question.text == 'undefined') { - this.logger.warn('Aborting because of an error parsing question.', this.question.name); - return this.CoreQuestionHelperProvider.showComponentError(this.onAbort); - } - - // Check if question is marked as correct. - if (input.classList.contains('incorrect')) { - this.question.input.correctClass = 'qtype-algebra question-incorrect'; - } else if (input.classList.contains('correct')) { - this.question.input.correctClass = 'qtype-algebra question-correct'; - } else if (input.classList.contains('partiallycorrect')) { - this.question.input.correctClass = 'qtype-algebra question-partiallycorrect'; - } - - // @codingStandardsIgnoreStart - // Wait for the DOM to be rendered. - setTimeout(() => { - - }); - // @codingStandardsIgnoreEnd - return true; - } -}; -result;
\ No newline at end of file diff --git a/mobile/styles_app.css b/mobile/styles_app.css deleted file mode 100644 index c60d318..0000000 --- a/mobile/styles_app.css +++ /dev/null @@ -1,34 +0,0 @@ -.collapsibleregioncaption { - display: none; -} -.qtype-algebra .text-input, -.qtype-algebra .text-input-md { - border: 1px solid #ccc; - padding: 4px 6px; - border-radius: 4px; - margin: 0px 0px; - width: calc(100% - 20px); - font-size: 1.4rem; -} -.qtype-algebra .item-input { - padding-left: 6px; - margin-top: -14px; -} -.qtype-algebra .question-correct:after, -.qtype-algebra .question-incorrect:after, -.qtype-algebra .question-partiallycorrect:after { - font-family: FontAwesome; - padding-left: 3px; -} -.qtype-algebra .question-correct:after { - content: "\f00c"; - color: #5e8100; -} -.qtype-algebra .question-incorrect:after { - content: "\f00d"; - color: #cb3d4d; -} -.qtype-algebra .question-partiallycorrect:after { - content: "\f046"; - color: #f98012; -} |