moodleou / moodle-filter_embedquestion Goto Github PK
View Code? Open in Web Editor NEWA Moodle text filter plugin that displays questions from the question bank embedded in the page.
A Moodle text filter plugin that displays questions from the question bank embedded in the page.
When embedding a question of Type "Drag and Drop into Text", the answers are not randomized and appear in the same order every time.
create a question of type "Drag and Drop into Text" with an id. Make sure the shuffle-checkbox is clicked. Then embed it in a text page.
Every time you open the page with the embedded question, the answers appear in the same order.
When using the preview function this the does not occur.
The answers should be shuffled evertime the page is reloaded.
This issue is especially annoying when one forgets to check "shuffle" when creating the question. The order of the answers is then locked in and they always appear in original order even after checking "shuffle"
Hi, first of all, thank you for this plugin - very useful! I recently installed the Embed questions filter and it's been working really well, until I tried to embed an essay type question. It embeds the text box, but there's no submit button (as indicated in the image)
Is this a bug, or am I missing something?
If a category is chosen for random questions, but not all questions in the category have idnumbers, I get an questionidmismatch error (after the Check button).
I think this is because the questions are chosen using the regular random_question_loader: https://github.com/moodleou/moodle-filter_embedquestion/blob/master/showquestion.php#L72
I'm not sure why a question needs to have an idnumber, but given that the code enforces it, we should only choose from questions that have them.
Note that, although Moodle 3.6 has proper idnumber fields for questions and categories - and we added that to standard Moodle to help this pluging work. Actually, we ahve not yet made teh change so that this plugin uses the idnumber field. You still have to put [ID:someid] in the category/question name.
We really must find time to change this plugin to use the real idnumbers, but I don't know when that will be.
Originally posted by @timhunt in #4 (comment)
From what I'm seeing in Moodle 3.6.2+ and plugin version 2018111900, this issue still has not been fixed. Is this correct?
If so, is there any estimated timeline for the plugin to work as expected?
Alternatively, is there a place in the code you can point our developers to look at to try to implement this behavior ourselves?
Hi Tim - this is a great plugin, thank you! As you may (probably don't) remember, I've asked you about something like this at a couple of MoodleMoots :)
I've added the id numbers to categories and questions. Using the Atto embed plugin to embed the question seems to cause the page to scroll indefinitely - see video at https://www.dropbox.com/s/wxo4zp2mds9hbbo/Recording%20%2310.mp4?dl=0. No error messages are visible with developer debugging on.
This is using v1.2 (2018071300) of the plugin on Moodle 3.5+ (Build: 20180621), running the Boost theme on a LAMP server with php 7.2.9 / mysql (10.0.34-MariaDB-cll-lve).
Any thoughts?
Doesn't work with moodle mobile app, throws an error "refused to connect". Tried on my localhost moodle site with https://mobileapp.moodledemo.net/
Failed test 1
/var/www/html/filter/embedquestion/tests/behat/filter_embedquestion.feature:26
Debug info (from local test run):
"Failed steps:
Scenario: Test using the helper script - embed a specific question
Line 44: And I reload the page
Error message: Dismissed user prompt dialog: To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. (Facebook\WebDriver\Exception\UnexpectedAlertOpenException)"
Failed test 2
/var/www/html/filter/embedquestion/tests/behat/filter_embedquestion.feature:69
Debug info (from local test run):
After line 78:
"In WebDriverException.php line 139:
TypeError: browsingContext.currentWindowGlobal is null"
There is a syntax error in plugin on PHP 7.0:
filter/embedquestion/filter.php line 183
public static function parse_options(array $parts): ?array {
Plugin version: 2019091600
PHP version: 7.0
Moodle version: 3.6
When backup content with embededquestion filter from one site and restore in another the question will not load.
Optional solution:
Add secrete configuration to admin settings
Using version 1.4 for Moodle 3.4+ (2018111900)Moodle 3.4, 3.5, 3.6
That worked OK with moodle 3.5.3. Just upgraded to moodle 3.6.1 and it does not work. I do get the Embed question icon on the ATTO toolbar, I do have questions with an IDNUMBER in my questions bank, but the categories list is empty.
After installing this plugin no atto plugin is included or installed and therefore I can not add 'embedquestion' to the "insert =" block of the editor's toolbar config. When I try to save this:
"The plugin 'embedquestion' cannot be used; it does not appear to be installed."
I installed Version 1.4 for Moodle 3.4, 3.5, 3.6 at my local Moodle 3.6 XAMP.
My observation is that you can't select a random question from a category with adaptive mode.
Even though adaptive mode can be selected and obviously is conveyed in the embedding code, the actual behaviour is not adaptive. Rather the question demands all inputs to be done before Check can be done and there is no chance to retry. Bad for formative assessment.
Also, currently there is no access to the general feedback for questions in adaptive mode, be it randomly selected or not.
My proposal is to:
Hi all,
I think I followed the workflow to embed a question, but I get this message and not question: "This question may not be embedded here."
Any idea why? Thanks for your support.
Regards,
J.
Can a global toggle be implemented to allow embedding of questions/categories without ID numbers? We don't advise end users to set an ID number when they create questions and don't feel that embedding exam questions is a risk.
Maybe one can be able to add all (or multiple) questions in a category at once in a page. Then these questions can be in random order every time the user opens or refreshes the page.
Also, maybe the submit button can be only one for all questions, and there is the option to restrict answer attempts to only one.
https://moodle.org/plugins/atto_embedquestion#:~:text=Although%20feel%20free,load%20an%20instance).
Hi, the test stated above is failing.
Environment details:
MySQL 5.7
PHP 7.4
Moodle latest MOODLE_400_STABLE
Error details:
Scenario: Test using the helper script - embed a specific question
And I reload the page: Dismissed user prompt dialog: To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. (Facebook\WebDriver\Exception\UnexpectedAlertOpenException)
Scenario: Links to and from the question bank
Then I should see "Editing a True/False question": "Editing a True/False question" text was not found in the page (Behat\Mink\Exception\ExpectationException)
I'm unsure if this bug is in core or this plugin. More details available here: https://tracker.moodle.org/browse/MDL-78585
Is there a specific reason for this limitation? I've been asked to create a patch to allow a client to embed questions from the system question bank but am a bit wary as you seem to have very intentionally not allowed it...
Moodle: 3.9.2
EmbedQuestion: master
Behat scenario: Delete and restore a quiz with user data # /var/www/html/admin/tool/recyclebin/tests/behat/backup_user_data.feature:24
Manual testing of this, encounters the following:
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 33 of /backup/moodle2/backup_stepslib.php: Error thrown
line 26 of /report/embedquestion/backup/moodle2/backup_report_embedquestion_plugin.class.php: call to require_once()
line 283 of /backup/util/plan/restore_structure_step.class.php: call to require_once()
line 4237 of /backup/moodle2/restore_stepslib.php: call to restore_structure_step->add_plugin_structure()
line 84 of /backup/util/plan/restore_structure_step.class.php: call to restore_module_structure_step->define_structure()
line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
line 210 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
line 178 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 384 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 265 of /admin/tool/recyclebin/classes/course_bin.php: call to restore_controller->execute_plan()
line 101 of /admin/tool/recyclebin/index.php: call to tool_recyclebin\course_bin->restore_item()
Output buffer:
I did a test with embedding 2 questions, each one in a separate text label. The first question is in adaptive mode, the second in direct mode (as specified in the embed helper script).
Yet the behaviour of both questions is direct mode.
You can try this at my demo moodle course.
Hello,
I would like to create pages with many embedded questions. Those pages would be created by a generator (e.g. combining all questions of a specific topic). Is it possible to use some kind of shortcode, like {{embedquestion:2:question123}}, paste this into the html and I am done?
Or would it be possible to have an URL like .../freefloatingquestion.php?course=2&question=question123, which shows the question123 from category 2? Similar to the "preview question" page in the question bank?
This would be very helpful!
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.