157 Commits

Author SHA1 Message Date
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
tjhunt
10440b746a MDL-15538 - Rework attempt.php to use attemptlib.php - fix a comment. 2008-07-08 17:45:32 +00:00
tjhunt
78e7a3dd5d MDL-15452 - Put the OU quiz navigation improvements into the Moodle codebase - quite a lot of progress, sorry I am committing this as a big lump, but it took me a while to get the code back to a working state.
MDL-15537 - create oo attemptlib.php to hold shared code between attempt, summary and review.php
MDL-15541 - Refactor starting a new attempt into a new file startattempt.php
MDL-15538 - Rework attempt.php to use attemptlib.php
2008-07-08 16:33:47 +00:00
tjhunt
373f0afd24 MDL-15494 - No allowance for the possibility that something might go wrong when processing the response to a question. 2008-07-01 13:34:09 +00:00
dongsheng
bcc45748f5 "MDL-14129, fix print_error" 2008-06-15 11:25:45 +00:00
nicolasconnault
739b748b22 MDL-15113 Fixed bug in dmllib code 2008-06-12 09:07:37 +00:00
dongsheng
550f965438 "MDL-14129, fix print_error" 2008-06-10 06:27:38 +00:00
nicolasconnault
9cf4a18b41 MDL-15113 Upgrade to DMLLIB 2.0. Needs further testing and bug-fixing.
MDL-15100 Fixed a bug in gradelib.php
Plus edited tablelib.php for table_sql upgrade to dmllib 2.0
2008-06-09 10:00:35 +00:00
tjhunt
3192d014f3 Eliminate direct references to $_REQUEST and $_POST in the quiz code.
Also, when you edit the quiz, and therefore any preview attempts are deleted automatically, make sure the attempts are deleted properly by calling quiz_delete_attempt on each one, rathern than leaving orphaned junk in the database.
2008-04-23 14:49:22 +00:00
tjhunt
44847eb868 MDL-14363 - Fix a broken redirect from mod/quiz/ attempt.php to edit.php when the quiz has not questions.
Also, when the quiz has no questions, disable the Info, Reports and Preview tabs, which, in this case, just redirect back to the Edit tab anyway.

Finally, change a redirect in quiz view.php, which used a relative URL, to a full url starting $CFG->wwwroot.
2008-04-22 15:19:50 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
tjhunt
c52c62d1b1 MDL-13806 - Refactor all the code that implements the rules for whether students can attempt the quiz now into some classes.
Resource page now done as well. That should be everything.
2008-03-07 12:33:07 +00:00
tjhunt
7f2ec6b147 Minor quiz layout improvements. Merged from MOODLE_19_STABLE. 2007-12-17 16:56:42 +00:00
tjhunt
d8d9497719 MDL-12540 - Quiz sometimes outputs content before <head> when previewing - breaks HTML strict. Merged from MOODLE_19_STABLE. 2007-12-11 15:04:31 +00:00
tjhunt
2b3b36d0af Eliminate duplicate $Id$ tag. Merged from MOODLE_19_STABLE. 2007-11-07 12:35:33 +00:00
tjhunt
4f189a8e17 Fix possible notice. Merged from MOODLE_19_STABLE. 2007-10-16 20:52:28 +00:00
tjhunt
38e179a4ed MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.
2007-10-12 15:55:49 +00:00
tjhunt
fba3ea31bc MDL-8682: Pressing enter when answering a short answer question can submit the wrong one. To fix this, I have disabled the enter key unless the keyboard focus is on a submit button (or inside a text box or HTML editor).
MDL-9451: Quiz answers can be lost if user navigates before page reloads. I am not totally sure I have fixed this, but I hope so. I moved the printing of the hidden form field with the list of questions on the page to the end of the form, so no answers will be processed unless the whole form loaded. Note that you could still lose data, but only if the page takes a really long time to load and you answer the first question and click submit before the whole quiz is loaded.

MDL-11463: The quiz uses two different timers, which is silly. I have removed the javascript that was ocasionally used to put a timer in the browser's title bar. Now we only use the one in the page for all cases.

Because MDL-8682 also needed javascript, I renamed timer.js to quiz.js so it could be a library of all the quiz's JavaScript, and started including it properly with require_js.
2007-09-26 18:15:31 +00:00
tjhunt
e63faf2b50 MDL-10376 - since roles and capabilities came along, the quiz was not very gracious if you were logged in as guest, or really logged in on the server, but using guest access to look a a particular course, or were enrolled in a course, but in a role that did not let you preview or attempt quizzes. This patch should clean up the logic for all these cases. 2007-09-20 15:14:24 +00:00
jamiesensei
9f877cb072 fix for MDL-10835 Results and Preview Tabs broken - requred param 'cmid' missing (for quiz with no questions) 2007-08-14 02:50:56 +00:00
tjhunt
d5ab1b0cf4 Minor tidyup. 2007-07-26 12:04:34 +00:00
tjhunt
8995ddda2a MDL-10619 - Quiz password form does not work. 2007-07-26 11:39:04 +00:00
tjhunt
ed8bebce5a MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case. Merged from MOODLE_17_STABLE. 2007-07-13 15:58:42 +00:00
tjhunt
99a1bf3d9c MDL-10374 - Quiz layout improvements, selectively merged from OU-moodle. 2007-07-06 16:37:06 +00:00
mattc-catalyst
01e3838853 MDL-9473: Initialise navlinks array before use
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-07-05 04:55:24 +00:00
mattc-catalyst
3b27b0fe21 MDL-9615: Correct incorrect use of term breadcrumbs
- $crumbs -> $navlinks


Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-07-05 04:40:48 +00:00
tjhunt
ac48e43a89 MDL-648 - Email notification and confirmation when quizzes are submitted. Thanks to Graham Miller for implementing this to my design. 2007-06-26 16:34:05 +00:00
tjhunt
ccac7305ea Make a library function for deleting quiz attempts, rather than having duplicated code - Followup: make sure we only delete preview attempts. Merged from OU Moodle. 2007-06-23 10:39:28 +00:00
tjhunt
8165523992 Put information about which quiz and page in the URL for attempt.php, instead of in hidden form fields. Merged from OU Moodle.This makes things a little more robust in some situations, for example you can bookmark a page half way through a quiz attempt to make it easier to get back later. 2007-06-20 16:18:37 +00:00
tjhunt
ff51d64621 Make a library function for deleting quiz attempts, rather than having duplicated code. Merged from OU Moodle. 2007-06-18 16:19:00 +00:00
tjhunt
294e63eadd Make it possible for question types to do file uploads. 2007-06-15 11:02:47 +00:00
tjhunt
571da76788 MDL-6368 and MDL-6369 - supplimental - I missed one bit. 2007-04-27 11:18:08 +00:00
tjhunt
5df53d0082 * Fix layout problem on password form. (invisiblefieldset). * Question state fixes: + Don't change from EVENTOPEN too soon. + Make sure all questions get closed at the end of the attempt in adaptive mode. * Get rid of the delay on the redirect when you submit all and finish. 2007-04-25 15:45:24 +00:00
mattc-catalyst
70c6c0ad70 MDL-9474: Updated build_navigation() to use global $COURSE
- Removed $course parameter from build_navigation()
- Updated all calls to build_navigation()


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt Clarkson <mattc@catalyst.net.nz>
2007-04-23 21:11:10 +00:00
mattc-catalyst
9ac0c1b328 Breadcrumbs: mod/quiz changes
- Modified to use build_navigation() for breadcrumb generation.
- Removed print_header method is now provided by base class.


Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-04-16 21:23:17 +00:00
tjhunt
99ba746d29 MDL-6368 and MDL-6369 - allow question type plugins to easily provide some bits of Javascript and CSS.
If there are any of the files styles.css, styles.php, script.js or script.php in the plugin folder, they will be linked to in the head of the quiz attempt page (only for the question types used on that page).

If you need to do something more complicated in your question type, you can override the get_html_head_contributions method instead.
2007-04-12 15:58:32 +00:00
tjhunt
86ccf19cdb MDL-9280 - JavaScript countdown timer did not work in 1.8 due to XHTML strict changes. Also, fixing a few more XHTML strrrrict things in attempt.php. Merged from MOODLE_18_STABLE. 2007-04-11 20:07:36 +00:00
tjhunt
50d7b53ecb attempt.php refactor.
* Move all output code to the end.
 * Make comment style consistent.
 * Trim trailing whitespace from lines.
2007-04-10 14:27:56 +00:00
tjhunt
dc6c8ca1ac Minor cleanups to the quiz code. 2007-04-10 13:02:09 +00:00
tjhunt
46e910c7cd Fix notice. Merged from MOODLE_17_STABLE. 2007-03-30 09:34:05 +00:00
tjhunt
fb708c1130 MDL-6269, MDL-8958, MDL-8990 - Major fix to do with each attempt builds on last:
It used not to work with random questions, and there were problems with the computation of the grade, and regrading. Fix thanks to Paulo Matos, who not only fixed the bug and tested it, but was also incredibly patient waiting for me to have time to commit the changes to CVS.

Merged from MOODLE_17_STABLE.
2007-03-29 16:36:16 +00:00