New Question Type: Essay

New Question Type: Essay

by Mark Nielsen -
Number of replies: 50
Hello All,

Got a new question type for all of you moodlers to test out. The new question type is essay and you should be able to download it from contrib/quiz_essay_qtype. Please read the readme provided.

Something of note: I changed the value of the field ‘answer’ in quiz_responses to type text to accommodate lengthy responses to essay questions. Also added a ‘response’ field to quiz_responses to allow teachers to write comments on a student's essay.

Also, in report, Detailed Statistics and Simple Statistics are not fully compatible with the new question type. I didn't want to make many changes to the quiz code. If everyone likes the essay code, the right people can update these features.

To grade an essay question, go into report/Overview. Select a single attempt. Then go to the essay question and make changes then click on Save. The Save is per essay question.

Please post bugs/comments to this thread.

Have Fun!
Mark
Average of ratings: Useful (1)
In reply to Mark Nielsen

Re: New Question Type: Essay

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
This is great news, Mark. big grin Essay/long answer question type has been a long-requested, long-needed feature for the quiz module.

Unfortunately, I do not have a test server so I hope others will download this and give it a thorough workout.

As a note on what I was hoping for in this feature, please comment on whether your new version will...
- allow a temporary score without the essay question factored in
- recalculate the score when the essay question is manually graded by the teacher
- provide a single screen for all essays to be manually graded (similar to journal module).

Presently I do essay questions outside of the quiz activity by adding a journal activity. Thus students must go to two places for their test. The journal tool has a lovely interface which allows both a numerical grade and a comment. I use the comment space extensively by pasting in templates of comments to each student. I keep an MS-Word document window open beside the journal. I keep 4-5 template comments which I modify after pasting one into the comment box. Can I continue doing this interface/method?

The problem with my current system is that there are two separate activities, and two separate grades. I agree that you don't have to worry about integration into the statistical reports yet. Anyway, I am very excited that you are working on this! smile
In reply to Don Hinkelman

Re: New Question Type: Essay

by Michael Penney -
As a note on what I was hoping for in this feature, please comment on whether your new version will...
- allow a temporary score without the essay question factored in
- recalculate the score when the essay question is manually graded by the teacher
- provide a single screen for all essays to be manually graded (similar to journal module).

Hi Don, the answer to the first two questions is yes.

The essays are graded on the quiz review screen for each user. We did it this way to avoid changing the main quiz code as much as possible, so you can install the essay class easily.

If the question type gets worked into the main quiz code, making changes to the quiz core for this feature and others might be possible (though daunting in large classes for tests with a number of different essay questions).

In reply to Michael Penney

Re: New Question Type: Essay

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Thanks, Michael, for your quick reply. I am excited to try this, but I will have to wait for others to really test it. From what I imagine, to do the grading/commenting, a teacher will have to...
- click on the quiz
- click on the link "view xx completed quizzes" to go to the quiz review screen
- select one quiz attempt for a student and click on it.
- mark a small box for each essay question that opens up with a numerical scale and comment area.
- save the score/comment
- return to the quiz review screen (automatically?)
- go to next student and repeat process (I may forget which students I finished, however).
- press button to recalculate all grades

I understand why you choose this procedure (to fit the current programming easily) and I think it will be managable. I hope a single screen for marking will be eventually added to speed up marking and avoid teacher confusion over who was checked and who wasn't. Great job! big grin
In reply to Don Hinkelman

Re: New Question Type: Essay

by Genner Cerna -
Im excited to try this essay quiz... by the way where can I download it, sorry for being so stupid. mixed

Hope Martin, can check this out and include this in quiz module...

Thanks for the essay type... Hoping this will be included as christmas gift...
In reply to Genner Cerna

Re: New Question Type: Essay

by Michael Penney -
Hi Gerner, its in CVS/contrib. Click on CVS to see how to download from there.

We can post a zip but we wanted some folks to try it first, as it's alot more solid to do fixes in contrib than in zipssmile.
In reply to Don Hinkelman

Re: New Question Type: Essay

by Michael Penney -
Hi Don, see attached screenshot. In a quiz with multiple essay questions, you would see however many there are in the quiz report.

Yes you will have to remember which students you graded, etc.

In lesson, it works nicer IMO (you can see links to all essays on one screen, and they change color when you grade them), but implementing that in quiz would require alot of core file changes, which we wanted to avoid.

However, the changes would be easy enough to make if Martin wanted to implement this in the core (we just don't want to make alot of core quiz file changes and have to redo them on every upgrade).
Attachment essay.gif
In reply to Michael Penney

Re: New Question Type: Essay

by N Hansen -
Any chance the html editor could be made available to students and teachers to use for submitting their essays and comments?
In reply to Michael Penney

Re: New Question Type: Essay

by Jonna Carper -

I teach at a university where I am helping test this product out with my Instructional Technology class.  Yesterday, I asked my network administrator to install the essay quiz question module - which he did.  I added essay questions to a quiz I gave.  Everything looked fine, but now I'm trying to grade the quiz and it doesn't appear to be working.  when i view a student "report" in overview mode, I can see the student's response, but I cannot grade it.  There is no option to SAVE under the comments box, there is no option to assign a score to the question and I cannot even type in the comments box.

Has anyone else been able to use this successfully and can tell me if we did something wrong mixed

In reply to Jonna Carper

Re: New Question Type: Essay

by Andrew Miller -
I've got a similar problem....but whenever I go to put in a comment for grade the essay question and click "Save" I get a message "Could not upgrade grade for essay question".

Any thoughts? I'm not quite sure where to look next.

Thanks!
In reply to Jonna Carper

Re: New Question Type: Essay

by Michael Penney -

Hi Jonna, it certainly works fine heresmile.

It sounds like something went wrong in the install. I'd suggest re-installing, making sure to do every step in the ReadMe. Just dropping it into the quiz questions directory won't get it working.

By the way, what server system, database, and Moodle version are you using?

IIRC, the auto install only works with MySQL, so if you are using Postgres, you may have to create the tables manually.

In reply to Michael Penney

Re: New Question Type: Essay

by Timothy Takemoto -

Dear Michael

> We did it this way to avoid changing the main quiz code as much as >possible, so you can install the essay class easily.

So, all we should need to do is plob in an extra folder in the question types section? I guess that the edit screens will need to be changed too. I am really grateful for this too. But I think that I won't be using it till the end of term.

Thank you!

Tim

PS This terms, for my 26 course course, I have create 715 questions, says the backup screen. That is 715 bits of multiple choice torture. I would like to give the students a lot more opportunity for expression. Incipit the essay question.

In reply to Timothy Takemoto

Re: New Question Type: Essay

by Michael Penney -
The install files are included but the do involve some minor changes to core files.

Mark has also included detailed instructions in the readme for adding the code (just a few lines) into the appt. quiz files.

It would be nice if adding new question types was an entirely gui based experience, but that will involve some further refactoring of quiz...
In reply to Michael Penney

Re: New Question Type: Essay

by Ed MacDonald -

Hi.....This new Essay Type question is just what I need for my courses but my lib.php file does not look the same as the instructions describe in the INSTALL README.txt file. Why is this? I'm using the following fresh install of Moodle:  Moodle 1.5 UNSTABLE DEVELOPMENT (2005020101)

I'm still new with Moodle and PHP but I'm getting up to speed. Your assistance is greatly appreciated.

Ed.

In reply to Ed MacDonald

Re: New Question Type: Essay

by Michael Penney -
I thought Henrik was adding essay questions to quiz in 1.5 as a standard question type?

If not, we'll update it sometime after 1.5 is released, meanwhile, use Moodle 1.4.

You might also take a look at lesson in 1.5, it has essay questions as a standard question type.
In reply to Don Hinkelman

Re: New Question Type: Essay

by Teresa Gibbison -
I keep an MS-Word document window open beside the journal. I keep 4-5 template comments which I modify after pasting one into the comment box. Can I continue doing this interface/method?

Hi Don
I testing pasting comments in from MS Word and it worked fine.  I bet you can't wait to test this out - I know I'm having fun!!! big grin

Teresa

In reply to Mark Nielsen

Re: New Question Type: Essay

by Xu Rainbow -

hi.

I have saved the  assay grade I marked ,but it can't be accounted into the total grade of a student' quiz, why?

In reply to Mark Nielsen

Re: New Question Type: Essay

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'd love to include this, but the grading method is currently a bit awkward.

Any chance of someone implementing a new report type especially for grading all the essay questions?

I think it would make most sense for the first page of this report to list all the essay questions alongside stats of grades, how many marked/unmarked etc, and then a link from each of these to a page showing all the answers for Question 1 (much like Journal/Assignment but paged to avoid scaling problems).

The idea would be that a teacher could quickly mark question 1 for everyone, then question 2 etc ... this would be much easier cognitively.
In reply to Martin Dougiamas

Re: New Question Type: Essay

by Michael Penney -
Hi Martin,

The idea would be that a teacher could quickly mark question 1 for everyone, then question 2 etc ... this would be much easier cognitively.

Like we did for lessonsmile.

We'd like to do this too, the current method required minimal changes to the core quiz files, which was our original goal to make it easy to upgrade, but if you'd like to integrate into core, that's great!

I'm off for vacation until the 10th, but I asked Mark to contact you about the best way to go about this.




In reply to Martin Dougiamas

Re: New Question Type: Essay

by Henrik Kaipe -
As we're speaking of this manual grading. Occasionally there are moodlers that ask for manual REgrading for all types of questions so I suggest some kind of generic solution that can possibly be reused for all types of questions.
In reply to Henrik Kaipe

Re: New Question Type: Essay

by Mark Nielsen -
Hi there,

I'm looking into this new method for grading the essay question type.  Also, while I'm writing/thinking about the code, I shall keep in mind the possibility for regrading all types of questions.

I'll post back when I have more.

Mark
In reply to Mark Nielsen

Re: New Question Type: Essay

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Thanks, Mark, for working on this.

I would strongly support Martin's suggestion for grading/marking the essay questions. In short...
  • answers for Essay Question 1 from all students will show up on one screen. After manual grading, the teacher will press "save", and then jump to a new screen with all answers for Essay Question 2. This is how the Journal/Assignment modules work and I find it very easy to grade/mark/comment on many essays in a short period of time.

Also, I assume that in setting up an essay question, a teacher will be able to embed audio files, using the standard HTML editor. Is that correct? This will enable the "essay" question type to also act as a "dictation" question type (with manual grading).

And just as a thought, I am also keen on using a self-grading option for all quiz types. In self-grading, a student answers a question, then the system shows the answer and asks the student if their answer was correct. This forces the student to think more, remember more, and also gives the option for fuzzy marking of nearly-right answers.
In reply to Mark Nielsen

Re: New Question Type: Essay

by Venita Doughty -

Manual regrading would be really cool. It's amazing how often there is a problem with the question or a student computer glitch that require a regrading of a multiple choice question. We would use this feature fairly often.

Venita

In reply to Henrik Kaipe

Re: New Question Type: Essay

by Mark Nielsen -
Well, I hit a wall.

This is what I have thus far:

A new report type, which is "manual re-grade." This link goes to a page listing all of the questions in the quiz. Each question links to a page were all the answers for the particular question are printed. The teacher then can change the answers and then submit it to be saved. Have not written the saving code just yet though.

Here is the problem: all the questions have the same form variable names. So when I submit the form, only 1 answer is submitted. The form names need to differ by user and by attempt. This form code is generated from the questiontypes class file, so would be a pain to alter there. Any ideas?

If we cannot get this to work, then re-grading will have to be done 1 question at a time.

Thanks, Mark
In reply to Mark Nielsen

Re: New Question Type: Essay

by Teresa Gibbison -
Wow!  I'm very exited about these essay-type questions, thanks guys.  I was in the middle of creating multiple graded journals (one for each essay type quiz question!).

I am testing these with a 'self paced learning' course where all students will be at different stages of the course when the tutor grades the questions.  Therefore I agree that some 'flag' to show that a grade has been marked/remarked would be very beneficial.

Thanks again, I've found these great! big grin
Teresa
In reply to Mark Nielsen

Re: New Question Type: Essay

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK, well, we will need to add the attemptid somewhere in there (from that the userid etc can be determined).

This will involve some core changes to print_question() and print_question_formulation_and_controls()  so that we can pass them arbitrary strings to prefix the form field names...
In reply to Martin Dougiamas

Re: New Question Type: Essay

by Ger Tielemans -

Another choice could be to integrate a Rubrics per open question: grading would be much faster AND more fair: grading all the numbers one questions in a row, and then all numbers two...etc.. will be a disadvantage for the last ones in the row..

(Teacher has seen all nice ideas already, so you get a B- instead of A- because you had the bad luck to be the last one in the row..)

In reply to Mark Nielsen

Re: New Question Type: Essay

by Dawn Wright -

Mark, Martin, et al

I just installed your essay question mod on my development site and it looks good. We are moving approximately 80 masters and doctoral courses to our moodle site and will need to have essay question functionality available this spring (April 05). I am not a php programmer, but I will have a number of staff and instructors giving the essay module a workout on the develoment site in January and will post any constructive feedback I get. Thanks for making this available.

dawn wright

In reply to Mark Nielsen

Re: New Question Type: Essay

by Andrew Miller -
Thanks much for the very useful module. Any thoughts on when this (or something with similar functionality) might be included in the core files/modules?

Thanks.
In reply to Andrew Miller

Re: New Question Type: Essay

by Venita Doughty -

Yes, I'm a little confused by the various posts, and don't see this in the Future area. Will Moodle 1.5 have essay questions in the *Quiz* module? Our professors are very anxious to have this feature.

Venita

In reply to Venita Doughty

Re: New Question Type: Essay

by Gustav W Delius -
I believe the situation is that the essay question type currently is still lacking a convenient mechanism for doing the grading. I am sure there will be an essay question type that works with Moodle 1.5 but it will probably take a few weeks before it is ready.
In reply to Gustav W Delius

Re: New Question Type: Essay

by Genner Cerna -
wow! essay is now included...
In reply to Genner Cerna

Re: New Question Type: Essay

by Gustav W Delius -
Genner, there is a bit of a confusion because an essay question type has been added to the lesson module but not to the quiz module. You can find a version of the essay questiontype for the quiz module in cvs:/contrib/quiz_essay_qtype.
In reply to Gustav W Delius

Re: New Question Type: Essay

by Genner Cerna -
i see, hope this will be inclueded in quiz module not only in lesson in our case we use the quiz module not so much which lesson module a little bit easy for teacher to use...
In reply to Mark Nielsen

Re: New Question Type: Essay

by Roman Be -

Hi Mark.

This is a great extension to the Quiz module. I have just a small problem. Under the Administrator and the student it is working fine. However if the teacher tries to mark the questions I get the following error:

Warning: Illegal offset type in c:\program files\easyphp1-7\www\heakademie\lib\moodlelib.php on line 769

I checked the code and it is inside the isteacher function.

Does anybody know this problem, and knows perhaps a solution for it.

Regards
Roman

In reply to Roman Be

Re: New Question Type: Essay

by Edd Potter -

Hi I am having the same problem here...

An administrator logged in can leave feedback on the answer no problem, but when a teacher attempts to leave feedback they recieve an "illegal offset type" error as stated in the thread above.

I'd really appreciate some help on this if anyone has managed to solve this issue.

Thanks

Edd

In reply to Edd Potter

Re: New Question Type: Essay

by Michael Penney -
Hi Edd, what Moodle version and db type are you using?
In reply to Michael Penney

Re: New Question Type: Essay

by Edd Potter -
Hi Michael, thanks for the quick response!

I'm running m00dle version 1.4.2 (2004083125) with a  MYSQL DB.

Edd

In reply to Edd Potter

Re: New Question Type: Essay

by Michael Penney -
Ok we found the bug, load the attached file into your quiz/questiontypes/eassy folder and it should be fixed. I've updated CVS/contrib too.

Thanks for catching that!
In reply to Michael Penney

Re: New Question Type: Essay

by Edd Potter -
Hi Michael

Thanks for sorting that out, just in time for my m00dle demonstration this afternoon... *phew*


Edd


In reply to Michael Penney

Re: New Question Type: Essay

by Heather Jackson -

We're getting the same error message (Warning: Illegal offset type in d:\program files\easyphp1-7\www\lib\moodlelib.php on line 769), but we're not using the essay quiz type.  It's showing up when a forum post is emailed to subscribers.

Two questions:

  1. Does this "fix" work for other modules, or just the quiz?
  2. Does it need to be in an "essays" folder?  (We don't have one)

Any thoughts?

In reply to Heather Jackson

Re: New Question Type: Essay

by Michael Penney -
It was a fix for a bug in the essay question type, so I doubt it would help any with forum.

Have you upgraded to the latest stable Moodle (1.4.4?) that should fix any bugs in forum, though that is not one I've heard of before.

Illgal offset errors in previously working code have been reported due to upgrading to php 4.3.10, though Moodle 1.4 should be fine with php 4.3.10.
In reply to Mark Nielsen

Re: New Question Type: Essay

by MEH FEH -
I'm trying to get this quiz question type installed, but I keep getting the following error whenever I try and add any questions (of any type) to a quiz:

Could not find question type: '3' (where 3 equals whatever question type I'm trying to add - none of them work)

When I fist installed this contrib, I got the follow errors when I logged in with my admin:






(mysql): ALTER TABLE mdl_quiz_responses CHANGE answer answer TEXT NOT NULL 1044: Access denied for user: 'moodle@localhost' to database 'moodle'

ADODB_mysql._Execute( ALTER TABLE mdl_quiz_responses CHANGE answer answer TEXT NOT NU..., false) % line 804, file: adodb.inc.php
ADODB_mysql.Execute( ALTER TABLE mdl_quiz_responses CHANGE answer answer TEXT NOT NU...) % line 24, file: datalib.php
execute_sql( ALTER TABLE mdl_quiz_responses CHANGE answer answer TEXT NOT NU...) % line 279, file: mysql.php
quiz_upgrade(2004073001, Object:stdClass) % line 150, file: adminlib.php
upgrade_activity_modules(http://www.robertwelchuniversity.org/moodle/admin/index.php) % line 231, file: index.php

Error




(mysql): ALTER TABLE mdl_quiz_responses ADD response TEXT NOT NULL AFTER answer 1044: Access denied for user: 'moodle@localhost' to database 'moodle'

ADODB_mysql._Execute( ALTER TABLE mdl_quiz_responses ADD response TEXT NOT NULL AFTER..., false) % line 804, file: adodb.inc.php
ADODB_mysql.Execute( ALTER TABLE mdl_quiz_responses ADD response TEXT NOT NULL AFTER...) % line 24, file: datalib.php
execute_sql( ALTER TABLE mdl_quiz_responses ADD response TEXT NOT NULL AFTER...) % line 280, file: mysql.php
quiz_upgrade(2004073001, Object:stdClass) % line 150, file: adminlib.php
upgrade_activity_modules(http://www.robertwelchuniversity.org/moodle/admin/index.php) % line 231, file: index.php

Error

Any ideas?  I followed the README to a T, I think :-\
In reply to MEH FEH

Re: New Question Type: Essay

by Michael Penney -
Are you just getting this error when installing essay question or do you get an access denied error when trying to install other modules?

At first glance, it would suggest something odd is going on with your database setup where your moodle user doesn't have alter/create privs? It isn't going to work if you get those errors during install, so you are better off reverting to the standard quiz code for your moodle version until you can figure out what is going on with the db.

Do you have access to phpMyAdmin for your site?
In reply to Michael Penney

Re: New Question Type: Essay

by MEH FEH -
I do have access to PMA on this site, yes.  How would I go about fixing this or at least go back to the original version of the quiz module?  I'm not sure what all this did to my install and I'm kinda in the dark sad


Thanks for the help
In reply to MEH FEH

Re: New Question Type: Essay

by Michael Penney -
To fix it, see if the tables have been created (check the sql in the essay question folder to see what table mods and changes need to be made).

One easy thing you could try would be to up the version # of the essay question and try visiting admin again, and if you see errors there still post them back here.

To revert, it should work just to back out of the install process, eg remove the question type essay from your quiz question types folder, and then re-replace the quiz files you installed with the files from your original moodle installation (or the quiz files from a fresh download of your version of Moodle.

In reply to Mark Nielsen

Re: New Question Type: Essay

by Athena Winchester -
I can't find where to download this.
In reply to Athena Winchester

Re: New Question Type: Essay

by Michael Penney -
It's in CVS/contrib, question_type_essay folder. You'll need a CVS client (like tortoiseCVS) to get to it.
In reply to Michael Penney

Re: New Question Type: Essay

by Erich Nielsen -

I really feel stupid, but when I try to integrate the essay into the quiz (which is probably one of the really good quiz-options) I don't get it to work.

I followed the readme.txt, made the sql-adjust, and I get the option of making an essay-question, but when I choose it I get a blank screen.

I have probably missed out something obvious, but what..?

Any suggestions?

Erich N - from a Stockholm in spring smile

BTW I am using 1.4.4. and use a fresh install from march 7th

In reply to Erich Nielsen

Re: New Question Type: Essay

by MEH FEH -
I'm still having problems will mine, too.  I upped the version number, was told in the admin section that "quiz module needs upgrading", but I'm still having the same problem.
In reply to Erich Nielsen

Svar: Re: New Question Type: Essay

by Erich Nielsen -

Found the answer to my problem:

There was a mistake in my download of the essay.html-file. It got renamed to essay.htm, and we all know what such a mistake can lead to...

But now it is fixed and I am happy as can be.

Have a nice evening from a Stockholm where the sun is going down.

Erich N