151 Commits

Author SHA1 Message Date
moodler
0a660b03e0 Fixed a NASTY little bug that sometimes occurred when
re-grading quizzes with random questions in them.

(everyone got set to zero)
2003-09-22 16:03:30 +00:00
moodler
081bf74fb1 All grades are hidden now when zero grade is chosen ... even the marks.
This mode is only really useful when feedback is turned on.
2003-09-10 08:22:16 +00:00
moodler
ed1daaa9d7 Quiz grades can be set to zero.
If so, then grades are not shown to students, nor is a column added to
the gradebook (although they are still stored and calculated internally)
2003-09-10 05:02:39 +00:00
stronk7
eb452548f5 Included quiz_get_participants() function. 2003-09-07 21:56:46 +00:00
moodler
25b6ff9d3b Default quiz category must have a stamp 2003-08-28 17:07:24 +00:00
moodler
5ca03851ae Bug fix: On building attempts after the first one, display question images 2003-08-18 07:45:03 +00:00
kaipe
1754624916 Fixed bug that was pointed out by Tom Cat:
The reuse of old quiz_answers records for question type multianswer/embedded did not work properly.
2003-08-10 12:09:49 +00:00
kaipe
586b2c82ed New quiz option - "Each attempt builds on the last"
This makes it possible for students to take a tedious quiz, save it half-way and have it graded. The student can then, at a later point, get back to the quiz and have the previous answers already filled in and graded. The student can then continue with the remaining questions as well as redo all the answers that got wrong at the previous attempt.
It seems to work fine with one little twisted exception:
Say that the student attempts the quiz first and that the teacher thereafter edits the quiz and removes or adds a few questions. This will work out fine for as long as the teacher do not get the idea of adding a question with question type RANDOM. The quiz will be fully functional again after removing that RANDOM question or resetting the option 'Each attempt builds on the last" to NO.
Not a very serious problem but it takes someone with greater insight in question type RANDOM to resolve it.

As always, I can not commit lang/en/quiz.php.
---
As I was using the function quiz_get_attempt_responses I had it refactored removing the obsolete argument $quiz. I also changed the call from review.php
2003-08-03 23:00:45 +00:00
kaipe
5a24a01868 Resolving bug #576.
This solution shows the message "Recently added question!" and the question text for each question that has been added since the reviewed attempt.
The advantage with the chosen solution is that it will work fine for the (soon to come) "Each attempt builds on the last" quiz option.

As I don't have the karma needed for updating in lang/en/, the message does not yet look quite as I described it above.
2003-08-03 21:39:32 +00:00
kaipe
bdb63d64f2 Debugged question types NUMERICAL and MULTIANSWER (known as embedded answers) as these did not do things right whenever a student had not given any response (was treated as zero etc).
For numerical there was also a need to allow typical shortanswer responses whenever there could be answers like n/a, inf, -inf, nan etc.
Further more about numerical, there can be more than one answer alternative defined (just like for shortanswer). This is not supported by numerical.html but everywhere else. MULTIANSWER included, it is up to any taker to update numerical.html. This is more than likely to lead to overlappings between numerical ranges if more than one is defined. Think of the case where the highest grade answer ranges between 0 and 2 and the half grade answer ranges between 2 and 4. How should we grade 2? We should pick the highest grade!
2003-08-03 20:02:43 +00:00
kaipe
8b439f8c16 New question type - multianswer 2003-08-01 08:37:11 +00:00
kaipe
44fc346f45 Refactoring only, no new features -
Modified methods are quiz_get_answers and quiz_grade_attempt_results.
For quiz_grade_attempt_results, the switch statement has been separated out into method quiz_grade_attempt_question_result.
2003-07-29 09:11:06 +00:00
moodler
40b1a22162 Further changes to tidy up reports 2003-07-24 16:48:10 +00:00
moodler
29d5d0b40c New modular plugin structure for quiz reports.
The code for reviewing an existing attempt is now separate
in review.php and now has a log entry of it's own.

The overview and regrade reports are now in separate subdirectories
under the "report" directory.  Each has a primary "report.php" file
which implements the report as a class.

These existing reports are very simple, but now more complex ones
can easily be written.  (I am about to do one).
2003-07-24 05:18:00 +00:00
stronk7
3960a44b62 Reviewing an attempt now works fine with NUMERICAL and SHORTANSWERS
containing the "," character. Bug #561 closed.
2003-07-21 17:25:59 +00:00
moodler
263cff8b75 Print images correctly on questions included from categories in
other courses.
2003-07-12 16:24:29 +00:00
moodler
9c02661096 Added a question field to numerical table for completeness 2003-07-10 14:09:43 +00:00
moodler
361f649d7a New question type: Numerical questions.
Mostly coded by Henrik Kaipe - I changed a few things on the way in.
2003-07-10 13:25:07 +00:00
moodler
bca64a122b Don't allow grades to ever be set for description questions 2003-07-06 04:19:11 +00:00
moodler
575de48fc3 Description questions should not be selected randomly 2003-07-06 04:08:11 +00:00
moodler
401c8de6c5 New question type called "Description". All it does is print some
text and/or an image, without requiring an answer.  Can be used
to provide text for a following group of questions, or to insert
a joke in the quiz etc ...

This code is based on code sent in by Ursula Raab.  Thanks!

See: http://moodle.org/mod/forum/discuss.php?d=508
2003-07-06 04:00:05 +00:00
stronk7
7bfa4fade3 Excluded form quiz_choose_random_questions the quiz
questions to avoid duplicates in quiz. Bug #544. Closed.
2003-07-02 17:30:42 +00:00
moodler
5325f8b8cf A little more guidance on the quiz page. 2003-05-23 15:20:41 +00:00
moodler
4d01ada343 More on Bug 427_ on second thoughts it's better this way, now at least
the true/false entries get updated every time the question is updated.
2003-05-17 03:02:59 +00:00
moodler
a6ccb416f1 This should fix the non-translatability of true/false questions bug 427 2003-05-17 02:54:20 +00:00
moodler
33de9f7bdc FIxed bug where questions weren't being shown in reviews. 2003-05-15 17:01:35 +00:00
moodler
d288fa5255 Better code to deal with shuffleorder.
Now feedback is always in the same order as the quiz, and
reports are always in the natural order.
2003-05-14 16:52:25 +00:00
moodler
ada728e24d Fix the order of questions when shuffle is NOT being used.
See bug 423 for details: http://moodle.org/bugs/bug.php?op=show&bugid=423
2003-05-14 15:23:54 +00:00
moodler
c6bcd06aba Tidied up the quiz imports a bit, and added AON as a format choice
Also added Scott Elliott's Blackboard module!
2003-05-02 15:31:24 +00:00
paca70
9a652ddb2b Don't give fatal error when questions were not found. 2003-04-28 06:36:14 +00:00
moodler
1b5910c4a5 Trying a different tack for recent_activity since the old way was
still producing too much data and overflowing PHP memory on busier
sites (eg moodle.org).

Now, there are more database queries, which is unfortunate, but the
data is much more specific, and no sorting needs to be done, so
this is a performance boost.

I don't know how these will cancel out ... my guess is that very
small sites may be very slightly slower on the course page, but
that large sites will be much faster.

Let's see.
2003-04-26 15:08:34 +00:00
moodler
3d89198946 Cleaned up definition of constant COURSE_* values in course/lib.php
Moved COURSE_TEACHER_COLOR out to style sheets where it belongs (.teacheronly)

Added some efficiency when printing recent activity

 - don't print more than one weeks worth of updates
  - don't keep re-parsing logs once they've been used
2003-04-26 12:17:30 +00:00
moodler
61367e6417 More robust variable checking 2003-04-24 17:13:52 +00:00
moodler
e1122620b5 Er, similar to the last few changes but this way seems to actually work. :-)
Need sleep ...
2003-04-16 13:48:16 +00:00
moodler
2408867e8c Improvements for shuffleorder in collections of random questions 2003-04-16 13:25:03 +00:00
moodler
96192c4459 After doing a quiz that has been shuffled, present the feedback in the
same order.  Note that shuffled ANSWERS may still appear reshuffled.

When viewing reports, all shuffling is switched off so that quizzes
always appear in the default order (for easier comparison).

Also a few tweaks, robustness etc
2003-04-16 13:10:48 +00:00
moodler
77cff58927 Fixes for bug 268 - Changing answers of questions can lose responses for
existing quizzes with those questions.

When updating a question it now checks for existing answers and updates
those instead of making new ones.
2003-04-15 14:43:29 +00:00
moodler
5a25f84d25 Fix for off-by-one grade error when 'Save Grades' had not been used 2003-04-14 13:52:59 +00:00
moodler
0bf2925db8 Minor fixes 2003-04-11 14:44:12 +00:00
moodler
c6eed09730 New "create multiple questions" wizard.
Improvements to the importing routine for AON
2003-04-10 17:55:57 +00:00
moodler
da5fb074c3 Minor robustness fix 2003-04-10 13:11:34 +00:00
moodler
4b85b71712 New quiz switches to
- shuffle questions order
  - shuffle answers order
2003-04-09 13:57:08 +00:00
moodler
434802d5ce Slightly more efficient database access. 2003-04-09 07:23:42 +00:00
moodler
34d52ad7d2 First implementation of completely random questions.
When you add a random question to a quiz, then a question
is chosen randomly from the same category.

Questions are not repeated in a particular quiz attempt.

This still needs more testing, but it's looking OK so far.
2003-04-09 06:32:51 +00:00
moodler
54a67a5921 First cut at adding new "fixed" Match question type, which is manually
created.  Works OK after limited testing.

I've also renamed some strings to do with "Random Match", so that this
question type is now called "Random Short-Answer Match".

Later there will be a new 'Random Match' which randomly selects one of the
existing "Match" questions.
2003-03-30 16:46:50 +00:00
moodler
ef4145f6ae Changes to make regrading work properly if the quiz has changed
and also an exptended timelimit for when regrading is REALLLLY slow
fue to some other unknown reason (as yet)
2003-03-20 07:28:53 +00:00
moodler
df103e8212 Questions now have a defaultgrade column (which defaults to 1)
... this grade is used as the default grade when adding questions
to a quiz.

At the moment it's just so that some imported questions can have
different defaults, but a field should be added to all question
editing pages.
2003-03-03 17:43:13 +00:00
moodler
c363d9d11f Added QUIZ_DEFAULT_SCORE ... later this will be a quiz option 2003-03-03 17:05:35 +00:00
moodler
14bdb2387a Sort question list by question type 2003-03-01 05:11:44 +00:00
moodler
95dbc030a8 First version of code to implement new "Random Matching" type
of questions.  These use 2 or more short answer questions at
random to construct a questions where you have to match
answers to questions.  Only lightly tested so far.

Quiz questions can now be edited with Richtext editor.

Sundry little fixes along the way.
2003-02-24 10:37:56 +00:00