119 Commits

Author SHA1 Message Date
Dongsheng Cai
fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +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
2b38499d60 MDL-20860 quiz grades that had already been formatted for output were being used in database queries.
Which really does not work in locales that use , as a decimal point.

Also, this commit fixes one performance problem in index.php with DB queries in a loop.
2010-05-07 00:08:16 +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
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
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
Petr Skoda
812dbaf7d5 MDL-21198 improved/simplified $OUTPUT->user_picture() + regression fixes, performance fixes and detected performance problems when printing user avatars 2009-12-27 19:47:21 +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
Tim Hunt
82165a0cf0 quiz: MDL-20706 prevent XSRF.
Uses new require_sesskey function from MDL-20702.
2009-11-02 17:10:31 +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
39e3701904 MDL-19813 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno 2009-08-20 08:45:47 +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
82fd2e8bfb quiz: Check this is the users own attempt before sending them to the attempt.php page. 2009-07-22 09:25:46 +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
25ddb7efc9 javascript: MDL-19475 replace require_js calls with $PAGE->requires->js.
This is the final batch.
2009-06-15 07:57:53 +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
84e628a027 quiz settings: MDL-18485 Improve quiz settings form
* Reorder form fields to group things more logically.
** and on the corresponding admin page too.

* Set some options to be 'Advanced' by default:
** Apply penalties.
** Each attempt builds on the last.
** Decimal places for question grades.
** The five 'Extra restrictions on attempts' settings. (password, etc.)
* Admins can still change this to suit their institiution at Administration > Plugins > Activity modules > Quiz.
* These new defaults are applied if the admin had not previously set any fields to be advanced.

* Disable some filds when they are not applicable:
** Grading method, if num attempts = 1
** Penaly scheme, if adaptive mode = no
** Each attempt builds of last, if num attempts = 1
** Review after quiz closed options, if no close date.
** Delay between 1st and 2nd attempts, if num attempts = 1
** Delay between later attempts, if num attempts < 3

* Convert quiz.timelimit to be in seconds, for consistency, and ready for the new duration field type (MDL 18500).
** Including ensuring that backup and restore is backwards compatible.

* MDL-5537 New setting, questiondecimalpoints, so, for example, you can show the quiz grade as an integer, but have fractional question grades.
** There is a 'Same as overall decimal points' option, which is the default.

* Improve some field labels.

* Make corresponding changes in the help files.
2009-03-10 08:39:51 +00:00
tjhunt
96c7d771df quiz: MDL-14926 New capability mod/quiz:reviewmyattempts, separate from mod/quiz:attempt. Merged from MOODLE_19_STABLE. 2009-01-14 07:08:02 +00:00
tjhunt
a733c4b98b mod quiz: MDL-3156 Add an option to display the current user's photo and name on the Quiz attempt and review pages. 2009-01-07 06:32:13 +00:00
tjhunt
f330327c7d Fix typos. 2009-01-06 05:19:15 +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
jamiesensei
bbf4f440ee MDL-15326 "allow for per report capabilities to replace mod/quiz:viewreports" 2008-11-25 12:11:27 +00:00
tjhunt
2930500104 MDL-16706 - eliminate miscellaneous inine JavaScript
This does the quiz (apart from the bloody 'secure' window), the question bank and a couple of others.
2008-09-26 10:49:31 +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
739b07112e MDL-16625 Detection of whether a quiz has grades was broken in HEAD.
1. Fix this by factoring out a quiz_has_grades function.
2. Fix the quiz unit tests.
3. Fix quiz_has_feedback to return false for ungraded quizzes.
4. Fix use of get_records to do record_exists in quiz reports.
2008-09-23 07:18:15 +00:00
tjhunt
70491f0658 Remove unnecessary div. 2008-09-04 04:53:28 +00:00
tjhunt
f62040ed1f MDL-16263 Flagging questions during a quiz attempt. Save flag state on the review page when JS is off too. 2008-09-03 08:32:29 +00:00
tjhunt
c7dcecd1e4 MDL-16263 Flagging questions during a quiz attempt. Flag updating in nav not working on the review page. 2008-09-03 05:38:12 +00:00
tjhunt
f88fb62c40 MDL-10682 - Ensure quiz and question grades are formatted consisently and correctly. While testing, I also fixed a few XHTML Strrrict errors. 2008-08-15 06:42:38 +00:00
tjhunt
b55797b8cc MDL-15452 - Put the OU quiz navigation improvements into the Moodle codebase. I was able to factor out some commonalities with review.php along the way. 2008-07-15 15:30:39 +00:00
tjhunt
baef998bb9 MDL-15622 - Add the quiz navigation panel to the review page
Also, improve the styling a bit.
2008-07-14 15:40:24 +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
4fc3d7e549 MDL-15539 - Rework review.php to use attemptlib.php - the bulk of the conversion. 2008-07-08 17:47:57 +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
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