204 Commits

Author SHA1 Message Date
tjhunt
ddedf979b4 MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-03 06:19:25 +00:00
tjhunt
34a2777ccb themes: MDL-19077 new $OUTPUT->header/footer to replace print_header/footer.
Also, part of the change from weblib.php functions to $OUTPUT-> methods.

This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

This is a big change, and the result is not perfect yet. Expect some debugging output
on some pages.

The main part of these changes are that $OUTPUT->header now looks for a file
in the theme called layout.php, rather than header.html and footer.html. Also
you can have special templates for certain pages like layout-home.php. There is
fallback code for Moodle 1.9 themes, so they still work.

A few of the old arguments to print_header are no longer supported. (You get an
exception if you try to use them.) Sam H will be cleaning those up.

All the weblib functions that have been replaced with $OUTPUT-> have version in
deprecatedlib, so existing code will go on working for the foreseeable future.
2009-06-26 09:06:16 +00:00
arborrow
b0ea27b441 MDL-19950 - check for format type name in qformat if not found in quiz.php lang file 2009-06-21 04:29:37 +00:00
skodak
17da2e6f28 MDL-16438 centralise information about plugins to avoid duplication, includes local customisation conversion to standard plugin structure + fixes for some recent regressions; see tracker for more details and links to docs and forums discussions 2009-06-19 14:25:56 +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
c28bf5c9f8 javascript: MDL-19475 replace require_js calls with $PAGE->requires->js.
Also, some related JavaScript cleanup.

More to follow.
2009-06-15 05:37:57 +00:00
skodak
fc29e51b2d MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup 2009-06-13 18:34:43 +00:00
skodak
a8f3a651c0 MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup 2009-06-13 18:16:08 +00:00
skodak
bb4b6010f3 MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup 2009-06-13 17:17:10 +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
skodak
a8d6ef8c6c MDL-18293 $DB->somethiong is using exceptions, no need for ifs there, removing useless strings 2009-06-03 20:16:20 +00:00
skodak
bf8e93d704 MDL-18293 $DB->somethiong is using exceptions, no need for ifs tehre, removing useless strings 2009-06-03 20:00:08 +00:00
samhemelryk
50fcb1d835 lib MDL-19236 Added boilerplates and copyrights 2009-05-26 03:23:32 +00:00
tjhunt
50da63ebd9 qtypes: MDL-18711 Allow qtype plugins to have custom CSS and JavaScript on the editing page. 2009-03-30 09:15:46 +00:00
tjhunt
574c37507f random essay questions: MDL-8648 fix merge problem. 2009-03-26 01:54:40 +00:00
tjhunt
80f7bafdab question bank: MDL-18531 Sorry, capability name typo. 2009-03-18 05:33:56 +00:00
tjhunt
353b2d700d question bank: MDL-18531 if someone can use questions in the quiz context, but not the course context, choose a more sensible default category in the question bank. Merged from MOODLE_19_STABLE. 2009-03-18 05:02:27 +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
af52eceef4 qtype admin: MDL-18425 also related to MDL-18355.
Allow question types  to be displayed in order that is better than random or alphabetical. Since we don't know all the qtypes there may be:
1. Store the order in the DB (config plugins).
2. Set up a good default order for the standard types. (Unknown types go at the end by default.)
3. Allow admins to edit the order on the qtype admin screen.
2009-03-03 07:47:32 +00:00
tjhunt
7f92f0ad39 quiz editing: MDL-18355 further refinements to the UI. 2009-03-03 05:13:53 +00:00
tjhunt
a781921fd0 question bank: MDL-16412 Allow admins to enable/disable of each question type 2009-02-25 09:31:49 +00:00
tjhunt
f3409e53a0 questionlib: fix typo. 2009-02-25 06:12:55 +00:00
tjhunt
d11de005c6 question bank: MDL-16345 Assorted small efficiency gains. 2009-02-13 06:27:08 +00:00
tjhunt
c599a68240 question bank: MDL-12787, MDL-17870 field in the question editing form to tag questions, and load and save the tags from the DB. 2009-01-16 08:00:06 +00:00
tjhunt
83f0fef567 questions manual grading: MDL-15147 refine the logic for distinguishing '' and 0, so you can grade an essay 0 without making a comment, but also, grade some, but not all student's work in the manual grading report. 2008-12-12 09:00:11 +00:00
tjhunt
47ceac47e4 questionlib: clarify a comment. 2008-12-12 02:50:36 +00:00
tjhunt
3c573960ec question bank: MDL-14376 Errors deleting a course containing Cloze questions.
(For some reason, this only seemed to cause problems on MySQL.)
2008-12-11 05:31:33 +00:00
tjhunt
e8f99abc68 quiz manual grading: MDL-5517 manual grading pop-up is too small. HTML editor does not fit. Merged from MOODLE_19_STABLE.
Also MDL-17585 Improve layout of manual grading forms to make them look more like formslib forms. The standard trick of stealing the HTML and class names that formslib works, so the standard style rules apply to your form.
2008-12-10 09:11:30 +00:00
tjhunt
426091ee1f Simple whitespace cleanup. 2008-12-10 05:32:51 +00:00
tjhunt
f24493ec9b random essay questions: MDL-8648 Allow essay questions to be selected by random question.
In the 1.9 branch this is controlled by a new option under Admin -> Experimental. In Moodle 2.0 dev it is not optional, it just works.

The main change is letting the manual grading report know which random questions might need manual grading. MDL-4004 - this depends on the random question under consideration, which requires a new questiontype method.

I also changed the random question code so that I could remove some global variables.
2008-11-28 06:07:11 +00:00
tjhunt
df4e224454 question bank: MDL-14434 Cannot edit the only question category in a context. 2008-11-27 11:50:29 +00:00
tjhunt
24ada7b2b6 Yay! found a global variable that was not being used anywhere. Kill! Kill! 2008-11-26 08:55:24 +00:00
jamiesensei
91ec2c427a MDL-17183 "function 'question_get_real_state' fails when response is empty string" fixed regular expression 2008-11-10 07:03:25 +00:00
tjhunt
30f09308b9 MDL-16683 - add 5/6 as a grading option. Also, make all these optoins 7 decimal places, to match what we store in the DB, and explaing the 'rationale' behind the list. 2008-09-26 03:14:05 +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
jamiesensei
8b92c1e3f6 MDL-16529 "Only include closed attempts in manual grade counts" 2008-09-23 09:52:55 +00:00
tjhunt
d583bff0fc Update to use print_js_config. 2008-09-23 02:56:46 +00:00
tjhunt
766df8f72b MDL-16334 Convert mod/quiz/comment.php to use attemptlib.php - final part of the work on the quiz navigtion, I hope.
MDL-16559 Remove question/comment.html template, and instead just have a function in questionlib.php
MDL-16562 Regression from MDL-16263, notices when regrading.
Sorry, the three got tangled together (coupled through questionlib) while I was fixing bugs in preparation for a demo.
2008-09-18 07:39:10 +00:00
tjhunt
bdff6b85d9 MDL-16409 - Finish the report. 2008-09-10 05:34:09 +00:00
tjhunt
cca6e300e7 Refactor getting question bank capabilties in mod/quiz/lib.php - don't hard code them.
Also, functions for getting a URL for editing questions in a particular context, ready for MDL-16409.
2008-09-10 05:28:25 +00:00
tjhunt
05efb0e52f MDL-6751 Admin page for question types. This does the bulk of the work:
MDL-16407 Add to admin/settings/plugins.php to link to the new manage page, and pull in any qtype settings pages
MDL-16408 Write the manage question types page, to display the table of installed types
2008-09-09 08:43:40 +00:00
tjhunt
3843d2745e Whitespace and comment improvements. 2008-09-09 08:35:38 +00:00
tjhunt
40d1feeb49 MDL-15540 Navigation panel did not work on the review page for multi-page quizzes because of the way states were loaded. Fix the regressions caused by the previous refactor. 2008-09-04 07:05:14 +00:00
tjhunt
81d833adaa MDL-15540 Navigation panel did not work on the review page for multi-page quizzes because of the way states were loaded. Refactor. 2008-09-04 06:37:43 +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
5e9170b43e MDL-16263 Flagging questions during a quiz attempt. Save flag state on submit when JS is off. 2008-09-03 07:11:59 +00:00
tjhunt
a282ef514e MDL-16263 Flagging questions during a quiz attempt. IE cannot cope with an object initialiser with a trailing comma, so change how thise JS is output. 2008-09-03 05:37:46 +00:00
scyrma
2a68c5d9b9 MDL-16318: remove a few calls use_html_editor() (more to come) 2008-09-03 03:09:56 +00:00
tjhunt
630a3dc384 MDL-14160 SQL in get_categories_for_contexts does not work on Oracle. Thanks to Adrian Smith and Francois Marier for the fix. 2008-09-02 06:55:32 +00:00
tjhunt
62e76c6766 MDL-16263 A way for students to flag/bookmark, particular questions during a quiz attempt for later review.
This is an initial implementation that is now at a working state, but with a few things left to do. It seemed like a good idea to commit it before leaving work on Friday night.
2008-08-29 10:08:27 +00:00