Talk:Comparison of GIFT and Wikiversity Microformats
Latest comment: 14 years ago by Mbrad in topic True/False feedback
What still needs to be done on this document
edit- There is some inconsistency of conventions when writing examples of content. Ideally I will identify all variable descriptors (ie. margin_of_error) using underscores so that reading the difference between a description of a variable and the placement of variables in microformat code is more easily accomplished.
- I am not 100% confident that I have explained all of the microformat code, nor all of the idiosyncrasies of that code.
- Citations would be good. With GIFT in particular, some documentation was available in some places and not others. This comparison had to be compiled using multiple sources from Moodle's website. It would be helpful to eliminate that extra navigational difficulty.
- With a document like this I would want to have a clearly visible time stamp on the front page that indicates the last update. Over time GIFT and Wikiversity will undoubtedly change. Of course this time stamp is available on the history page, but for the purposes of errors I would like to have a time stamp as a preventative measure.
Multiple answer checkbox-choice
editI think something like
Question { ~%-50%Incorrect answer. ~%50%Correct answer. ~%50%Correct answer. ~%-50%Incorrect answer. }
may be older GIFT, because elsewhere in Moodle's original GIFT documentation, this form is used:
Question { ~Incorrect answer. =Correct answer. =Correct answer. ~Incorrect answer. }
99.38.151.90 03:55, 8 March 2010 (UTC)
The former version is an option that is probably more useful if the editor is going to assign partial credit in a particular way. I think the latter is the standard default method. A code demo should show both probably. Mbrad 16:04, 8 March 2010 (UTC)
True/False feedback
editI don't understand this part:
Question {TRUE/FALSE/T/F} CORRECT RESPONSE (TRUE/FALSE) #Corrective feedback #Encouraging Feedback
I thought that would be something like:
Question { =T # encouraging feedback ~F # corrective feedback }
But it would certainly be best to refer to Moodle's GIFT parser; let me see if I can find a link to the source involved. 99.38.151.90 03:59, 8 March 2010 (UTC)
- It's at http://cvs.moodle.org/moodle/question/format/gift/format.php?view=markup as far as I can tell. 99.38.151.90 05:41, 8 March 2010 (UTC)
- That looks like an error on my part. Thanks! I was generalizing this one from the GIFT reference sheet but somehow misplaced the brackets and over documented:
Grant is buried in Grant's tomb. { FALSE #Wrong, No one is buried in Grant's tomb. #Right, well done. }
- Thanks for pointing it out! Perhaps I should refer to the source code because this is an odd example. It doesn't seem to work logically at first glance. If you select "FALSE" then that should be the correct answer. If "FALSE" is feedback it should be behind the number sign. Its not an ideal example and I should probably check the source to decipher it.Mbrad 16:04, 8 March 2010 (UTC)
- Okay I checked it out. The all-caps "FALSE" on the example above is placed within the $answer variable which was passed by reference (see below). That is the indicator that no one is buried in Grant's tomb. That means that "FALSE" is used in the example above to indicate the correct answer.
function commentparser(&$answer) { if (strpos($answer,"#") > 0){ $hashpos = strpos($answer,"#"); $comment = substr($answer, $hashpos+1); $comment = trim($this->escapedchar_post($comment)); $answer = substr($answer, 0, $hashpos); } else { $comment = " "; } return $comment; }
- The decision of which feedback to provide is then given in this case/switch within the function readQuestions. It doesn't have to check whether there is something other than "FALSE" or "F" in that position because it has already done then when it was searching for the question type:
case TRUEFALSE: $answer = $answertext; $comment = $this->commentparser($answer); // commentparser also removes comment from $answer $feedback = $this->split_truefalse_comment($comment); if ($answer == "T" OR $answer == "TRUE") { $question->answer = 1; $question->feedbacktrue = $feedback['right']; $question->feedbackfalse = $feedback['wrong']; } else { $question->answer = 0; $question->feedbackfalse = $feedback['right']; $question->feedbacktrue = $feedback['wrong']; } $question->penalty = 1; $question->correctanswer = $question->answer; return $question; break;
- That would seem to indicate that the feedback provided in the example is incorrect. "FALSE" would be the correct answer and should be rewarded with the line "Right, well done." However take a look at the special comment parser for true false questions:
function split_truefalse_comment($comment){ // splits up comment around # marks // returns an array of true/false feedback $bits = explode('#',$comment); $feedback = array('wrong' => $bits[0]); if (count($bits) >= 2) { $feedback['right'] = $bits[1]; } else { $feedback['right'] = ''; } return $feedback; }
- This function has been passed a line of text that looks like this, "#Wrong, No one is buried in Grant's tomb.#Right, well done." It uses the # as a delimiter and places the first segment (the first comment) in the first position in an array, labeling it with the index 'wrong', and the second segment in the second position and indexing it as 'right'. That means that there is a specific convention of writing the corrective comment first, then the congratulatory comment second. This is confirmed in the documentation on this question type in the pdf linked above. It also suggests that the answer "FALSE" could have been placed in front of the second comment portion for better human readability, but it simply wasn't in this case. Instead the example was probably designed to be read like a ternary operation like this:
Grant is buried in Grant's tomb. {FALSE #Wrong, No one is buried in Grant's tomb.#Right, well done.}
- But it also reversed since the ternary operator convention is
condition? if true: if false
- and FALSE here indicated the correct answer, so FALSE would be true if the the person answered false to the question. Knowing all this now, I will write a better True/False GIFT microformat template. Incidentally, if you didn't know already, there isn't anyone "buried" in Grant's tomb. Link Mbrad 17:40, 8 March 2010 (UTC)