Here is the first version of a new report plugin for the quiz module : detailed responses
The idea of this plugin originated in the first table of Moodle 1.4x full statistics report plugin.
It display all responses from the student in a table.
Random questions are supported but as only responses are displayed not questions, it is sometime like a Jeopardy game for the teacher !!
It is possible to download the results as an Excel or CVS file.
A readme text file with install help is included.
Consider this as a "working beta", I am eagerly waiting for your bug reports and improvment suggestions.
Only eng lang files are included but :
- as english isn't my native language, here also you can report bugs !!
- I can obviously send fra files to anyone interested
PS : Gustav, as responses share a great amount of code with overview, it wouldn't be too difficult for me to add download to overview report. May I do it ?
Re: New quiz report plugin : detailed answers
It will be easy to do a version for Moodle 1.6dev but I wanted most Moodle users to be able to use it and test it.
It doesn't write anything to your database so the only chance to harm your Moodle installation is to make a mistake during install.
Re: New quiz report plugin : detailed answers
- detailed responses, not answers
- CSV not CVS
Detailed Responses (detailed answers) is a very useful tool and is producing some excellent feedback for my course leaders. So, many thanks for this.
But I wonder whether we could get a bit more clarity about its application in Moodle 1.9? In early incarnations of the tool you were not expecting it to overwrite any files, but I think applying it directly in 1.9 would replace some items. Also there appears to be one or two places where the code no longer points to the right file (I had a bit of a problem with the context help files to begin with).
Correct me if I get anything wrong, but I believe that the download 'responses.zip' unpacks into a 'responses' folder as follows:
responses/Readme.txt
responses/report.php
responses/styles.css
responses/lang/en_utf8/quiz_responses.php
responses/lang/en_utf8/help/responses/responses.html
responses/lang/en_utf8/help/responses/responsesdownload.html
responses/lang/en_utf8/help/responses/responsesoptions.html
From the Readme file I deduce that the first 3 files should be placed in
/mod/quiz/report/responses as:
/mod/quiz/report/responses/Readme.txt
/mod/quiz/report/responses/report.php
/mod/quiz/report/responses/styles.css
When quiz_responses.php was placed in '/lang/en_utf8', then in my 1.9+ there was already a file with that name there, and on close comparison I see it contains the same data (created in Moodle 1.7 beta).
If the remaining 3 files are placed in '/lang/en_utf8/help/responses' then they still leave us with a bit of a problem when we call on the context help.
The context help link to 'responses.html' doesn't connect, and nor does the link to responsesoptions.html, whilst the link to responsesdownload.html does.
I believe the problem lies in a couple of lines in report.php:
print_heading_with_help(get_string("responsestitle", "quiz_responses"),"responses", "quiz_responses");
calls for a help file in folder 'quiz_responses', rather than 'responses', as does:
helpbutton("responsesoptions", get_string("responsesoptions",'quiz_responses'), 'quiz_responses');
...so I altered the folder name (in the ftp view), and it worked. Whereas:
helpbutton("responsesdownload", get_string("responsesdownload","quiz"), "quiz");
was already finding a file in the 'quiz' directory with the same name and the same content, except the formatting is of an improved version using <h1></h1>.
There is also a version of responsesoptions.html in the same folder; but this is not used by the code.
So I wondered if it was possibly time to rationalize the situation, and create a 1.9 package that unzips itself into the most appropriate folders, with a standard formatting, which will allow those without techie skills to upload your extremely useful package successfully.
Regards and many thanks,
John
This report is really great and you help me a lot on building my own. However, the 2 download buttons don't work... "Report not known (responses)" message shown... I'm using Moodle 1.5.2
One suggestion: could you add a column of the attempt no. or the started on date & time?
Thanks for your efforts!!!
this error message seems to come from the lines :
if (! is_readable("report/$mode/report.php")) {
error("Report not known (".clean_text($mode).")");
}
in mod/quiz/report.php
So verify that you strictly followed the instructions to install the plugin. The report.php should be in a subdirectory named "responses" of your "mod/quiz/report" directory. Any other directory name than "responses" will cause troubles.
Re: New quiz report plugin : detailed answers
To all Moodle users interested in testing this plugin, you will need to rename the subdirectory mod/quiz/report/reponses to mod/quiz/report/responses (missing letter s)
I am very sorry for this mistake I verified the zip file several times but failed to see the problem.
Thanks, looks great! A few comments:
1. Could a display option be added to allow showing e.g., a, b, c, d on multiple choice rather than the text content of the selected choice(s)?
2. Could a display option be added to arrange questions by Question ID number instead of order of appearance in the Quiz? This would be very helpful for random-order quizzes (which I use most of the time)?
3. (but this is a Gustav question): Shouldn't this be added to the current release (or at least 1.5.3) as well as 1.6?
Thanks again -- much faster than clicking on the Marks display in Overview.
- to edit questions, suppressing a choice
- to shuffle the choices before displaying the question to each student
when a student check a choice the unique id of this response is saved, not the order of the choice.
of course it is not impossible to do that, you need for each question to retreive all choices, to associate a letter to each one and display that letter.
but of course the teacher need a way to know what each letter mean so we need to display somewhere a list of all multichoice questions with all choice and associated letters (as the old "fullstat" report was doing) and also to do the same thing for Excel and text download.
2) Seems as sensible and not too difficult to do but I need to look at the code
Thanks for your reply. I see that a, b, c, d would not be very useful with choices shuffled (which I often use). Actually choice order in the question (as seen when edited) was what I had in mind, rather than the order the student sees. So I should have said answer #1, #2, #3, #4, which wouldn't be confused with a, b, c, d as seen by the student. Is that what you mean by unique answer ID? Or is there a unique answer ID kept for all answers in the database? Anyway, thanks for looking into it and explaining the problem. Thanks also for looking into suggestion #2.
I have been using detailed responses for nearly a month now, it really is a great addition. Thanks again for doing it (and also for packaging the 1.6 essay question for 1.5).
I guess the answer to point #3 is that same as Martin's point about essay questions: it's a new feature rather than a bug fix, so by definition would not be added to a 1.5.x release.
for point #3 only Martin can answer but I am sure we can all understand Martin's wish that stable branch stay as stable as possible the only thing I can say is that contrary to the Essay question the detailed responses report doesn't write anything to the database, doesn't need any db upgrade and doesn't interfere with anything wich simplify the problem a lot !!
Well, it would be great if it could be added to the current release -- thanks for making it available as a download. Have you made any updates to it since you posted it at the top of this thread? If so, where do I download from?
Thanks,
Jim.
P.S. Your English (as expressed in these forums) is very good -- it seldom appears non-native.
I meant to ask also if you have updated the essay question download you posted, or if it is still the most current. If either the essay question or the detailed response report have been updated, where do I get them from (I couldn't find them in CVS). I plan to add them to a 1.5.2+ v2005060222 production site. I've been using them on localhost ever since they were first posted and haven't seen any real problems, and you've been most thoughtful to reply to all the comments I've posted.
Thanks,
Jim.
With the detailed answers plugin appear in future 1.5.x builds? I think it would be very worthwhile to put in the current distribution.
Thanks!
And I will certainly not say that the detailed responses report is bugfree , but I can say that:
- it is stable (I would say "as stable as the reports already in the stable branch")
- it is not dangerous in the sense that it doesn't write anything to the database (other than log records of course)
- it can't cause any backup/restore or upgrade problem
- it will in fact be safer when included in the Moodle distribution, because the only risk I see in the actual situation is that people upload files in the wrong place installing it themself
- as more and more Moodle users are upgrading to 1.5x queries about the loss of functionnality from the old detailed statistics will increase and the detailed responses report is an answer to these queries
Gustav, if you decide to include it, I made a change so that the response text is formatted by calling the format_text function. So that for instance a response can include a TeX formula.
It funtions pretty well in several question types (shortanswer, numerical, multichoice...) But I have some problems with CLOZE (I know that your plug-in is an improvement comparing with vers 1.4 that not supports detailed statistics for CLOZE questions -at least for my experience-):
* field separator is a comma (so the response must avoid to use commas -problems whit decimal separator in spanish or in free response-). I know that I could use other formats than CLOZE for the same results (but is easy for me to write related questions in CLOZE FORMAT)
* The fields related to a shortanswer or numerical questions were correctly exported but the multichoice parts in a CLOZE question have problems.
Example obtained for a CLOZE question in excel:
jam, 7102, 53, 64, 2.5, 3, 2.5, 4
The first 2 fields (jam, 7102 are shortanswers), and were exported correctly.
the next two were MULTICHOICE (the third a list of 10 numbers of 8 digits, and the fourth two posibilities: "WIKI" or "TEST"), but the exported responses (53 and 64 respectivelly) not match whit any of the multichoice responses.
The last four fields were numerical and were exported correctly.
The CLOZE sintax for the question was:
Datos correspondientes a:
Nombre {1:SHORTANSWER:%100%Juan}, Apellidos {2:SHORTANSWER:%100%Marin}. DNI (solo el número) {3:MULTICHOICE:%100%44510013~%0%
48528106~%0%48311256~%0%22665677~%0%29196851~%100%3367165~%0%73568213~%0%19881326~%0%19097484~%0%52674737~%0%20820552}.
Grupo de trabajo {4:MULTICHOICE:%100%WIKI~%50%TEST}.
Horas dedicadas a la asignatura por semana y actividad:
Semana 01, del 29 septiembre al 6 de octubre.
a) {1:NUMERICAL:%100%15:0} horas a tareas INDIVIDUALES (leer documentos, seleccionar citas, incorporarlas al FORO,...).
b) {1:NUMERICAL:%100%15:0} horas a tareas COLECTIVAS (seleccionar materiales de foros para construir WIKI, corregir o modificar WIKIS,...).
c) {1:NUMERICAL:%100%15:0} horas de participación en reuniones de GRUPO (las sesiones con el profesor)
d) {1:NUMERICAL:%100%15:0} horas a OTRAS tareas (tutoría, correo electrónico, resolver dudas del funconamiento de moodle...).
I must admit that as I don't use CLOZE questions I didn't paid too much attention at the output for these questions.
Here is how the detailed responses (and item analysis) work (Enrique Castro the item analisys original author did it that way and I find it very good, so I used it for detailed responses when I wrote it!!)
- there is no specific code in these reports for any questiontype
- they call some code in the questiontype.php file for each question type to display the right answer and student answer. (they call the get_actual_response function and for questiontypes that don't include this method they revert to the default one wich display whatever is stored in the record answer field)
This is pretty cool because doing things that way, reports can support new questiontypes without any modification (for instance detailed responses support the essay questiontype)
The only difference between item analysis and detailed responses is that detailed responses will include all questions whatever their type is, but item analysis will display results only for SHORTANSWER, TRUEFALSE, MULTICHOICE, MATCH, NUMERICAL, CALCULATED (this is why CLOZE questions aren't displayed in item analysis report)
So if we want to enhance the display for CLOZE question, we need to modify the mod/quiz/questiontypes/multianswer/questiontype.php file.
Currently there is no get_actual_response function in this file so the report revert to the default method wich is to display the information as it is stored in the database. Not ideal !!!
If you can think of a good way to display the information on screen, I think it would not be too difficult for me to write the get_actual_response code in a few days.
Is there any place we can see this before downloading it?
Karrie
This example Quiz has 5 questions: 3 shortanswer (#1, #2, #3), 1 multichoice (#4) and 1 CLOZE with 58 questions inside (#5). The responses to the CLOZE question were all in the last column, separated by colons.
The module adds the firs two columns (user name and points obtained)
It is possible to add a filter to choose the las attempt, the first or all the attempts?
In Item Analysis tab exits this possibility.
It would be interesting to add this feature to the general view tab.
Well I must admit that my original intention was to provide exactly the same choices : seee all attempts, first attempt, last attempt, best attempt.
But at that time I realized that the sql queries in the item analysis were in fact not working (for Mysql, for Postgres I don't know) because of incorrect sql syntax.
So first I decided to fix the queries in the item analysis report and later to add these options to the detailed responses plugin.
I don't know if any of you have noticed but there are still some problems in the display of these plugins :
- sometime group selection is not correctly handled
- users without any attempts are included
Unfortunately I am lacking time to fully study the problem and as the results displayed are "correct" (only there are lines that "shouldn't be there") the situation is still pending today.
But it's on my todo list
Good idea.
But it seems, that there ist a faut in the description, because there is no
" mod/quiz/styles.php. Of course you can change the styles to suit your taste !"
Can u help me?
We are using Moodle 1.4
Warning: Cannot use a scalar value as an array in E:\vhosts\server.webs.adress.es\httpdocs\moodle\mod\quiz\report\analysis\report.php on line 663
at end of this I can see the item analysis table.
There is a way to fix this problem?
Thanks
Where can I find the latest version of this plugin? I would really like to implement it on my installation. Will it work on 1.5.3+ ?
regards,
S.Fjalar
Josep M.
- if you are using 1.6DEV, nothing to do thanks to Gustav the plugin is already installed
- if you are using 1.5x the plugin is not part of any distribution. So you need to install it yourself. The plugin don't write anything to the database, don't modify any original file (except eventually a lang file if you don't want the plugin's name to appear as responses)
- I have provided a zip file in another thread with a readme for installation, but I will re-post it here as soon as I find the last version on my HD
I must add that I originaly developped it for 1.5.2 so i am quite sure there is no problem with Moodle 1.5x
Re: New quiz report plugin : detailed answers
the report.php file in it was downloaded only a few minutes ago from my main Moodle site so this time I am sure this is the newest version.
As I use that site daily I am also sure it works (well at least it works for me ...)
And also this time I didn't forgot to use en (and not eng) for the lang subdir name
I only hope I didn't make another mistake ....
As I said in another thread the display for CLOZE questions is not very good because currently mod/quiz/questiontypes/multianswer/questiontype.php lack a proper get_actual_response function
So the Moodle users familiar with php can add the code
----------------------------------------------------------------------------
function get_actual_response($question, $state) {
global $QUIZ_QTYPES;
$teststate = clone($state);
foreach($question->options->questions as $key => $wrapped) {
$state->responses[$key] = html_entity_decode($state->responses[$key]);
$teststate->responses = array('' => $state->responses[$key]);
$correct = $QUIZ_QTYPES[$wrapped->qtype]
->get_actual_response($wrapped, $teststate);
// change separator here if you want
$responsesseparator = ',';
$responses[$key] = implode($responsesseparator, $correct);
}
return $responses;
}
------------------------------------------------------------
Just BEFORE the closing curly brace preceeding the
//// END OF CLASS ////
line in the mod/quiz/questiontypes/multianswer/questiontype.php file
Unfortunately if you upgrade this file you will need to make the change again
Note #1 : Gustav (or Martin) if you read this I think it would be good thing to add this method both in the 15_STABLE and in the 16_DEV CVS branches.
Note #2 : as you see in the above code I use the comma between students responses to different subquestions in the CLOZE question.
If this doesn't suit your needs you can modify the
$responsesseparator = ',';
line changing the comma to any string you want.
This is something that I need badly....
Could some1 please please please give me the latest download file and the instructions to download this plug-in?
The system admin would not be availble till Monday and I need 3 quizes to be uploaded by that time and want to test this feature.
Please mention any instructions I need to be careful of, cos i do not wish to ruin the existing quizes.
Also after intallation of this plug in will I b able tp see the responses of all the quizes that I have uploaded so far.
Please Help, I am in a bad state, any help would be great.
Avdhut Shelar.
If you are using Moodle 1.5.x
Just look a few lines above your own message in that thread.
You should see my message dated Wednesday, February 8th 2006 begining with "As requested here is the last version ..."
And before the first line of the message, just after the date and time, to the right there is a link with a small icon named detailed_responses.zip
Downloading this zip archive will give you all the files you need and a README file to install the plugin.
It is very easy to install and if you install the report.php file in the right place and follow the README there is really no risk at all to damage your Moodle install.
AS I already said, it doesn't create any table or modify existing ones, nor write anything to the database so there is no special action to do to upgrade your site, just install the files and follow the readme.
Do you mean Thursday, February 9th? That's the date I see in the message where you attach the file we are talking about.
Josep M.
Hello I'm using the detailed report along with the essay question as sort of a survey type tool. It is working pretty good except the answer is cut off. Is there anyway to get the complete answer to show up in the excel boxes?
Hello jean-michel,
Is there a version available of this module that displays the login along with the name of the user or can one be easily made? I am administrating a test to over a thousand participants and I need to analyze the responses based on the users login since names are not unique.
Thank you,
Peter Meertens
Do you want the login (the exact name of this field in the database is username) to be displayed on screen or added to Excel ODS or text downloads ?
If you only want it to be included in the downloads, I suggest you replace one of the columns I have added in version 1.7 of the report (I have added columns for idnumber, department, institution, email). Choose a column that you don't use (for instance institution) and replace everywhere in the report.php the word institution with username.
Additionnaly if you want also the username to be displayed on screen, you need to change
// Define table columns
$tablecolumns = array('picture', 'fullname');
$tableheaders = array('', get_string('fullname'));
to :
// Define table columns
$tablecolumns = array('picture', 'fullname', 'username');
$tableheaders = array('', get_string('fullname'), get_string('username'));
and also :
$rowdata = array(
$picture,
$userlink);
to :
$rowdata = array(
$picture,
$userlink,
$attempt->username);
But beware to be able to display the username on screen , you need first to make the first change (replace either idnumber, department, institution or email with username)
If you have trouble doing that, just tell me (via private message) what version of the report you are using, your mail address and I will send you a modified file.
..............................................................
I will answer my own question...
Last version of Detailed responses 1.13 doesn't work with Moodle 1.8.3+ you need to use version 1.10 that can be downloaded at:
http://moodle.cvs.sourceforge.net/*checkout*/moodle/contrib/plugins/mod/quiz/report/responses/report.php?revision=1.10
Manuel.
PHP Fatal error: Call to undefined function: groups_get_activity_group() in mod/quiz/report/responses/report.php on line 47
using version 1.10 works for now.
Quiz Report: Detailed Responses
Download latest version
The "Download latest version" link retrieves version 1.14, which you say is only compatible with moodle 1.9. yet the dowload page says it requires Moodle 1.6 or later. Only CVS users will be using Moodle 1.9, I think, since the download page only lists up to 1.8.3 (current stable).
Re: New quiz report plugin : detailed answers
First, thanks very much for this promising plugin, is exactly what I'm searching for. However, I'm having problems with it:
I've got moodle 1.9 (fresh weekly version)
I've donwload the last version from the link in the plugins page, and when I click to the detailed responses, I just get the total numbers of attempts and this error (in debug mode):
Call to a member function sql_concat() on a non-object in /var/www/moodle/mod/quiz/report/responses/report.php on line 299
1) download and unzip the current version (1.14) to .../moodle/mod/quiz/report
2) download the version 1.10 of the report.php script from:
http://moodle.cvs.sourceforge.net/*checkout*/moodle/contrib/plugins/mod/quiz/report/responses/report.php?revision=1.10
3) replace .../moodle/mod/quiz/report/responses/report.php with the newly downloaded report.php
Now, it works fine.
Thanks for this tip. This has got the detailed responses tab working fine for us in Moodle 1.8.4. Thanks also to all for the updating of the detailed responses tab - it's a real boon for us in the way we are using Moodle. However, we have had one slight issue with getting information from it when using groups.
We have a large number of people set up within groups in one course, each with a separate 'mentor'. When we try to look at the detailed responses for an individual group, the name of the group switches to a number making it difficult to tell which group it is. Have we set something wrong with this? I have attached a screenshot to show the issue as we are seeing it.
Thanks,
Andy Beharrell