129 Commits

Author SHA1 Message Date
Matt Petro
8e771aed93 MDL-35717 quiz: fix overdue attempt processing 2012-11-16 21:32:09 -05:00
Tim Hunt
32953f37b6 MDL-34399 quiz cleanup: remove ugly question/page number hack
It used to be necessary to store the question number and question page
by adding them as random extra fields on the question object (but
I can no longer remember what that reason was). Now it is possible
to store this sensibly in the quiz_attempt object, which is much
cleaner, so do that.
2012-10-26 11:58:25 +08:00
Tim Hunt
d869de66a6 MDL-34733 quiz 'secure' mode: finish review link broken in previews
This fix a small API change in mod_quiz_renderer::finish_review_link.
At least the required change is an improvement, since it gives the
renderer more flexibility.
2012-08-21 12:08:57 +01:00
Tim Hunt
4be550c57d MDL-34905 quiz: missing global $DB;
This code normally only runs when JS is disabled, which is why this was
not noticed before.
2012-08-15 10:25:25 +01:00
Tim Hunt
ff2ec2cb95 MDL-34599 quiz attempts: more robust if page number out of range.
Rather than throwing an exception, we should just show the first/last
page of the quiz if the page number is out-of-range.
2012-07-27 11:42:03 +01:00
Ankit Agarwal
c492a78ee2 MDL-34468 quiz: Replace all instances of get_context_instance() with respective context_XXXX class in mod/quiz 2012-07-24 17:08:05 +08:00
Tim Hunt
9e83f3d11d MDL-32788 quiz: clean up codechecker issues before the 2.3 release. 2012-05-04 15:12:23 +01:00
Tim Hunt
96e5168c7e MDL-32740 / MDL-3030 quiz summary: no Return to attempt for overdue. 2012-05-03 12:16:43 +01:00
Tim Hunt
be18f589e2 MDL-3030 quiz overdue handling: test state, not timefinish where applicable. 2012-04-27 15:07:40 +01:00
Tim Hunt
a403bce0bd MDL-3030 quiz overdue handling: back-end code for the new transitions 2012-04-27 15:07:36 +01:00
Tim Hunt
34b7d8383d MDL-3030 quiz overdue handling: trigger automatic state transitions.
Here, we catch all the places where a student might be accessing their
own attempts, and make sure any automatic state transitions that
should happen, do happen, before the student sees the attempt.

The places where we need to check this are view.php, startattempt.php
and processattempt.php.

We do not really need to check attempt.php or summary.php, because if
the student is on one of those pages, the JavaScript timer will
auto-submit when time expires, taking them to processattempt.php,
which will do the acutal work.

We intentionally do not trigger state transition when a teacher is
looking at a student's quiz attemp. We will trigger state transitions
on cron, but that is still to do.

Also, the body of the process_... methods still needs to be written.
2012-04-27 15:07:35 +01:00
Tim Hunt
b39b5d77c3 MDL-3030 quiz overdue handling: show attempt state on the review page. 2012-04-27 15:07:30 +01:00
Tim Hunt
2b2b645842 MDL-3030 quiz overdue handling: display message on the summary page.
This change also includes a clean-up of how we display and initialise the countdown timer.
2012-04-27 15:07:29 +01:00
Tim Hunt
2de9be52aa MDL-3030 quiz overdue handling: show attempt state on the view page 2012-04-27 15:07:27 +01:00
Charles Fulton
33c8d37b6f MDL-11047 quiz: enable sequential navigation 2012-03-15 10:09:27 -07:00
Kyle Temkin
704f062b87 MDL-31407 quiz: finish_attempt method should not rely on $USER 2012-02-02 18:37:05 +00:00
Sam Hemelryk
d36b5d1177 Merge branch 'MDL-31095' of git://github.com/timhunt/moodle 2012-01-16 16:58:32 +08:00
Aparup Banerjee
c5fd16826a MDL-3054 quiz : cleaned whitespaces. 2012-01-16 13:41:12 +08:00
Charles Fulton
5db8294940 MDL-3054 record the current page of a quiz attempt 2012-01-12 09:15:37 -08:00
Tim Hunt
389cb58948 MDL-31095 quiz: fix bug in quiz::has_questions. 2012-01-12 12:10:06 +00:00
Tim Hunt
08502b574d MDL-30182 quiz grade.php should support userid param. 2011-11-15 11:36:10 +00:00
Tim Hunt
987c2d491e MDL-29627 quiz access refactor password check into a generic check page. 2011-10-13 11:13:20 +01:00
Tim Hunt
0eafc98852 MDL-29627 fix code-checker issues throughout the quiz code. 2011-10-13 11:13:16 +01:00
Tim Hunt
d755b0f577 MDL-29627 quiz_access_manager move all output code to the renderer.
This achieves a massive clean-up. It simplifies comples code in a number
of places. It allows some methods and functions to be moved to a more
appropriate home (for example cannot_review_message to the quiz class).
It moves more logic out of the renderer.
2011-10-13 11:13:12 +01:00
Tim Hunt
dd70d561ef MDL-29627 quiz load access settings when a quiz is being attempted. 2011-10-13 11:13:10 +01:00
Tim Hunt
79a46626d3 MDL-29427 quiz nav: information items should should have a state tooltip 2011-09-22 18:12:43 +01:00
Tim Hunt
cbb8b55c33 MDL-28166 send quiz event notifications asynchronously.
This avoids the problem that you cannot send messages in transactions.

It also means that the quiz submission will not be prevented, and the
message will still be sent eventually, if any part of the messaging
system is giving intermittent errors when the student wants to submit
their quiz.
2011-07-06 14:16:30 +01:00
Eloy Lafuente (stronk7)
a2854474ce Merge branch 'MDL-27979' of git://github.com/timhunt/moodle 2011-06-23 00:34:03 +02:00
Tim Hunt
da72991636 MDL-27979 Should be an edit link for each question when previewing or reviewing a quiz. 2011-06-22 21:07:40 +01:00
Eloy Lafuente (stronk7)
8032990022 Merge branch 'MDL-26948' of git://github.com/timhunt/moodle 2011-06-22 02:35:25 +02:00
Tim Hunt
e28bbd8919 MDL-27942 Use picture not displayed during quiz attempts. 2011-06-20 10:26:01 +01:00
Tim Hunt
83f93ec41f MDL-26948 quiz navigation fake block should have an id to allow styling. 2011-06-17 17:26:28 +01:00
Tim Hunt
97cdc1de72 MDL-27747 quiz summary, add a CSS class to the table rows based on question state.
The standard themes do not use this for anything, but it makes it easier for themers to do cool stuff.
Also improve the API for getting the question state class.
2011-06-07 15:11:04 +01:00
Tim Hunt
c9272e87f9 MDL-27747 quiz End test... link was not working. #387
I don't know why this was ever changed from class to id. That was done in commit a1eb3a4466cd.
2011-06-07 14:29:11 +01:00
Tim Hunt
0eb253f7f6 MDL-20636 quiz restart preview button was missing since the renderer refactor. 2011-05-19 19:05:25 +01:00
Tim Hunt
bb28e3bc5e MDL-27408 Moved the question engine install/upgrade code into the proper place.
I have tested upgrade from the previous development version, and a clean install. Upgrade from 2.0 still needs more work.
2011-05-12 18:58:50 +01:00
Tim Hunt
25a03faaca MDL-20636 fix many code-checker issues in mod/quiz. 2011-05-12 00:30:25 +01:00
Tim Hunt
b3782c71bf MDL-20636 My go and creating a renderer for mod/quiz/review.php.
Note that this breaks the attempt.php page; there are a lot of methods that are missing PHPdoc comment; there are probably now some unused methods that could be deleted; and there are a couple of places which could be handled a bit better.

But, overall, I think this way makes sense.
2011-05-09 12:30:39 +01:00
Tim Hunt
c7df5006b9 MDL-20636 Add lots of missing public/protected/private. 2011-03-23 16:22:25 +00:00
Tim Hunt
3c6185e979 MDL-20636 Move restart preview button into the quiz nav block & remove unnecessary titles.
Also, remove automatic redirects to the quiz edit page. Show a message and a button instead.
2011-02-25 12:12:09 +00:00
Tim Hunt
88f0eb1546 MDL-20636 Reveiw all throw statements. 2011-02-23 16:50:09 +00:00
Tim Hunt
f7970e3ca7 MDL-20636 Eliminate integer and boolean in PHPdoc comments. should be int and bool. 2011-02-23 16:25:25 +00:00
Tim Hunt
a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +00:00
Tim Hunt
0ff4bd0877 MDL-20636 Fix new stdClass -> stdClass(), and trailing whitespace. 2011-02-21 18:10:19 +00:00
Tim Hunt
ba6438471b MDL-20636 Fix top of file boilerplate in mod/quiz. 2011-02-21 16:13:25 +00:00
Tim Hunt
8032cd792c MDL-25122 Quiz review page does not check and enforce separate groups mode. 2011-02-18 17:36:18 +00:00
Tim Hunt
a8a8ec51fc MDL-20636 Fix bug with starting an attempt. Now uses exceptions, so should not check return values. 2011-02-12 00:40:43 +00:00
Tim Hunt
2709ee45d3 MDL-20636 Working on converting the reports, starting with the manual grading report. Very much a work-in-progress.
Also, some random bug-fixing.
2011-02-11 18:47:08 +00:00
Tim Hunt
56e82d993d MDL-20636 Images in questions now work in quiz attempts. 2011-02-09 20:33:51 +00:00
Tim Hunt
7ee80cab53 MDL-20636 Manual comment popup comment.php now works. 2011-02-09 20:29:59 +00:00