Query database for similar answers in lesson essay questions

Query database for similar answers in lesson essay questions

על ידי Karen Nicholas בתאריך
מספר תגובות: 3

Hi all.  This is a long shot but I have students who have submitted duplicate answers to essay questions and the only way I can pick them up is manually.  Any ideas on querying the database to detect similar responses would be welcomed!  I have tried exporting to excel and using the fuzzy logic addin but it just hangs - I think because of the number of fields or perhaps because it is not the right solution for the problem.

Any ideas?

Thanks

Karen

ממוצע דרוגים: -
בתגובה ל: Karen Nicholas

Re: Query database for similar answers in lesson essay questions

על ידי AL Rachels בתאריך
תמונה של Core developers תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers

Hi Karen,

For a quick check, if you have access to the database via adminer or phpMyAdmin, go look at the mdl_question_attempt_step_data. Click on the field labeled, 'value' so the answers are all sorted. Scroll through the table, 'duplicates' will be bunched together. This is actually kind of limited as you will only be able to see a few words at the start of each essay answer, and if there are a LOT of quizzes, the table will be rather large.

A better way if you have the Ad-hoc Database Queries plugin stealled, would be to set up an ad-hoc query for that table and others, so you can have it also automatically tell you the name of the students for each entry. Plus, once you make the ad-hoc query, it is always just a couple of clicks away, any time you want to run it. As part of the query for the database, sort the essay answers ascending or descending and it will then put 'duplicates' together making them fairly easy to spot. You can also set up the query to scan for a particular quiz to cut down on the amount of results.

בתגובה ל: AL Rachels

Re: Query database for similar answers in lesson essay questions

על ידי Karen Nicholas בתאריך
Thanks.  If I could sort the data I could do it.  Part of the problem is that I have over 1000 records to query in the Moodle_lesson_attempts table in the sql database.  They start with strings such as O:8:"stdClass":8:{s:4:"sent";i:0;s:6:"graded";i:1;s:5:"score";s:1:"1";s:6:"answer";s:150:" that need to be stripped before you even get to the answer part of the field, which is further filled with html.  It isn't clean. Plus I am also not looking for exact matches.  One might answer "the apple is red" others will answer "1. The apple is red". So I am looking for something that compares all fields against the others based on strength of similarity.  I wish it was as easy as a simple sort and find duplicates excel query though.
Karen
בתגובה ל: Karen Nicholas

Re: Query database for similar answers in lesson essay questions

על ידי AL Rachels בתאריך
תמונה של Core developers תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers

Hi Karen,

Sorry, I just don't have any lesson/essay data similar to that to try and play around with. Sorting via adminer or phpMyAdmin is actually very simple...just click on a field name and you're done. The number of records shouldn't be a problem as I have done sorts like this with thousands of records. The problem then is that the display of individual "text" fields tends to be truncated to a limited number of characters so if you have a bunch of "extra" data before the actual text, you would not be able to easily see what you need to.

Using the Ad-hoc Database Queries plugin, if you already have it or can install it, is a little more difficult to use, but is probably the easiest way to get usable data. It also makes it possible to do some filtering so that you might be able to get rid of all the "extra" stuff.