Posts made by Tim Hunt

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That sounds like exactly the sort of thing that question behaviours were designed for.

The bit that is not currently possbile is that there has never been a way for behaviours to add settings to the question form. So, my suggestion to get started, is to use the penalty. If penalty is 33.33%, then show the right answer after 3 tries, etc.

(Another technical suggestion. Because a quiz allows multiple attepts, I tried avoid that word in relation to multiple goes at a question. So, I tend to use the word try / tries for that (in things like variable names, UI text, etc. Yes, I know that does not translate easily into all languages.)
Average of ratings: Useful (1)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I need to reformat that SQL to be able to read it.

SELECT
     c.id AS course_id,
     c.fullname AS course_name,
     COUNT(q.id) AS total_random_questions

FROM      mdl_course c
JOIN      mdl_context ctx ON c.id = ctx.instanceid      AND ctx.contextlevel = 50
JOIN      mdl_question_categories qc ON qc.contextid = ctx.id
JOIN      mdl_question_bank_entries qbe ON qbe.questioncategoryid = qc.id
JOIN mdl_question_versions qv ON qv.questionbankentryid = qbe.id
JOIN     mdl_question q ON q.id = qv.id

WHERE      q.qtype = 'random'

GROUP BY      c.id, c.fullname
HAVING      COUNT(q.id) > 0

ORDER BY      total_random_questions DESC;

Right. That is the right SQL.

What I have said before remains true. In Moodle 4.4, there should be no random questions, and deleting them (all related data from mdl_question, mdl_question_versions and mdl_question_bank_entries) should be completely safe.

What I would like to know is: exactly what is creating these? You say it is restoring some backups, but not others. Can you work out which backups cause this? If we knew, we could fix it.

 
Average of ratings: Useful (2)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks Brett.

So, this is the point where we have pretty much finished the plan that I originally wrote about in this forum in early 2021. That took slighly longer than originally planned, but we got there. If you want to start playing with the latest changes, before you get them on your own Moodle sites, whether that is by using the initerim 4.6 release, or you wait for 5.x. They are on the Moodle demo site at https://qa.moodledemo.net/question/banks.php?courseid=2.

Also, we have not finished. We still have funding left over, at least enough to continue paying developers at Catalyst EU, who continue to do the work, until the 5.0 code freeze in at the start of March 2025. At the moment our plans are relatively modest. We are planning to do a number of smaller changes, in two categories:

  1. Add more ways to search in the question bank. For example search by question type, question name, status, modified date, ... This builds on filtering changes in the question bank in Moodle 4.3.
  2. Fix bugs. Obviously, if you make major changes, that is risky. There are always unintended consequences (AKA bugs!). Concerned Moodle users have been reporting them in the tracker. Thank you 😃. Also, a fair number have already been fixed by members of the community, and our project. However, we want to keep fixing more. 

All the things we are working on are linked to MDL-83818. (Note: there is probably more linked there than we will be able to complete, and we may bring in some other things if we feel like it, or if we get good suggestions.)

Average of ratings: Useful (7)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

[Pro tip: always user numbered lists in this sort of message. It is then easier to match up the responses.]

  1. Known bug MDL-82542. Being worked on.
  2. Did it ever do this? Same window seems better to me. (Your browser gives you ways to open a link in a new tab.)
  3. Known bug MDL-82302. Fix in progress.
  4. Not yet, but more filter conditions are being added for Moodle 5.0. That might include question text.
  5. Yes. Has been possible for ages. Admin -> Plugins -> Question types -> Multiple choice. Set the defaults you want on your site there.
Average of ratings: Useful (3)