Commit Graph

125 Commits

Author SHA1 Message Date
Tim Hunt 2a077c0d1b 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:32:56 +01:00
Tim Hunt a361ff5645 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:43:40 +01: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 a1eb3a4466.
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
Tim Hunt b2607ccc19 MDL-20636 Now the quiz review page works. 2011-02-09 20:18:24 +00:00
Tim Hunt 8f37f7fb7a MDL-20636 It is now possible to submit a page of the quiz, and view the summary page. 2011-02-09 20:18:18 +00:00
Tim Hunt a1eb3a4466 MDL-20636 It is now possible to start a quiz attempt.
This includes merging the CSS.
2011-02-09 20:18:15 +00:00
Petr Skoda b6f3e4f8f0 Merge branch 'MDL-26098' of git://github.com/timhunt/moodle 2011-01-31 19:25:41 +01:00