Příspěvky uživatele AL Rachels

Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers Obrázek: Testers

My current work setup:

Moodle 5.2+ (Build: 20260525)

PHP 8.3.31

MariaDB 11.4.10

Record RTC v2.0 question type - I know it is only listed for Moodle 5.0 - I am testing anyway, though.

I had been doing some development work with questions in the up coming Content Pages v3.0.0 plugin release, and for a couple of different types of question plugins I have been running into a Whoops problem when I try to create a question. 

When I change the suggested line of code the problem does seem to go away.

I would like to know if anyone else sees or can reproduce the problem when trying to create a Record RTC question in Moodle v5.2+.

Copilot Pro+ tells me the problem is in Moodle core code:

Root cause: core bug in question/classes/local/bank/view.php line 1296

<?php
foreach ($this->extrarows as $row) {
    if (str_contains($attributes['class'], 'highlight')) {
        $rowclasses .= ' extrarow' . ' ' . $this->extrarows[0];  // ← bug
    }
    $row->display($question, $rowclasses);
}

$this->extrarows is an associative array keyed by column name (e.g. 'question_text_row'). The code at line 1296 tries to read it with integer key 0, which never exists. PHP 8+ makes that a hard warning that Whoops converts to an exception.

Trigger conditions (both must be true simultaneously):

  1. extrarows is non-empty — i.e. at least one "extra row" column (like the question text preview row) is visible in the question bank.
  2. A question row has the highlight class — this happens automatically when $question->id == $this->lastchangedid, i.e. you just created that question and the bank refreshes to show it.

Creating a new RecordRTC question satisfies condition 2 immediately, which is why you see it on first creation of that type.

Nothing in iContent caused or triggered this. The question bank used is standard core Moodle.

Průměr hodnocení: -
Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers Obrázek: Testers

Due to all the development work I have done recently while using Copilot Pro+ and Visual Studio Code, I would suggest using them, or something similar, to create your own report to extract whatever data you need. I would also suggest to NOT use the Auto mode if/when doing this combination setup. When I really want good results, I tell my setup to use GPT-5.3-Codex instead of Auto mode. Note that you might be able to get what you want from this combination using the Free intro version of Copilot, or the lowest subscription of Copilot Pro. Definitely worth a look and test drive. Another note: since I mostly have given up playing golf, my monthly subscription to Copilot Pro+ is actually cheaper than one round of golf, and I used to play 3 or 4 times a week during the summer breaks from teaching.

Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers Obrázek: Testers
I have been doing a lot of "quiz question" work on using questions in the Content Pages activity and have run into this same problem numerous times while testing the plugins code. What I have wound up doing is just duplicate the activity, which in your case would be duplicate your current quiz. Then temporarily hide both quizzes from view. You can then make changes to questions in the duplicated quiz, and when ready make it visible. This would maintain access to your historical data.
Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers Obrázek: Testers

Hi Farah,

I wonder if the latest version of the Diary plugin could be useful to you for vocabulary skill building. The new version has multiple prompt modes and can also be used to automatically grade with grading being dependent upon using required words and/or phrases. Can also be used to track changes to see if the users writing improves by allowing edits after submission, but having to start a new copy of the entry.

Hmm, that just gave me a new idea for another prompt mode.

Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers Obrázek: Testers

I just had a thought regarding your, "copy/paste," comment and if I do not mention it here, my old age related forgetfulness will kick in and I will, hmm, what was I saying? LOL

I will have to try and play with it some to see, but a few years ago I started development on a new "dictation" typing mode for the MooTyper plugin. I went about it in a simple way of just making the text to be typed, the same color as the background of the typing input area, then changed each letter as the user types it, to the text color used for text in the settings. Since I knew there are schools out there using MooTyper to generate an income, I figured I better check to make sure a student could not just highlight and copy the text and get a pre-typing look, especially if it was for a MooTyper exam.

I could never pull it off simply because MooTyper client code is constantly checking for keystrokes and updating the statistics display. It checks at a fast enough pace so that I just could not complete a copy or paste operation with the mouse and keyboard, to be successful in my cheat attempts. Granted, a "smart" student can probably work their way around this, but the other "opportunists" would possibly be deterred.

Frankly, right now I don't have the time to spend on testing this, just thought I might put it out there.