moodleou / moodle-qtype_gapselect Goto Github PK
View Code? Open in Web Editor NEWThe Gap-select question type for Moodle 2.1+
The Gap-select question type for Moodle 2.1+
This plugin does not work with Moodle39
Running the unit tests on Moodle 2.4 on PHP 5.5 or PHP 5.4 we see three related failures:
qtype_ddwtos_test::test_xml_import
Property correctfeedback is different
qtype_ddwtos_test::test_xml_import_legacy
Property correctfeedback is different
qtype_gapselect_test::test_xml_import
Property correctfeedback is different
The expected and actual Arrays being compared are as follows for the two xml_import tests:
Array
(
[text] => <p>Your answer is correct.</p>
[format] => 0
[files] => Array
(
)
)
Array
(
[text] => <p>Your answer is correct.</p>
[format] => 0
)
And similarly for the legacy one:
Array
(
[text] => Your answer is correct.
[format] => 1
[files] => Array
(
)
)
Array
(
[text] => Your answer is correct.
[format] => 1
)
Hi Guys,
Thank you for this plugin. I am trying to add multiple language to my Moodle and there was an issue with the rendering and the processing of the "Select the missing word" question type.
I am using multi-lang v2 for my multi-language filter. Maybe the solution works with the v1 too.
Here are the changes I made:
/question/type/gapselect/rendererbase.php
Line 99
$choice->text) . ']';
and change it to:
format_string($choice->text)) . ']';
/question/type/gapselect/renderer.php
Line 60
$selectoptions[$orderedchoicevalue] = $orderedchoice->text;
and change it to:
$selectoptions[$orderedchoicevalue] = format_string($orderedchoice->text);
/question/type/gapselect/renderertypebase.php
Line 158
$bits = preg_split('/[[(\d+)]]/', $question->questiontext, null, PREG_SPLIT_DELIM_CAPTURE);
and change it to:
$formatedQuestionText = format_string($question->questiontext);
$bits = preg_split('/[[(\d+)]]/', $formatedQuestionText, null, PREG_SPLIT_DELIM_CAPTURE);
Any suggestion to better the code?
Thank you to Iñaki Arenaza for fixing the rendering. See comments section of https://moodle.org/plugins/filter_multilang2
I hope this helps
Keep the good work!
Thank you
I am getting permission denied. Am I omitting a git command?
Also wondering if cd ing to moodle is good enough or do I need to go beyond? I've tried both, but they get permission denied from remote (Git). Many Thanks, Dave
I am told that a 2016 version exists. Is that true?
I have Moodle 2.2 stable branch from git on my machine, and cloned this question type from here, and when I try to install this plugin I get the following message:
http://www.dragonslair.co.nz/stored/shared/plugin_error_version.png
Plugin says it is for Moodle 2.1 so I should be able to put it on my Moodle 2.2 installation?
You can specify MathJax formulas as answer choices. But in the select they are not rendered correctly. Example:
That happens because the <option>
element only supports text But MathJax formulas consist of a lot of HTML elements. To make them work here the plugin would need to use something other than <select>
and <option>
. I've read that Select2 or Chosen do work with HTML content.
Here's a sample question (unzip, then import as Moodle XML): questions-Testkurs-Lückentest-20211125-1736.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.