aboutsummaryrefslogtreecommitdiff
path: root/mobile/algebra.js
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2019-04-28 09:18:15 +0200
committerJean-Michel Vedrine <vedrine@vedrine.org>2019-04-28 09:18:15 +0200
commitf2352f6e189fc1a40836957e39f5243b9d826521 (patch)
tree35d734633847eea3db0325ef7e7b27d6781c5c35 /mobile/algebra.js
parent51c7a042ab96f90a9ddfada266aba118c0f869bf (diff)
Remove obsolete and buggy mobile support
Diffstat (limited to 'mobile/algebra.js')
-rw-r--r--mobile/algebra.js51
1 files changed, 0 insertions, 51 deletions
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