230 Commits

Author SHA1 Message Date
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Juan Leyva
899983ee58 MDL-52888 mod_quiz: New Web Service mod_quiz_view_attempt 2016-03-18 09:27:43 +01:00
Mark Nelson
e0114708af MDL-40063 mod_quiz: replaced 'continue attempt' add_to_log call with an event 2014-04-10 20:41:39 -07:00
Rossiani Wijaya
8c6ca6961a MDL-42339 - removed double formatting for set_title() and set_heading() 2014-02-05 14:47:23 +08:00
Tim Hunt
595708884a MDL-38538 quiz auto-save front end.
1. There is a new admin setting to control whether this feature is
enabled. The admin can set the auto-save frequency to 1, 2 or 5 minutes,
or disable it.

2. When autosave is enabled, there is code in the quiz that monitors the
main quiz form, and does an ajax save call at the given frequency when
changes are being made by the student.

3. The ajax saves go to a new script that calls the question engine to
do the work.

4. To avoid simultaneous autosave + submit and finish, the auto-save
system shuts down shortly before time expires in a timed quiz.
2013-03-28 16:57:24 +00:00
Tim Hunt
e3b2e1a4f4 MDL-34257 quiz 'secure' mode: PAGE initialisation order issues. 2012-09-27 12:41:00 +01:00
Aparup Banerjee
7183a1f4a4 Revert "MDL-34257 quiz 'secure' mode: PAGE initialisation order issues."
This reverts commit 0e708c34760ee274990e1c5bad96583301a6cc79.

note : there is another commit prefixed with MDL-34257 hash 'ddda79c' which was really for MDL-34187. 'ddda79c' is not being reverted as its not really about MDL-34257.
2012-09-06 17:35:40 +08:00
Tim Hunt
0e708c3476 MDL-34257 quiz 'secure' mode: PAGE initialisation order issues. 2012-09-04 11:39:38 +08: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
Dan Poltawski
ed25f64642 Merge branch 'wip-mdl-30651' of git://github.com/rajeshtaneja/moodle 2012-07-23 11:22:06 +08:00
Eric Merrill
478067dbfb MDL-34451 quiz Fixed problem where attempt page is updated for ALL attempts, not just current. 2012-07-22 12:22:28 -04:00
Rajesh Taneja
1e12c1203b MDL-30651 libraries: Replaced deprecated PARAM_INTEGER with PARAM_INT 2012-07-19 15:37:46 +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
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
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
c691f2f513 MDL-32396 quiz: Strict syntax notice on the quiz attempt page. 2012-04-14 15:58:47 +01:00
Charles Fulton
33c8d37b6f MDL-11047 quiz: enable sequential navigation 2012-03-15 10:09:27 -07: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
987c2d491e MDL-29627 quiz access refactor password check into a generic check page. 2011-10-13 11:13:20 +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
babfb615c9 MDL-28424 Reviewing a quiz in 'secure mode' gives a fatal error.
The problem was when output was being started in relation to when the fake block was added.

Took the opportunity to clean up the quiz renderer API a bit.
2011-09-21 16:37:21 +01:00
Tim Hunt
918776f47d MDL-29111 quiz was passing 0 to ->review_url when it should have been null. 2011-08-26 18:21:43 +01:00
Tim Hunt
45e5fbe11e MDL-28976 quiz was passing 0 to ->attempt_url when it should have been null.
There was also one other incorrect call that is fixed in this commit.
2011-08-18 14:00:30 +01:00
Tim Hunt
25a03faaca MDL-20636 fix many code-checker issues in mod/quiz. 2011-05-12 00:30:25 +01:00
Dean Lennard
8d47043fee MDL-20636 updates to code 2011-05-09 12:30:59 +01:00
Dean Lennard
13040e1452 MDL-20636 changes made to renderers, attempt and view 2011-05-09 12:30:49 +01:00
Dean Lennard
63be47d932 MDL-20636 Made changes to the three files and code checked 2011-05-09 12:30:47 +01:00
Dean Lennard
bcd42560e3 MDL-20636 Updated code to include html writer 2011-05-09 12:30:45 +01:00
Dean Lennard
9f335e76fa MDL-20636 Fixed issues raised 2011-05-09 12:30:43 +01:00
Dean Lennard
606e07d574 MDL-20636 Attempt as converting attempt.php over to renderer 2011-05-09 12:30:41 +01:00
Tim Hunt
55ca80edde MDL-20636 Fix lots of problems found by the new improved codechecker. 2011-04-04 20:11:29 +01:00
Tim Hunt
404da23812 MDL-20636 Fix question flag javascript. 2011-02-25 15:36:07 +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
ba6438471b MDL-20636 Fix top of file boilerplate in mod/quiz. 2011-02-21 16:13:25 +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
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
Tim Hunt
7c5bd5bfab MDL-20636 Working towards being able to attempt a quiz. 2011-02-09 20:18:12 +00:00
Tim Hunt
d9c26e2174 blocklib MDL-25654 fix API inconsistency be renaming add_pretend_block to add_fake_block.
I added a deprecated method add_pretend_block that forwards to add_fake_block, so old code should be break. However, I aslo updated all the callers in core code.
2010-12-20 18:22:37 +01:00
Eloy Lafuente
0f66acede0 MDL-22135 - logs restore, course and activities + cleanup 2010-11-11 19:46:04 +00:00
Tim Hunt
fb6dcdab11 quiz & qbank MDL-24453 fix all the ways you can edit a question, so that that returnurl paramterer acutally works.
I hope. Please test thoroughly.
2010-10-18 15:28:59 +00:00
Petr Skoda
eab8ed9fb7 fixed a few spelling errors in /admin/ 2010-09-17 10:27:26 +00:00
Tim Hunt
f2cb0c3d48 quiz NOBUG whitespace fix. 2010-08-11 20:15:18 +00:00
Tim Hunt
690510bd3d quiz NOBUG fix some JavaScript errors. 2010-08-11 16:31:52 +00:00
Sam Hemelryk
73eba4be68 navigation MDL-20276 Fixed use of override_active_url. 2010-08-06 05:49:47 +00:00
Tim Hunt
c68287a928 mod_quiz / navigation MDL-20276 replace make_active with override_active_url
It doesn't work, but I am committing it, so Sam H can take a look.
2010-08-05 18:15:17 +00:00
Tim Hunt
eb02301a36 mod_quiz / navigation MDL-20276 further polishing the quiz navigation structure. 2010-08-04 16:31:54 +00:00
Tim Hunt
ff065f96bc mod quiz + questions MDL-22370 convert JavaScript to YUI3 and modules.
Note, quiz editing JS has not been done yet.
2010-08-04 15:22:04 +00:00
Tim Hunt
45c4a5c770 quiz MDL-21533 remove all mention of overlib from the quiz, by moving necessary code to qtype_multianswer, which is the only place it is used. 2010-07-05 16:55:39 +00:00
Sam Hemelryk
56ed242b51 navigation MDL-20276 Fixed up the navigation for the quiz module and question section as per Tim's recommendation.
* Routine navigation through the quiz and question modules
* Fixed navbar through quiz and questions
* Pages headers added throughout
* Added method to turn a navigation node into a tabs array suitable for use with print tabs
2010-05-21 03:15:48 +00:00