Commit Graph

94 Commits

Author SHA1 Message Date
Tim Hunt 4d18892676 MDL-32220 question import: files sometimes stored in the wrong context.
Sadly, this involves a small API change, but I don't believe anyone was
using the argument I had to remove (because we were sometimes passing a
wrong value, and there is not way to compute the right value at that
point in the code.)

Also sadly, the code to compute the context we are importing into is now
rather spaghetti-like, but it works.
2012-03-29 14:13:28 +01:00
Eloy Lafuente (stronk7) a1ef8c6d3c MDL-28364 whitespace fixes 2012-03-07 04:00:39 +01:00
Jonathon Fowler 7da7bfa17d MDL-28364 handle question formats that support multiple file types 2012-02-28 09:39:06 +10:00
Tim Hunt 7e7fdf59c6 MDL-29060 q export: writefiles should be public write_files & belongs to XML format. 2011-11-20 11:49:41 +00:00
Tim Hunt 08f5328659 MDL-28639 question import should set timemodified and modified by.
Thanks to Jean-Michel Vedrine for the fix.
2011-08-15 14:55:50 +01:00
Tim Hunt 45bdcf1134 MDL-28438 Aiken question import broken since MDL-24594. 2011-08-15 14:44:57 +01:00
Tim Hunt 55190d7e2c MDL-20538 get rid of badly name-spaced constants from lib/questionlib.php.
Unfortunately, they are used all over the import/export code, so I cannot eliminate them completely. However, I was able to move them out of the core library.
2011-06-09 19:27:36 +01:00
Tim Hunt e198992b20 MDL-27747 Fix a lot of coding style issues in question/format.php 2011-06-07 14:04:24 +01:00
Tim Hunt 92111e8d2c MDL-27747 questions remove all references to the recently deprecated get_grade_options() 2011-06-07 14:00:07 +01:00
Tim Hunt e0736817f0 MDL-20636 fix some more coding style issues in the question code. 2011-05-20 18:50:41 +01:00
Tim Hunt 9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt 7348402f33 MDL-20636 A few more publics. 2011-03-23 16:40:19 +00:00
Tim Hunt c7df5006b9 MDL-20636 Add lots of missing public/protected/private. 2011-03-23 16:22:25 +00:00
Tim Hunt c73c98365b MDL-20636 Question import, support for files in hints.
Also fix some minor bugs and unit tests.
2011-03-23 14:27:22 +00:00
Tim Hunt 22cebed503 MDL-20636 Review and fix the format parameter to all calls to format_text. 2011-02-24 20:18:16 +00: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 5e8a85aa64 MDL-20636 Massively reduce the number of references to quiz in the question code.
This mostly involves moving lang strings around, but I don't have time to do an AMOS script now.
2011-02-23 18:53:50 +00:00
Tim Hunt f7970e3ca7 MDL-20636 Eliminate integer and boolean in PHPdoc comments. should be int and bool. 2011-02-23 16:25:25 +00:00
Tim Hunt a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +00:00
Tim Hunt d3603157bf MDL-20636 Add @package and GPL boiler-plate to files in /question. 2011-02-22 19:59:12 +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 49e2bba7cc MDL-20636 Merge import/export formats. XML is not finished (unit test failures). 2011-01-17 18:01:49 +00:00
Tim Hunt 06f1bd03be question XML import/export MDL-18916 Fix import of questions with images exported from Moodle 1.9.
Thanks again to Patrick Pollet
2010-11-19 14:24:18 +00:00
Tim Hunt 4f2900771d question XML import/export MDL-18916 should include question tags. 2010-11-19 12:33:48 +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 9dd460390c question import MDL-25200 was ignoring the category specified in the file. 2010-11-15 15:27:24 +00:00
Tim Hunt 13bb604ed5 question export MDL-25088 this is the first part. I think question export is now working for all types.
Import to follow soon.
2010-11-12 12:06:48 +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 7f38934243 MDL-24321 switching to stdClass in /question/ - I am sure Tim will be very happy 2010-09-21 08:20:46 +00:00
Petr Skoda 07ea95609a fixed time limit 2010-09-18 11:41:16 +00:00
Petr Skoda aab03169d7 MDL-24058 fixing docs 2010-09-02 12:41:58 +00:00
Petr Skoda bec167f34a MDL-16094 preventing execution of question code that is trying to access dataroot files - we must use new api instead 2010-08-29 10:00:18 +00:00
Dongsheng Cai fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +00:00
Tim Hunt 728d60a1f6 question import/export: MDL-22100 ' / etc. in category names confuse the import/export. 2010-07-02 13:36:49 +00:00
Petr Skoda aeb15530b8 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 11:57:52 +00:00
tjhunt 88bc20c30f question types: MDL-20157 export_to_xml and import_from_xml functions for question types using extra_question_fields.
Thanks to Oleg Sychev for the implementation.
2009-09-30 13:38:36 +00:00
nicolasconnault fef8f84e4b MDL-19822 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:19:00 +00:00
nicolasconnault 6dbcaceef1 MDL-19418 Replaced ereg* by preg* 2009-06-22 01:22:37 +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
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
thepurpleblob 10b4a508ae MDL-18579:
Provide nicer message if 'Stop on error' is selected and errors are found.

Merged from STABLE_19
2009-03-18 11:15:51 +00:00
tjhunt 0cd465770f MDL-7010 - followup - quiz config settings were referred to in two places in the question bank. Since these settings are now in config_plugins, the references need to be update. (Of course, perhaps these should not be referred to at all ...) 2008-09-10 02:44:21 +00:00
thepurpleblob 73b7b195ed MDL-16198
Blackboard V6+ can now handle the .dat file directly as an option to the .zip file
Some changes needed to recover the original filename.

Merged from STABLE_19
2008-08-28 13:49:25 +00:00
tjhunt 1b8b535dda MDL-11905 - Users with the capability to export questions may not have the capability to access backupdata. Therefore we need to change where question export files are stored. Merged from the 1.9 stable branch.
Note that once the file API is finished, this will have to be redone. I have created MDL-15573 for that.
2008-07-08 11:23:31 +00:00
thepurpleblob 5ca9e32d97 MDL-13010
Now correctly checks for category context id and does not fail if it isn't there.

Merged from STABLE_19
2008-07-03 14:50:30 +00:00
dongsheng d9f30321da "MDL-14129, fix print_error" 2008-06-15 11:07:51 +00:00
thepurpleblob e5d7d1dc02 MDL-15229
Fixed incorrect options array for DB call
2008-06-13 10:52:58 +00:00