197 Commits

Author SHA1 Message Date
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
Tim Hunt
990650f94c quiz: MDL-16478 Allow different open/close dates, etc. for individual students or groups.
This was implemented by Matt Petro of the University of Wisconsin - Madison Engineering
School and Math Department. Many thanks. Reviewed by and committed by Tim Hunt.

This adds a new Overrides tab to the UI, with sub-tabs Group overrides and User overrides.
Each of those lists all the overrides that currently exist, and lets you manage them and
create more.

When a quiz is being attempted, the override that applies to the current user is combined
with the current quiz settings loaded from the quiz table (normally called $quiz).
If there are both user and group overrides, then just the specific user override is used (more specific).
If the user is in several groups, then the overrides are combined to give the most permissive set of options.

There is one new database table quiz_overrides, to store the overrides.
2010-03-08 16:01:38 +00:00
Tim Hunt
cdede6fbfe quiz: MDL-21404 Fix Petr's screw-up when converting to js_writer. 2010-03-08 15:32:45 +00:00
Petr Skoda
60409fe103 MDL-21532 ->in_head() now really exceptional (after overrlib removal there will be just a few of them) 2010-02-06 14:09:33 +00:00
Petr Skoda
227255b802 MDL-21402 new js_writer abstraction + otehr minor improvements 2010-01-20 20:01:24 +00:00
Petr Skoda
9dec75dbcc MDL-21240 shortened urls now start with / everywhere 2010-01-18 20:57:32 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Sam Hemelryk
92059c7ee5 mod MDL-21169 Removed update this module button and ensured there was a link in the settings block for it. 2009-12-23 01:57:55 +00:00
Petr Skoda
8319260833 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 11:58:30 +00:00
samhemelryk
a09f21d093 quiz MDL-19813 Upgraded deprecated calls and called set_url with pre-generated var 2009-10-16 03:20:38 +00:00
tjhunt
7d4dfc481e quiz: MDL-19145 Safe Exam Browser integration.
This is a better alternative to 'secure' mode.

It needs to be enabled by the administrator.
2009-09-30 10:57:57 +00:00
samhemelryk
458eb0d10c overlib MDL-19735 Overlib is now included only where it is used
At the same time I have converted the calendar block to use YUI instead of overlib, this introduces one regression in that the panel is shown immediatly but should really have a minimal delay for usability.
This will be fixed once the theme changes for 2.0 have been commited
2009-09-17 07:46:20 +00:00
samhemelryk
55f599f00e mod-quiz MDL-20276 Created callback methods to expand navigation and settings blocks 2009-09-16 05:15:22 +00:00
samhemelryk
03da0c3943 quiz MDL-19813 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents 2009-09-08 01:57:28 +00:00
nicolasconnault
3b1d5cc46a MDL-19813 Converted print_box* to $OUTPUT->box* 2009-08-10 05:00:41 +00:00
nicolasconnault
867847e352 MDL-19813 Converted all print_footer() calls 2009-08-06 14:13:48 +00:00
nicolasconnault
90cd54cb2a MDL-19813 Migrated calls to print_heading 2009-08-06 08:23:24 +00:00
tjhunt
d18675a8d7 quiz: MDL-19891 fix that quiz navigation block that was broken by the blocks changes.
Sadly it now requries JavaScript again, at least for best operation.
2009-07-23 09:20:33 +00:00
tjhunt
d4ad9adf22 quiz: fix URL escaping issues. 2009-07-22 09:49:48 +00:00
tjhunt
d4a03c00ea themes & blocks - MDL-19077 & MDL-19010 blocks are now printed by the theme
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)

Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)

The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.

How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.

Further refinement for how the theme and block code gets initialised.

Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)

Things that are still broken:
 * some pages in lesson, quiz and resource. I'm working on it.
 * lots of developer debug notices pointing out things that
   need to be updated.
2009-07-09 07:35:03 +00:00
tjhunt
cf6155226c ajaxlib/require_js: MDL-16693 $PAGE->requires->... deprecates require_js etc.
There is a new implementation of require_js in lib/deprecatedlib.php,
based on $PAGE->requires.

There were a few other recently introduced functions in lib/weblib.php,
namely print_js_call, print_delayed_js_call, print_js_config and
standard_js_config. These have been removed, since they were never in
a stable branch, and all the places that used them have been changed
to use the newer $PAGE->requires->... methods.

get_require_js_code is also gone, and the evil places that were calling
it, even though it is an internal function, have been fixed.

Also, I made some minor improvements to the code I committed yesterday
for MDL-16695.

All that remains is to update all the places in core code that are
still using require_js.

(This commit also fixes the problem where the admin tree would not
start with the right categories expanded.)
2009-06-12 12:13:07 +00:00
tjhunt
44d1cba4af quiz: MDL-18635 log every single hit to mod/quiz/attempts.php
I don't know why the quiz only logged every 10 minutes. No other part of Moodle worked like that. However, it has always been like that and I did not have a good reason to change it until now.

What was a problem becuase it made it harder to catch people doing a primitive DOS attack against the server by hitting Reload repeatedly.
2009-03-23 01:59:30 +00:00
tjhunt
1bd66f3914 quiz attempts: MDL-18283 add accept-charset="utf-8" to avoid encoding problems. 2009-02-17 07:21:56 +00:00
tjhunt
aafdb447bf quiz: MDL-6085 when editing a question from various places like a preview attempt or review screen, don't use a popup, instead take advantage of the fact that question.php now takes a returnurl. Merged from MOODLE_19_STABLE.
And MDL-17568 minor niggles with new queston navigation:
* The bit that scrolls down to the question you just submitted in adaptive mode was not working with random questions.
* Teachers reviewing an open attempt were shown the qusetions as editable, not read only!
2008-12-10 06:26:47 +00:00
tjhunt
ac324e05ea MDL-16675 change callers to require_js to take advantage of the fact that callers no longer have to add $CFG->wwwroot themselves. 2008-09-25 06:40:52 +00:00
tjhunt
ea16a91d2e MDL-12391 Prevent browser autocomplete in the quiz. Acutally, there was already code trying to do that, but it was not working. Fix it in HEAD only, because it is not a big deal, and so much has changed, it is not an easy back-port. 2008-09-19 04:54:49 +00:00
tjhunt
964f488be3 MDL-15452 Improved quiz navigation. The quiz now no longer requires JavaScript, unless secure mode is used. 2008-09-03 05:50:05 +00:00
tjhunt
5d6a723d40 XHTML Strrict! 2008-08-15 11:13:54 +00:00
tjhunt
9f9eec1ef0 MDL-15542 - Refactor quiz response processing into a separate processresponses.php. 2008-07-15 16:46:24 +00:00
tjhunt
3c168fbb66 MDL-15543 - Display the quiz navigation on the attempt.php page
and most of

MDL-15540 - Write code to render the navigation panel - it does it all apart from working out the correct state in which to show each button, and apply appropriate styles as a result.
2008-07-11 17:03:43 +00:00
tjhunt
a0083206b8 MDL-15452 - Fix regressions introduced by my recent work on this bug and its children. Thanks to Paul Johnson for his testing. 2008-07-11 13:04:09 +00:00
tjhunt
b9b3aa9459 MDL-15452 - Fix regressions introduced by my recent work on this bug and its children. Thanks to Paul Johnson for his testing. 2008-07-10 17:23:56 +00:00
tjhunt
b1103f2bf2 MDL-15535 - URLs are changing from attempt.php?id=XXX to attempt.php?attempt =YYY - implement a sensible redirect if we recieve an old-style URL, since they are stored in a few places like the logs. Also update all URLs we generate that point to attempt.php. 2008-07-09 17:00:26 +00:00
tjhunt
66d07f81a1 MDL-15538 - Rework attempt.php to use attemptlib.php - I had broken processing of submitted responses. Hopefully it is fixed again now. 2008-07-08 18:22:18 +00:00