Record audio/video question type

Question types ::: qtype_recordrtc
Maintained by TimTim Hunt, Chris Nelson, at the OU (Perry building)Mahmoud Kassaei
A manually graded Moodle question type, where the student records a short audio response to answer the question asked.
Latest release:
1091 sites
409 downloads
52 fans
Current versions available: 4
This question type is like the standard essay question type, but instead of writing some text, students have a recording widget where they can record some audio (in future, we plan to also add video recording). We've basically taken RecordRTC (https://docs.moodle.org/38/en/RecordRTC) and implemented it as a question type. 

We consider this an evolution of an Essay question with RecordRTC buttons available to students. We have essentially taken the existing parts and distilled them into a specific question type for the ease and convenience of teachers designing quiz questions and for the students taking them.

Like the standard essay question type, it still requires human grading.

While this question type has obvious uses in Moodle Quiz, it has been primarily designed to be used in an embedded question context (see https://moodle.org/plugins/filter_embedquestion).

This question type has two behaviours: deferred feedback, for use in formal Moodle Quiz tests where a tutor would mark the students' recordings; and a new self-rating behaviour, where students mark themselves.

The self-rating behaviour is used essentially whenever the behaviour is interactive or immediate. We have assumed two use-cases: 1) the student listens to a 'model' audio clip and then records their attempt to follow it. They compare the two clips, and then rate their mimicry. Or 2) the student attempts to pronounce a written sentence verbally, and the feedback contains a model pronunciation clip, allowing the student to then compare the clips and self-rate their accuracy.

This plugin was created by The Open University UK, specifically for its School of Languages and Applied Linguistics.

(We hope that we could look at giving Essay a self-rating behaviour next, which could be used in a similar embedded fashion as an alternative to Pattern Matching sentences. Although if you're thinking about that area already, you might find Gordon Bateson's essay auto-grade plugin of interest.)

Potential privacy issues

You should consider the fact that under GDPR, a recording of a user's voice is personally identifiable data (it is arguably also biometric data). Such 'Special category data' requires extra protection.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Tim
Tim Hunt (Lead maintainer)
Chris Nelson: Product owner
at the OU (Perry building)
Mahmoud Kassaei: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tim
    Sat, May 13, 2023, 7:34 PM
    Acutally, it is not a matter of testing, it is me being stupid. I forgot how interdependent qtype_recordrtc and qbehaviour_selfassess are. If I release one, I almost certainly need to do the other. I will release the latest qbehaviour_selfassess today, and that should solve this.
  • Tim
    Sun, May 14, 2023, 3:56 AM
    OK, working qbehaviour_selfassess now released. I hope that works for you @Doug.
  • Doug E. Wray
    Sun, May 14, 2023, 5:50 AM
    Now a different no joy: plugin update sets me into a database upgrade loop and I'm now stuck on this screen each time I try to update:
    The new version of qbehaviour_selfassess now installs OK, but now I get:

    Upgrading to new version
    qtype_recordrtc
    Setting default values of 'canselfrate' and 'canselfcomment' - 0/29 (id = ).

    Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.

    More information about this error

    Debug info:
    Error code: codingerror×Dismiss this notification
    Stack trace:
    line 1575 of /lib/dml/mysqli_native_moodle_database.php: coding_exception thrown
    line 1632 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
    line 251 of /question/type/recordrtc/db/upgrade.php: call to mysqli_native_moodle_database->update_record()
    line 784 of /lib/upgradelib.php: call to xmldb_qtype_recordrtc_upgrade()
    line 1953 of /lib/upgradelib.php: call to upgrade_plugins()
    line 721 of /admin/index.php: call to upgrade_noncore()
  • Tim
    Sun, May 14, 2023, 5:23 PM
    This is coming from this chunk of code: https://github.com/moodleou/moodle-qtype_recordrtc/blob/main/db/upgrade.php#L220

    The problem can only happen if you have recordrtc questions in your database which missing the corresponding row in qtype_recordrtc_options - which should be impossible.

    If you can directly access your database, a query like

    SELECT * FROM mdl_question q
    WHERE qtype='recordrtc'
    AND NOT EXISTS (SELECT 1 FROM mdl_qtype_recordrtc_options o WHERE o.questionid = q.id)

    will find which questions are affected.

    Then there is the issue of what do do about it. If the rows in mdl_question look like junk, you could consider deleting them. If you can get to the edit form for these particular questions, you might be able to save the question again, which might fix things, or you could manually try to insert the missing data in mdl_qtype_recordrtc_options .

    Sorry for the hassle.
  • Tim
    Sun, May 14, 2023, 5:26 PM
    Or, an aditional option to get out of your immediate issue:

    In this chunk of upgrade code, the 'LEFT JOIN' appears twice on lines 229 and 235. If you changed that to JOIN, then the upgrade would run without the missing data causing issues. Then you cound investigate the broken questions later.
  • Tim
    Mon, May 15, 2023, 10:46 PM
    I have just pushed code which should fix this to the main branch on github. It works in my simple testing, but it woudl be nice if someone having problems with the upgrade could test it for real, before I release it. Thanks.
  • Doug E. Wray
    Wed, May 17, 2023, 7:26 AM
    The change worked. I downloaded the main branch from GitHub, then just copied the contents of the /db directory to the directory on my server. (I had been having problems with a test site.)
    On my production site, routine installation from the /admin/notifications page worked without problems.
  • Tim
    Wed, May 17, 2023, 3:54 PM
    Thanks for testing and confirming. I will get another version released today.
  • Tim
    Wed, May 17, 2023, 8:50 PM
    V1.7 released. As well as the upgrade fix, includes one small enhancement that was done recently.
  • Magalie Desgrippes
    Sat, Jul 8, 2023, 1:27 AM
    Dear Tim Hunt, would it be possible to add a text field for grader informations in this question type like in the essay question type? (linking it to rubrics would be perfect, but as a first step, the grader information would allready be a great help).
    Thanks a lot for your help!
  • Tim
    Mon, Jul 10, 2023, 6:32 PM
    At the MoodleMoot DACH a few weeks ago, I spent some time with Luca Bosch and others, trying to work out if it would be possible to add Rubrics to the standard Essay question type (and other similar types like this). We were unfortunately forced to the conclusion that that was essentially impossible. When the Moodle robric system was created, they did not consider this possibility at all, and adding it now would require rebuilding a lot of things, so would be a huge amount of work.

    Regarding grader information, like Essay. Yes, adding that would be very possible. It just needs someone with time to do the work.
  • Magalie Desgrippes
    Sat, Jul 22, 2023, 6:10 PM
    Dear Tim Hunt, Thanks a lot for your answer.
    If someone could find the time to add grader information to the recordrtc questiontype, that would allow a better use of this work around script I found thanks to Chatgpt.
    It looks for the id of the student in the source and concatenate it with the url of the rubric in an assignement of the same page, to directly go to the evaluation grid of the candidate.
    As our grader do not see the identity of the students (I gave them a profile without right to see fullnames) , such a link might at least reduce human errors (aka grading the wrong person).

    At the moment I can only put it in the feedback textfield of the question where it works well, but it's not the best solution as students might see this button there.
    I hope this work around helps somebody

    script> function generateMoodleLink() {
    var pageSource = document.documentElement.innerHTML;
    var userIdStartIndex = pageSource.indexOf('user/view.php?id=') + 17; // Adding 17 to skip the length of 'user/view.php?id='
    var userIdEndIndex = pageSource.indexOf('&', userIdStartIndex); // Find the index of the next '&' character after the user ID
    var userId = pageSource.substring(userIdStartIndex, userIdEndIndex);

    // Generating the Moodle link
    var moodleLink = 'https://moodle.*INSERTNAME OF SERVER HERE*/mod/assign/view.php?id=*INSERT ID OF THE ASSIGNEMENT HERE*&action=grader&userid=' + userId;

    // Displaying the link
    document.getElementById('moodleLink').textContent = moodleLink;
    document.getElementById('moodleLink').setAttribute('href', moodleLink);
    }
    /script>

    button onclick="generateMoodleLink()">Evaluation
    a id="moodleLink" href="#" target="_blank">
  • Chris Nelson
    Mon, Jul 24, 2023, 1:27 AM
    @Magalie. Just to let you know, Tim's on a well-deserved holiday at the moment, so you might not get a reply for a week or so. I'm afraid the rest of the team don't have enough specialist knowledge to comment on this in the mean time.
  • thanh ba nguyen
    Fri, Jan 12, 2024, 5:58 PM
    hi all,
    how to fix "Exception - qtype_recordrtc\widget_info::__construct(): Argument #2 ($type) must be of type string, null given, called in [dirroot]\question\type\recordrtc\questiontype.php on line 156" when i restore question recordrtc from moodle 3.9 to 4.2.
  • Ben Hill
    Mon, Apr 8, 2024, 7:25 PM
    Dear All,
    First - thanks for the great work on the plugin. Everything works great on our end. Well done!

    May I humbly submit the following request for development, potentially making the plugin EVEN MORE useful - especially against cheating:

    An option is added to the question type, allowing for the following
    -The question (or part of) is revealed only once the record button is pressed (and recording device activated).
    -A timer would then count down 'reflection time' (say 10 seconds) after which the recording starts, and students give their response.

    Hope this makes sense, and meets with your approval!

    Thanks again for the great work!
1 2 3 4 5
Please login to post comments