Ordering question (qtype_order) type for Moodle 2.6/2.7?

Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Samuel Witzig -
Number of replies: 16

Hi,

does anyone know whether someone plans to upgrade the ordering question type (qtype_order) for Moodle 2.6/2.7? When I check https://github.com/andreev-artem/moodle_question_type_order/tree/MDL_24, there is no branch for Moodle 2.5/2.6. I would be especially interested to know regarding Moodle 2.7, as this will be a LTS release (2014#Long_term_support_.28Martin_Dougiamas.29).

Average of ratings: Useful (1)
In reply to Samuel Witzig

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jürg Hoerner -

I am interestet in an upgrade as well.

In reply to Jürg Hoerner

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Samuel Witzig -

We are currently testing Moodle 2.7 on a testserver (with a copy of the productive data). So far, the ordering question type appears to be working (creating new ordering questions, doing quizzes as a student). I have also set the debugging level on "developer", and no debug messages appear. Do other people make the same experience?

In reply to Samuel Witzig

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Amy Pont -

With the testing of this, we have it functioning in our Moodle 2.6 at the moment. However, we are having the issue that when a teacher imports from one course to another, the answer order reverses.

EG, you have the correct order of A B C D....in the newly imported course, the order changes to D C B A. So if someone answers correctly, they get it wrong.

Easy enough for the teachers to fix, but painful nonetheless.

Can this please be tested in 2.7? We are upgrading to 2.7 in December so it would be nice to see if it is working.

Thank you smile

In reply to Amy Pont

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Samuel Witzig -

I tested two scenarios on our Moodle 2.7 testserver:

1) create a new ordering question in Moodle 2.7 in a quiz. Right order is A to F --> Import that quiz into another course. --> the order in the imported question is right (A to F)

2) Import a quiz with an orderung question which was created on Moodle 2.2 or 2.4 before the upgrade . In this case, I can observe that the order changes to something A, D, C, B...

I suspect therefore that only upgraded ordering questions do have a problem. Could you test that on your Moodle 2.6 Amy to confirm?

Thanks

In reply to Samuel Witzig

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jean-Michel Védrine -

Hello,
Just a note that Jayesh Anandani is currently working on a new drag and drop ordering question type during 2014 Google Summer Of Code
see https://moodle.org/mod/forum/discuss.php?d=259503 and
http://docs.moodle.org/dev/Ordering_Question_Type
After looking at the existing qtype_order question type Jayesh, Tim and I decided it will be better to start from scratch rather than upgrading qtype_order.
Reasons for this
- qtype_order was build upon the match question type and contains a lot of code borrowed from qtype_match and not really needed. the database structure is also unnecessarily complicated.
- the javascript from qype_order is outdated and must be redone from scratch.

- qtype_order is not actively maintained and we think it would be more work to bring it up to date than to start a new question type. In fact I was even believing qtype_order would not work with Moodle 2.7 because it uses YUI2in3 and this now deprecated in Moodle.

We also plan to do an utility similar to what Jamy Pratt has done to convert imagetarget questions to ddmarker ones that will convert all order questions to ddorder questions. But note that this utility may or may not be ready at the end of the Google Summer Of Code.

Average of ratings: Useful (2)
In reply to Amy Pont

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jean-Michel Védrine -

Hello,

Looking at the code, I can confirm there is a problem in backup/restore.

Unfortunately part of the problem is in the backup code (subquestions are not always written in the right order) so existing backups can't be fixed easily.

But I can publish a corrected version that, I think, will fix the problem for backups created with this fixed version.

In reply to Jean-Michel Védrine

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Samuel Witzig -

> But I can publish a corrected version that, I think, will fix the problem for backups created with this fixed Version.

This would be useful as a transitional solution. We'll gladly test the changes. However, the proposed solution above (writing a converting utility for the new question type) is a better solution for sure.

In reply to Samuel Witzig

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jean-Michel Védrine -

I think that I fixed all the bugs that I could found in the backup/restore code.

The result is in the MDL_27 branch of my github account.

https://github.com/jmvedrine/moodle_question_type_order/tree/MDL_27

It would be good to test the changes before using it on a production server, to see:

  • if I fixed the bug
  • if I didn't introduced new bugs smile

Average of ratings: Useful (2)
In reply to Jean-Michel Védrine

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by William Beazley -

This looks like a great question type.  I teach a lot of step by step procedures and need to give partial credit. In practice, some step orders are somewhat arbitrary, dependent on the information available, or almost simultaneous. 

Not clear yet on the grading algorithm but will study it more.

In reply to William Beazley

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@William, could you please give us a couple of concrete examples of your "steps"?

Joseph

In reply to William Beazley

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jean-Michel Védrine -

Yes that was one of my complaints about that question type: as it was done re-using most of the code from the matching question, grading is in fact just the same.

So if the right order is one two three four and the student's response is two three four one he will get a 0 grade (no item at the right place), but if the student's response is  four two one three he will get a 25% grade (two is at the right place). Not sure all teachers will consider the second answer as better than the first.

There was an interesting discussion on how to grade ordering questions here: https://moodle.org/mod/forum/discuss.php?d=259503.


In reply to Jean-Michel Védrine

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Jean-Michel,

There is no one better word sequence as regards grading. It really depends on the type of items being ordered  Let me take 2 examples only.

Example 1. Order those US presidents in chronological order of presidency: , Bill Clinton, Barack Obama, George Washington, George H. W. Bush, Theodore Roosevelt, John F. Kennedy.

correct order: George Washington, Theodore Roosevelt, John F. Kennedy, George H. W. Bush, Bill Clinton, Barack Obama.

student answer: Theodore Roosevelt, George Washington, John F. Kennedy, Bill Clinton, George H. W. Bush, Barack Obama.

Correctly placed items (regardless of "neighbouring items" : 2 -> score: 2/6

Example 2. Re-order this jumbled sentence: cooks many too the broth spoil

Correct answer: too many cooks spoil the broth

student answer 1: too many broth spoil the cooks

number of correct sequences of words (italicized above): 2  + initial word correctly placed: total score = 3/6

student answer 2: too many cooks broth the spoil

number of correct sequences of words (italicized above): 2  + initial word correctly placed: total score = 3/6

student answer 3: too many cooks spoil broth the

number of correct sequences of words (italicized above): 4  + initial word correctly placed: total score = 5/6

In example 1 we give points to items in their correct "place". In example 2 we are concerned with context, sequence of words, so we give points to correct sequences of 2 words, regardless of their correct "place" in the sentence. Obviously this consideration makes the programming of an acceptable scoring system quite difficult.sad

Joseph

In reply to Joseph Rézeau

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by William Beazley -

I would guess that an easy grading algorithm is the sum of the precedents divided by a perfect score.  For example, here is an order:

A, B, C, D, E

and a perfect sum of the precedents score is:

0+1+2+3+4 = 10

Her is an imperfect order:

D, E, A, B, C

and a sum of the precedents score:

0+1+0+1+2 = 4 

and the grade is 4/10 = 40%

It's easy to program, too.

Bill

In reply to William Beazley

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Jean-Michel Védrine -

Thanks Joseph and William for your posts about order question grading.

As I said I don't plan to do modifications other than bug fixes to qtype_order because we are working on a new ordering question type, so maybe it would be better to post these suggestions in the thread related to this new question type: https://moodle.org/mod/forum/discuss.php?d=259503


In reply to Jean-Michel Védrine

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by Samuel Witzig -

Hi Jean-Michel

Thanks for fixing the bugs. We installed your 2.7 branch ordering-question on our Moodle 2.7 testserver (which has a copy of all our productive data). Everything worked well (debugging options turned on, no errors displayed), the answers of copied questions are now displayed in the correct order (I repeated the test-scenario I mentioned above). I also found no new bugs (yet).

Best,

Samuel

P.S: I tested on the official Moodle 2.7.1 released July 14th (no later weekly built used).


In reply to Jean-Michel Védrine

Re: Ordering question (qtype_order) type for Moodle 2.6/2.7?

by David Aylmer -

I can confirm your fork fixes the problems we've been having with restore.

I'll post a partial error / stack trace for the benefit of anyone searching for the specific error

Debug info: Incorrect syntax near the keyword 'CONVERT'.
SELECT TOP 1 id FROM mdl_question_order_sub WHERE question = ? AND CONVERT(varchar(32), questiontext) = CONVERT(varchar(32), ?) CONVERT(varchar(32), AND answertext) = CONVERT(varchar(32), ?)

Relevant stack trace:

• line 123 of \question\type\order\backup\moodle2\restore_qtype_order_plugin.class.php: call to moodle_database->get_record_select()
• line 137 of \backup\util\plan\restore_structure_step.class.php: call to restore_qtype_order_plugin->process_order()

Average of ratings: Useful (1)