253 Commits

Author SHA1 Message Date
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt
aac80ff319 MDL-20636 fix most of the remaining codechecker issues in mod/quiz and lib/questionlib.php. 2011-05-13 00:33:44 +01:00
Colin Chambers
7ee214ff89 MDL-20636 lib/Questionlib fixed calls to question_delete_question() #381 2011-04-08 16:21:47 +01:00
Tim Hunt
2daffca554 MDL-20636 Fix 30 TODOs 2011-02-24 17:47:51 +00:00
Tim Hunt
d649fb0221 MDL-20636 Remove all references to global $QTYPES.
Except in the question types that have not yet been converted to the new question engine.
2011-02-24 15:29:07 +00:00
Tim Hunt
0ff4bd0877 MDL-20636 Fix new stdClass -> stdClass(), and trailing whitespace. 2011-02-21 18:10:19 +00:00
Tim Hunt
f7c1dfaf79 MDL-20636 Finish off converting question import. 2011-02-21 17:29:18 +00:00
Tim Hunt
a8a8ec51fc MDL-20636 Fix bug with starting an attempt. Now uses exceptions, so should not check return values. 2011-02-12 00:40:43 +00:00
Tim Hunt
f9b0500f7f MDL-20636 Quiz editing now works, as does the random question type.
However, all this needs more testing.

Also, a bit of a purge of training whitespace and global .
2011-02-10 20:50:18 +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
7a7197482d MDL-20636 Fix if the use of the File API so images work in questions. 2011-01-13 18:35:57 +00:00
Tim Hunt
c76145d3e4 MDL-20636 Previewing a truefalse question in deferred feedback mode now works. 2011-01-13 18:35:43 +00:00
Tim Hunt
2b7da64586 MDL-20636 It is now possible to save a truefalse question you have created.
This includes all the necessary DB upgrades.

Also all unit tests in question/type/simpletest and question/type/truefalse now pass.
2011-01-13 18:35:41 +00:00
Tim Hunt
f29aeb5afd MDL-20636 converstion of questionlib.php and base questiontype.php, plus other cheanges required to get the question editing page to display. 2011-01-13 18:35:37 +00:00
Tim Hunt
b80d424c50 question export MDL-25324 Better file names for question exports. 2010-11-19 11:02:28 +00:00
Tim Hunt
9203b70576 question deletion MDL-25173 when a question is deleted, all the associated files must be deleted. 2010-11-12 11:29:53 +00:00
Tim Hunt
5d548d3e0a question bank MDL-24995 clean up a lot of deprecated code to do with moving questions around.
This should also fix MDL-25172, MDL-23021 and MDL-23073. In other words, moving questions between categories should now work.
2010-11-11 21:54:22 +00:00
Tim Hunt
a9efae50e3 question upgrade MDL-16094 fix up earlier mistakes in the text format upgrade.
There was a mistake in the text format upgrade in the question bank. The wrong conversions were performed, and the wrong arguments were passed to text_to_html in the conversions that were done.

Also, not all the calls to format_text had been updated to use the values in the new format columns.

I think this change fixes everything, but I have only had very limited time to test it. I am committing it anyway, because that seems to me to be the best way to maximise testing. I think that the new code is certainly better than the old code was.
2010-11-11 17:32:25 +00:00
Tim Hunt
855f9c3930 question bank MDL-24312 problem when deleting a course with orphaned categories.
When there was a question category whose parent had somehow been deleted from the question bank, while the child category was still there, then that gave an error because a DB query was still referring to the question_categories.courese coloumn, that was changed to contextid in moodle 1.9.

Fix thanks to Mahmoud Kassaei.
2010-11-08 15:55:45 +00:00
Tim Hunt
4673212416 xml import/export MDL-25103 was not working due to out-of-memory errors when calling xmltidy, which broke XML wellformedness.
The solution is to not tidy the XML. The XML generated is already quite well laid out, and if we want it better, we should fix that, rather than trying to load the whole file into memory to reformat it.

Also, while investigating this, I found that we were not handling the mime-type of the exported file very elegantly, so I added a new mime_type method (defaults to getting the mime type of the file extension).
2010-11-08 15:51:10 +00:00
Dongsheng Cai
cde2709a88 MDL-15573, question export rewrite 2010-11-05 06:34:00 +00:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Petr Skoda
c6947ba7a5 MDL-23899 migration to new locale aware asort 2010-09-05 13:00:47 +00:00
Petr Skoda
f685e83030 MDL-14679 fixed remaining old style set_field()s 2010-09-03 18:14:55 +00:00
Petr Skoda
0c3c54934a MDL-23784 converted question types to use new pix API and locations 2010-08-12 19:01:28 +00:00
Dongsheng Cai
fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +00:00
Tim Hunt
f23f98dd63 question flags MDL-22643 Manually commenting should not reset the flag state. 2010-08-04 18:56:51 +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
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Petr Skoda
792881f0fe fixed some comment typos 2010-07-22 09:43:30 +00:00
Tim Hunt
8942639bae question bank: MDL-22710 Quesition preview popup does not have scrollbars
Fix thanks to Adriane Boyd.
2010-06-25 16:29:16 +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
06f87d2f57 quiz: MDL-15452 fix themes breakage found when preparing my MoodleMoot talk. 2010-05-01 08:14:32 +00:00
Tim Hunt
59be14de39 questionlib: MDL-21828 Fix database query that does not work in Oracle.
Bug report and fix thanks to David Binney.
2010-04-07 09:47:19 +00:00
David Mudrak
16be897441 MDL-21652 html_table rendering refactored
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
2010-03-20 22:15:54 +00:00
Petr Skoda
94fa6be479 MDL-20204 more single_selects converted 2010-02-10 11:51:49 +00:00
Tim Hunt
0b8506ec85 question state loading MDL-9327 and MDL-19114 fix loading the state of ungraded essay questions
In two situations, the correct state was not being loaded for essay questions that had
not yet been manually graded:
1. When starting a subsequent attempt in each attempt builds on last mode.
2. In the quiz reports.

This commit fixes the problem. It has one other side-effect. When viewing the individual
question grades in the overview report for an attempt that is still in progress, the
information displayed will be slightly different. This only affects adaptive mode quizzes,
and will acutally cause the report to show slighly more up-to-date information.

Interestingly, the reportlib.php change had already been made in HEAD, as part of MDL 16529
2010-02-05 16:37:01 +00:00
Petr Skoda
9dec75dbcc MDL-21240 shortened urls now start with / everywhere 2010-01-18 20:57:32 +00:00
Petr Skoda
8afba50b84 MDL-21233 get_query_string() is definitely not recommended in new code, instead use moodle_url constructors with proper parameters; removed some more legacy url concatenation operations; realized out_action is not needed often, because we shoudl pass arounf moodle_url instances instead of old url strings 2010-01-17 10:54:13 +00:00
Petr Skoda
6770330d17 MDL-21235 support for optgroups in select 2010-01-16 19:48:01 +00:00
Petr Skoda
b5d0cafc6f MDL-20787 final switch to new $OUTPUT->pix_url() - yay! 2009-12-16 21:50:45 +00:00
Petr Skoda
f44b10ed93 MDL-21139 replace all yui functions/methods with yui2 to make room for yui3 2009-12-16 20:25:14 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
nicolasconnault
3bd6b994fc MDL-19799 Upgraded calls to link_to_popup_window() 2009-08-20 13:18:08 +00:00
nicolasconnault
642816a60c MDL-19799 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno 2009-08-20 08:50:50 +00:00
nicolasconnault
aa9a686740 MDL-19799 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:20:12 +00:00
nicolasconnault
7b1f2c829f MDL-19756 Renamed moodle_select to html_select for better API consistency 2009-08-10 08:38:45 +00:00
nicolasconnault
641454c6b2 MDL-19799 Upgraded calls to choose_from_menu_nested 2009-08-06 00:35:06 +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
ddedf979b4 MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-03 06:19:25 +00:00