Comments (15)
Just to be certain, can you confirm that this issue only shows up for someone with site admin role?
from moodle-qtype_wordselect.
Am about to attempt to reproduce it locally
from moodle-qtype_wordselect.
Thanks Marcus. Though I haven't tried, I don't think it is specific to site admin role. Anyone with the capability to access Response history probably will see the same
from moodle-qtype_wordselect.
@AnupamaSarjoshi I would like to try to reproduce your problem, but...
You forgot to mention a) the instructions given to the student ("click such and such words")
b) if your question uses the Multiword mode
c) you forgot to mention the "How questions behave" options you are using
Could you please export and attach your question to your reply? Thanks!
from moodle-qtype_wordselect.
I think the question is taken directly from the included examples. I will add instructions in the next release... Good catch on the question behaviour, though I don't think it will be a decider (could be wrong). It seems a strange one. Hope to look further this evening.
from moodle-qtype_wordselect.
Just tested this locally on my Moodle 4.0.1. Works as expected, The submitted words are in the same order as in the text. Agree with @AnupamaSarjoshi however that some kind of separator between those submitted words (or groups of words) would be useful
from moodle-qtype_wordselect.
I wonder if however the core ddwtos question does it might be an inspiration...
from moodle-qtype_wordselect.
from moodle-qtype_wordselect.
I need confirmation of what question behaviour is being used, I suspect from the word submit at the start that it is Deferred feedback. I can see the code that generates the output in the summarise_response method of question.php
moodle-qtype_wordselect/question.php
Line 277 in 6183f72
Braces could be added like this
$summary .= "{ " . $allwords[substr($index, 1)]->get_without_delim() . "} ";
With reference to word order, I cannot reproduce what you are seeing. The order is probably determined from how the words are returned from
$allwords = $this->get_words();
But at the moment I cannot figure out how it would be returned in an order other than how it appears in the original text.
from moodle-qtype_wordselect.
I can't work this out either, but I can confirm we are seeing this.
I don't believe the behaviour matters. I just reproduced the issue by previewing Anu's question on our system, and only afterwards notice that was using Interactive with multiple tries.
In case it helps, here is the question: (Github does not like XML files, so I had to rename to add .txt.)
questions-U101-20B-WordSelect Reading Comprehension-20220622-1654.xml.txt
There were bugs like this in the past in some core qtypes. Baiscally, when a DB server is new, then in theory, the order of results from any query will be random unless you specify an order-by. However, when DBs are new then typically rows are returned in id order at first, and then with time start getting more random. So, that might possibly explain this hard-to-reproduce bug ... except I just quickly looked at the code, and from what I can see, all the queries have an order-by id. (Example old bugs: MDL-27394 or commit f07d1d319716a0b381ece29435c72999a798f778 - so old, it came before the tracker.)
More debugging needed, but I am out of time for today.
from moodle-qtype_wordselect.
Thanks for the feedback Tim. The behaviour thing was partly to ensure I was seeing exactly the same text before it showed the words, but as you suggest, that is probably not relevant. I was wondering about the order of stuff returned from the db, but I couldn't see how that would happen in this case. I will look further.
from moodle-qtype_wordselect.
I think the the order of the words returned is determined somewhere after here
moodle-qtype_wordselect/question.php
Line 128 in 6183f72
Possibly on the line that reads
$matches = preg_split($fieldregex, $questiontextnodelim, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
from moodle-qtype_wordselect.
But the order of things returned from preg_split is always the order they were in the original string, so it is not clear how this could lead to the problem. It really is a mystery.
from moodle-qtype_wordselect.
That was my assumption. I would be happier if I could reproduce it. I now want to set one up with exactly the same version of PHP and Postgress, which of course should/could not make any difference whatsoever but you never know (even when you feel you do know)
from moodle-qtype_wordselect.
I am closing this as I don't have the time to work towards a fix. If anyone comes up with a code fix I will be happy to review it.
from moodle-qtype_wordselect.
Related Issues (20)
- Multiple questions with question type - qtype_wordselect not working HOT 4
- Weird html output HOT 2
- Support multiple types of selection (e.g. verbs and nouns) HOT 9
- Selection fails if there is multimedia/audio before the text HOT 5
- Show count of selectables
- Teach Log In As Student causes issues
- Right answers shown whatever the quiz/question settings. HOT 2
- Glossary Auto Linking Filter Interference? HOT 7
- 'Missed' right answers HOT 3
- User cannot click to select the word (created by wordselect) HOT 3
- MLang2 filter is not being processed
- Qurstion type on app not supported HOT 1
- Use of no-wrap for placehodlers can break the layout HOT 4
- Wordselect doesn´t show images HOT 18
- I can reproduce what you are seeing and I don't know why it is happening. HOT 2
- Compatibility problem with multimedia filter HOT 2
- Behat .feature files have the wrong tags HOT 2
- Enhancement - Select AND define words HOT 2
- Activity appears with tickable boxes HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-qtype_wordselect.