Sunday, June 5, 2011

Adding video feedback to the Assignment activity

Hi. An important element of the Moodle assignment activity is feedback from the facilitator. Do you give feedback to students inside the Assignment activity? I don't know about you, but I personally find giving feedback a chore. Especially when one is bogged down with lots of paperwork and preparation. It shouldn't be a chore since quality feedback is very important to students' learning.

By default, Moodle 1.9's feedback section of the activity is text-mode. How many of you had at one point or other had wished that you could give video feedback? Well, the good news is that Kevin Brake has created a Forum Video Recorder that works inside Moodle forums. I am also happy to announce that I have used Kevin Brake's excellent code, some sleuthing and hacking of a Moodle 1.9.7 core file to enable video feedback within the assignment activity itself.

To give video feedback, you will need to:
1. use a working webcam (obviously)
2. install Kevin Brake's excellent Forum Video Recorder. For instructions on how to use it, click here.
    To know how to install it, click here.
3. have Java Runtime installed
4. have the QuickTime plugin installed. In case QuickTime gives your Wbb browser problems,
    download and install QuickTime alternative
5. insert some code inside /mod/assignment/submissions.php.
    To see the Moodle 1.9.7 file that I used, download the submissions.php file.

If you have successfully installed the Forum Video Recorder, you should be able to embed MP4 videos inside Moodle forums activities and label resources. Congratulations so far!

The next step is actually to add video feedback to the Assignment activity. Here's what I did. I edited the /mod/assignment/submissions.php file. At line 92, you should see this code:


Insert Kevin's code just before the $assignmentinstance->submissions($mode); line.



//My Forum Video Recorder Code

$prefix = 'W'; // a universal prefix prefix 

$my_random_id = $prefix;
$my_random_id .= chr(rand(65,90));
$my_random_id .= time();
$my_random_id .= uniqid($prefix);

//Set the path to the location of the videoapplet index.php found on your server 

$my_moodle_url = "/moodle/videoapplet/index.php";
$my_moodle_url .= "?random_id=$my_random_id";
echo <<< HTML
function showhide(id)
if (document.getElementById)
obj = document.getElementById(id);
if ( == "none"){ = "";
} else { = "none";


<a href="#" onClick="showhide('$my_random_id'); return(false);">
<img src="/moodle/videoapplet/webcam.png" alt="Webcam reply"></a>

<div style="display: none;" id="$my_random_id">
<iframe src="$my_moodle_url" width="560" height="400" frameborder="1" scroller="no">

  <p>Your browser does not support iframes.</p>



To save you time, you can download the submissions.php file that contains the hack code. The code works for Moodle 1.9.7. Make sure you backup your original submissions.php file first! Also, here is the zip file of the videoapplet files that I am using on my production site. You can find the png image of the webcam (shown in the Youtube video below), and the code that loads it, inside this zip file.

Lastly, I leave you a Youtube video explaining the process. Please bear with me that somehow I was unable to get Camtasia 6.0 to capture the webcam window's output. Perhaps someone out there can help me know how to do it right.

If you face any problems installing and getting the Video Recorder to work, please do not hesitate to contact me! You can leave a message for me on this blog, or email me at boonsengkam[at] Until the next time, have a great day Moodling.

Frankie Kam

If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

1 comment:

  1. Wow! This is great. Thank you.

    I'm trying to develop a moodle feedback activity where students hand in electronic files through an advanced uploading of files activity (in my case cubase and sibelius music project files). I then want to be able to open their work on my own computer and take a screen capture of the audio feedback I provide along with visual examples captured from the screen. I already have a way of doing this by making a jing video and posting the resulting mp4 as a response file within the feedback section but this can be time consuming. I'd really like to find a way to manage the screen capture from directly within moodle so that the video feedback is captured straight to the server and video is embedded in the feedback section automatically. Do you think it would be possible to hack an existing webcam plugin like the one you demonstrate to take screen captures as well?

    I've been thinking of approaching techsmith to see if they would be interested in developing a moodle plugin. Most importantly there is one final element to my idea: I want to create a student response area within the feedback section of the assignment where students must summarize the feedback provided in their own words to demonstrate their understanding of the feedback. Basically they will be recording learning conversions in their own words. Perfect AFL (assessment for learning). It would be even better if they could post their response from a webcam or even another screen capture.

    please let me know your thoughts?


Ratings and Recommendations by outbrain