226 Commits

Author SHA1 Message Date
Tim Hunt
ed98894326 MDL-49666 qbehaviour_informationitem: respect $options->readonly 2015-03-31 15:22:16 +01:00
Tim Hunt
5e63b335fe MDL-40992 quiz: option to let students redo questions within an attempt
This feature is designed for use on pracice or formative quizzes.
It is available for quizzes that use Interactive or Immediate feedback
behaviour.

If the teacher turns this on in the quiz settings, then once a student
has finished a question, they get a 'Redo question' button beside the
question. If they click it, then the question they finished is replaced
by a new one so they can try again to practise that particul skill or
bit of knowledge a bit more.

When randomisation is involved, the studnets will be given a question or
variant that they have not seen before if possible.
2015-03-31 14:12:48 +01:00
Tim Hunt
47be39ef41 MDL-40992 qbehaviour: new type method, can Qs can finish naturally 2015-03-26 17:46:48 +00:00
M Kassaei
1700bd4dea MDL-40992 quiz: let students to redo questions within an attempt 2015-03-26 17:46:47 +00:00
Tim Hunt
fd7a8af50b MDL-40990 qbehaviours: method to say if attempts can finish naturally 2015-03-13 14:23:02 +00:00
Tim Hunt
097efe9de3 MDL-49315 questions: unit tests for each behaviour type class 2015-03-05 12:19:23 +00:00
Tim Hunt
86969816c6 MDL-49041 qtype_multianswer: don't reveal marks on partial responses
This commit also fixes MDL-32049 about the lack or valdiation message
when an incomplete respnses is submitted.

AMOS BEGIN
 CPY [pleaseananswerallparts,qtype_match],[pleaseananswerallparts,qtype_multianswer]
AMOS END
2015-02-05 20:01:13 +00:00
Eloy Lafuente (stronk7)
147bae8f7c MDL-48144 upgrade: add v2.8.0 sep lines 2014-11-10 18:08:15 +01:00
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Tim Hunt
0b62cc2ea5 MDL-46810 question CBM behaviours: improve the display of marks.
Thanks to Tony Gardner-Medwin for the suggestion.
2014-09-07 13:30:57 +01:00
Damyon Wiese
d32bc7d655 MDL-18014 Atto autosave: Atto requires $PAGE->url be set or debugging is triggered
2 quiz tests are creating forms with text editors manually - they need to ensure a valid
$PAGE->url is set so they don't trigger debugging warnings from $PAGE->url magic method
called by Atto.
2014-08-19 16:02:14 +08:00
Eloy Lafuente (stronk7)
f94891cc00 MDL-45503 upgrade: add v2.7.0 sep lines 2014-05-28 01:13:42 +02:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
James Pratt
96a0b9aaaa MDL-45373 quiz response analysis : count all tries at question
don't filter repeated tries.
2014-05-06 12:26:02 +07:00
James Pratt
038014c415 MDL-41760 quiz_statistics : response analysis for first/last/all tries 2014-03-18 18:47:19 +07:00
James Pratt
99caa248a8 MDL-43478 quiz responses report : display last / first / all tries
when using multiple try question behaviour
2014-02-23 13:39:08 +07:00
Tim Hunt
1eb470fc42 MDL-43929 question manual grading: keep comment when validation fails.
If the validation failed, so the manual grading page was re-displayed
with a validation error, then any comment that had just been typed in
was getting lost. This fixes that.
2014-02-07 21:55:05 +00:00
Tim Hunt
e101ec9fd7 MDL-43874 quiz, teacher comments should respect display options.
Whether the comments on manually graded questions were visible to
students should have been controlled by the 'Specific feedback' Review
option in the quiz settings. However, the quiz was not setting
$displayoptions->manualcomment, so it did not work.
2014-01-27 12:01:32 +00:00
Damyon Wiese
47578dbff4 MDL-42930 Add 2.6.0 upgrade line 2013-11-18 11:47:17 +08:00
Tim Hunt
a568785223 MDL-42743 improve wording of the CBM summary on quiz review 2013-11-07 10:30:06 +00:00
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Damyon Wiese
6e4dcb9a47 MDL-40493 Question: Explain why setAdminUser is needed for tests 2013-10-09 16:53:21 +08:00
Petr Škoda
c969753885 MDL-40493 question: set real $USER before testing question walktrough 2013-10-09 11:02:35 +13:00
Tim Hunt
8b9ef25ea2 MDL-32188 question CBM: use short certainty name in response summaries. 2013-10-04 21:46:47 +01:00
Tim Hunt
2bf83cb218 MDL-32188 question CBM: minimal handling of certainty -1
Certainty -1 has never been used in standard Moodle, but is
used in Tony-Gardiner Medwin's patches to mean 'No idea' which
we intend to implement: MDL-42077. In the mean time, these changes
avoid errors for people who have used TGM's patches.
2013-10-04 21:46:46 +01:00
Tim Hunt
e74aa0aa97 MDL-32188 question CBM: compute summary stats for CBM behaviours
We now compute the average CBM score, accuracy, CBM bonus and enhanced
accuracy, both for the entire quiz, and for just the questions answered.

Note that these calculations must work correctly in the presence of
descriptions, ungraded questions, and manually graded questions. For
example, imagine a essay added at the end of the quiz "Summarise what
you learned attempting this exercise." This might have max mark zero or
non-zero. The CBM statistics just ignores questions like that.
2013-10-04 17:56:36 +01:00
Tim Hunt
9b2fe16bca MDL-32188 question CBM: improve display of the certainty choices
Switch to the neutral C=1, 2, 3 mode. Also add a helpicon, and improve
line-wrapping.
2013-10-04 17:52:31 +01:00
Tim Hunt
fb74929e97 MDL-32188 question CBM: alter score handling.
We now change so that minfraction is -6 and maxfraction is 3, so getting
the question right a low certainty gives maxmark marks, and you get a
bonus for being more confident (rather than being penalised for being
unconfident). Mathematically it is the same, but the difference is
importnat psychologically.

We also change how partially correct scores are handled.
It is too harsh to penalise a partially correct score with full
certainty by doing a linear interpolation between -6 and +3. Instead,
any partially correct score (e.g. 0.5) becomes that fraction of the
correct score (e.g. 0.5 * 3 = 1.5). Also, any incorrect score is treated
as 0, so if you have a multiple choice question that normally gives a
negative score for a wrong choice, this will now never give a score of
less than -6.

Finally we change how this is displayed to students beside the question.
Rather than saying "Marked out of 1.00", we say "Base mark 1.00", and
then later we say "CBM mark 3.00" (or whatever it is).
2013-10-04 17:52:29 +01:00
Tim Hunt
7ab9ce3a3c MDL-32188 question CBM: fix hard-coded numbers -> constants. 2013-10-04 17:52:26 +01:00
Tim Hunt
c4efeb2b4b MDL-32188 question CBM: fix typos in comments.
Also one method name.
2013-10-04 17:52:24 +01:00
Tim Hunt
02d3e4d557 MDL-32188 question rendering: let behaviours control mark display.
Then use this in the CBM behaviours to change how the question marks are
displayed there.
2013-10-04 17:52:21 +01:00
Tim Hunt
4e3d829350 MDL-42105 questions: let attempts have a max fraction > 1.
This parallels question_attempt->minfraction, which allows the
fractional mark to go below zere.

This is needed to allow the certainty-base marking behaviours to work
better.
2013-10-04 17:52:19 +01:00
Tim Hunt
474aa125ca MDL-32188 quiz/question: behaviours can add to the review summary.
At the top of the quiz reivew page, there is a table that summarises
infomration about the quiz attempt as a whole. For some question
behaviours, we would like to be able to add additional information to
that summary.

This commit introduces a generic method for the behaviour to provide
summary information about an entire question usage.
2013-10-04 17:52:16 +01:00
Tim Hunt
f3460297a9 MDL-32188 question engine: behaviour static methods -> new classes
It was always a bit of a hack to use static methods on the
qbehaviour_whatever classes to return metadata about the behaviour. It
is better design to have real qbehaviour_whatever_type classes to report
that metadata, particularly now that we are planning to add more such.

For example, inheritance works better with real classes. See, for
example, the improvements in
question_engine::get_behaviour_unused_display_options().

This change has been implemented in a backwards-compatbile way. Old
behaviours will continue to work. There will just be some developer debug
output to prompt people to upgrade their code properly.
2013-10-04 12:15:01 +01:00
Jamie Pratt
d50b05e696 MDL-41751 changes to api of question_response_analyser
and code refactoring and clean up.
2013-09-27 17:38:13 +07:00
Tim Hunt
7a55fd3888 MDL-41366 qbehaviour_informationitem fix name capitalisation. 2013-08-21 12:28:20 +01:00
Tim Hunt
afb1b3d03b MDL-39980 question engine: Attempt on last loses response files
When doing Each attempt builds on last, we need to copy any response
files into a draft file area, and then re-save them.

While writing the unit test for this, I had to deal with a todo in the
question engine so that questions with files in the response could be
unit-tested.

I also found an fixed a bug with qtype_essay_question::is_same_response
and fixed some notices in the existing essay/manual graded unit tests.
2013-08-15 12:55:13 +01:00
Dan Poltawski
ed07242713 MDL-39507 qtype_essay: hacky fix for unit tests
This is just to get the tests passing for integration purposes. Tim
may want to do a robust fix and revert this.
2013-08-13 10:47:19 +08:00
Ruslan Kabalin
f8e28244cb MDL-31226: quiz: Fix message for attempts built on previous.
At the moment, when attempt is built on the last one, "not yet answered"
message is shown, which confuses many people. This patch modifies the state to
"complete" for attempt based on previous and modifies the output string.

Many thanks to Tim Hunt for guiding me through quiz infrastructure and some code
suggestions.
2013-08-02 16:19:18 +01:00
Sam Hemelryk
ee4e6c04e2 Merge branch 'MDL-30320' of git://github.com/timhunt/moodle 2013-06-12 09:38:38 +12:00
Eloy Lafuente (stronk7)
c9e54743ec MDL-39753 Add 2.5.0 upgrade line 2013-05-20 15:33:19 +02:00
Tim Hunt
06616f4b70 MDL-30320 question engine: remove API deprectaed in Moodle 2.2. 2013-05-19 23:38:19 +01:00
Eloy Lafuente (stronk7)
05bf4b17e8 Merge branch 'MDL-29758' of git://github.com/jmvedrine/moodle 2013-05-10 02:53:49 +02:00
Jean-Michel Vedrine
d56ab3b992 MDL-29758 make Cloze question feedback display more informative
as it was in Moodle 1.9
2013-05-09 07:55:43 +02:00
Damyon Wiese
a04e97ef0c MDL-39412 Prevent developer warnings on upgrade from 24 to master 2013-05-09 11:26:25 +08:00
Tim Hunt
cbdb09a9ef MDL-39412 disabling manual graded behaviour refinements
1. Change behaviour admin settings so you can only select enabled
behaviours.
2. During the upgrade, change admin settings that might be currently set
to manual graded, so that instead they are set to deferredfeedback (if
that is available. If not, we just take the first alphabetically.)
2013-05-09 11:24:43 +08:00
Tim Hunt
103928da0b MDL-39412 question behaviours: hide manual graded option
The ability to set all your quiz questions to require manual grading is
an interesting possibility, but practically almost useless.

If you set that accidentally, then you are badly stuck. There is no way
to fix it after the students have answered the quiz.

Therefore, we should set the config option to hide that option from the
UI. We do this for all Moodle sites as part of the upgrade, not just for
new installs.

If any admin wants to re-enable this, they can later.
2013-05-02 17:02:46 +01:00
Eloy Lafuente (stronk7)
cedb0aab5a MDL-39434 Bump all versions near 2.5 release 2013-05-01 18:03:29 +02:00
Jean-Michel Vedrine
dc5133edca MDL-37784 Adaptive no penalty display wrong penalty info
Adaptive Mode tells students they have been penalized even when set to no penalties
2013-04-23 08:30:42 +02:00
Tim Hunt
0a606a2be2 MDL-38538 question auto-save back end.
1. Autosave works in some ways just like a normal save. We ultimately
call $behaviour->process_save() to do the work, and create a new step to
hold the data.

2. However, we come in through a completely different route through the
API, starting with separate auto-save methods. This keeps the auto-save
changes mostly separate, and so reduced the chance of breaking existing
working code.

3. When the time comes to store the auto-save step in the database, we
save it using a negative sequence number.

This is a clever trick that not only distinguises these steps, but also
avoids unique key errors when an auto-save and a real action happen
simultaneously. (There are unit tests for these tricky edge cases.)

4. When we load the data back from the database, most of the time the
auto-save steps are loaded back as if they were a real save, and so the
auto-saved data is used when the question is then rendered.

5. However, before we process another action, we remove the auto-saved
step, so it does not appear in the final history.
2013-03-28 16:51:59 +00:00