I have put up draft CBM code for Moodle 2.2.1 (with instructions), at http://www.ucl.ac.uk/lapt/moodle/cbm_mods_221.zip . This makes most of the necessary changes, though it still needs some tidying and lacks a few features present in the CBM code written for Moodle 1.9 and 2.0. Details:
1. The code displays the student's accuracy (% correct) in review, along with the CBM bonus and enhanced accuracy, as described above.
2. When CBM behaviour is chosen, it ignores any weighting factors (max marks) assigned to different questions, treating them all as default (1.0). It uses the same CBM mark scheme (1,2,3 correct and 0,-2,-6 incorrect) for all questions.
3. It corrects an error in the current 2.1/2.2 code whereby a Q that is marked as partially (say 50%) correct when entered with C=2 or C=3 could receive a negative mark -- which would certainly seem unacceptable to a student. The new code gives a mark for partially correct answers that is the assigned corerectness fraction x 1,2 or 3.
4. It corrects behaviour with some forms of incomplete entries for Qs, making sure for example that entering C=2 or C=3 without indicating an answer gets treated as 'unanswered' rather than as a confident error, or misconception.
5. It allows students to see in 'review' their % correct expressed two ways: as a % of the total number of questions in the quiz and as a % of the questions they have chosen to respond to. This is important where students are using quizzes for self-testing, working on their chosen topics that they want to spend time on.
6. In 'Results' summary tables (currently only visible to teachers, I think) the columns show for each attempt the total of CBM marks attained, the number of Qs answered, % correct (relative to the whole quiz) and CBM bonus.
7. The info in (6) above is currently subject to provisos (until someone can help me get the 'attempt object' for each row in the results table, so that I can use the code written for the review page): It requires that the table is set to also show data for individual questions, and it only gives accurate data (i.e. the same as what is shown correctly in 'review') if all responses are marked either wholly correct or incorrect (i.e. no partially correct answers). [The problem is it can't, the way I've had to fudge it, distinguish between something wholly correct at C=2 and 0.67 correct at C=3].
8. There are additional but less critical improvements I would eventually like in the interfaces: Provision of 4 submit buttons ("No Idea", "C=1", "C=2", "C=3") instead of radio buttons + submit, for CBM with immediate feedback: This is psychologically important for self-testing since submission and committing to a certainty level become one and the same act, followed immediately by feedback when the reasons for choosing and judging certainty are fresh in the student mind. The "No idea" option is important where self-test students are selecting the Qs that they are interested in and want feedback about, without forcing them to make an arbitrary nonsensical answer choice. Also, for similar reasons, I would like the review only to show Qs that have been responded to - so the student can come back later to other Qs without having been exposed to the answers from an earlier attempt (These features were implemented in the CBM code for 1.9, 2.0).
9. It would be good to add within the review / results pages info about how much better (or worse) the student has done compared with chance guesses. This would be good with or without CBM, but is something I implemented in the 1.9/2.0 CBM code (referred to as % Knowledge, as distinct from Accuracy or % Correct).
10. I've added a link (where the student is asked for their Certainty) to an explanation of CBM. Such a link seems necessary. It is currently to my own page ( http://www.ucl.ac.uk/lapt/moodle/cbmexpl.htm ) rather than something within Moodle.
11. I'm sure (C>>3) the code is safe to try out in a way that is completely reversible if you copy back the set of mdl221.orig files. It doesn't alter any database structures or entries. But it may of course contain bugs, and would benefit from suggestions, style checking and improvements indicated above.