43 Commits

Author SHA1 Message Date
Andrew Nicols
2c2f4f17c3 MDL-24343 core: Deprecate unzip_file 2016-08-03 09:05:55 +08:00
Skylar Kelty
5b8e7b9564 MDL-50280 WebCT import scripts don't always clean up 2015-05-18 15:25:18 +01:00
Jean-Michel Vedrine
129f3c5190 MDL-47180 qformat_webct: Import of calculated questions broken 2014-09-23 14:45:07 +02:00
Tim Hunt
57944b7a54 MDL-46195 fix error handling. 2014-09-08 22:27:36 +01:00
Tim Hunt
38cde336ca MDL-46195 Fix fractionsaddwrong string component in lesson & qformat_webct.
I know. You should not refer to strings from other plugins, but

* qformat_webct is importing multichoice questions in that bit of code.
  I suppose a pedant would say that qformat_webct should declare dependencies
  on all the qtypes it relies on, but that would be silly.

* Lesson should be using the question engine, rather than doing its own thing.
2014-09-06 20:20:58 +01:00
Tim Hunt
66de66fe6a MDL-46148 qtype_calculated: fix validation when importing.
In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

1. Previously, qtype_calcuated used ->answeres when importing, and
->answer when saving the form. This was crazy, so I fixed it, and
stripped out the code that made the alternative variable name work.

2. Similarly, it could handle ->answer being either an array, such as
you would get form the HTML editor, or a simple string, which is what
you get form the form. I simplified that too.

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
2014-07-09 13:35:09 +01:00
Tim Hunt
f4fe3968a2 MDL-46212 questions: add {} whenver vars are put into "" strings
Having had one subtle bug cased be this, I decided to do a search and
fix all of these.
2014-07-03 14:02:39 +01:00
Sam Hemelryk
78c12cdb0f MDL-43365 lib: converted text and plugin deprecated classes to new scheme
Four core library classes renamed for autoloading with deprecated stubs
have been converted to the new scheme for autoloading.
They are:

 * textlib
 * collatorlib
 * plugin_manager
 * plugininfo_base

These will be removed in 2.9 by MDL-46124
2014-06-25 09:30:38 +12:00
Kyle Temkin
a4f765eb1d MDL-39756 add advanced attachment options to essay question type
Adds a set of options to the essay question type which implement
the following new features:

-Adds an input format which accepts only file uploads, and no
 inline text.
-Adds an option to make the inline text response optional when
 attachments are enabled, so students can choose to upload
 an essay file.
-Adds an option to make attachments required, so essays without
 attachments will be marked incomplete.
2014-01-15 12:43:04 -05:00
Jean-Michel Vedrine
398dc6a3ab MDL-30001 WEBCT Import does not work for 2.0 2013-08-08 07:43:43 +02:00
Jean-Michel Vedrine
d2fd7262af MDL-39404 Update question/format files to match codechecker standards 2013-07-26 21:32:34 +02:00
Tim Hunt
cacb8fa08a MDL-34841 error importing questions with long names.
The problem was with the non-UTF-8-safe way that a question name
was being constructed from the question text.

I have done a proper fix with methods in the base class to
carefully construct a question name that is reasonable, and
which will fit in the database column. Then I have changed all
importers to use the new methods.

I also remembered not to break the lesson in the process.
2012-09-11 15:04:00 +01:00
Tim Hunt
e231a3ffa2 MDL-27799 question bank: remove last traces of qtype constants.
Using consants to refer to plugin names is crazy. The whole point of
plugins is that you can install more, hence the list of constants will
never be complete.
2012-08-30 13:15:52 +01:00
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
Petr Skoda
e2bb3c9275 MDL-32094 some more E_STRICT fixes 2012-03-18 20:40:20 +01:00
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01: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
49e2bba7cc MDL-20636 Merge import/export formats. XML is not finished (unit test failures). 2011-01-17 18:01: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
nicolasconnault
6dbcaceef1 MDL-19418 Replaced ereg* by preg* 2009-06-22 01:22:37 +00:00
skodak
294ce9870f MDL-15189 magic quotes finally removed 2008-06-09 16:53:30 +00:00
dongsheng
0be2c85848 "MDL-14129, fix print_error call" 2008-05-21 07:53:23 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
pichetp
7ba1111637 Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:38:02 +00:00
thepurpleblob
c56abad900 MDL-10680:
subquestions/subanswers needed swapped for matching questions

Merged from STABLE_18
2007-08-01 13:44:35 +00:00
pichetp
d1c432e207 adding more validation and a dummy subquestion in MATCH if there is only 2 subquestions. 2007-05-08 19:19:09 +00:00
poltawski
a044c05ddb MDL-9742 - changed tabs to spaces in a few places where there are one
or two
2007-05-08 15:07:25 +00:00
pichetp
eeea21878d adding calculated question import MDL-5650 2007-05-07 04:01:20 +00:00
tjhunt
53a4d39f1c Clean up whitespace. 2007-04-24 23:26:48 +00:00
pichetp
41a89a0748 Give the question bank code sensible PHPdocumentor package names. 2007-03-20 02:10:26 +00:00
pichetp
fde0ef3922 merging from 18 STABLE 2007-03-09 05:50:55 +00:00
pichetp
46551466d8 modifs MDL-5650 2007-03-09 05:28:40 +00:00
pichetp
f0ee68f738 first modifications MDL-5650 2007-03-07 16:31:58 +00:00
tjhunt
2962ad61e4 Put back spaces in code that Martin Dougiamass stripped out of the lang strings without thinking about the consequences. Merged from MOODLE_17_STABLE. 2006-11-28 18:42:18 +00:00
tjhunt
717cfb0a7b Rename column question_dataset_items->number to itemnumber, to avoid reserved word. 2006-09-19 10:56:00 +00:00
thepurpleblob
36e2232e27 Merged from STABLE. 2006-05-13 08:49:46 +00:00
gustav_delius
32a189d636 More renamings to separate questions from quiz. Some other small fixes. 2006-03-12 21:17:42 +00:00
gustav_delius
f5565b6969 Removing some more references to quiz from import/export code 2006-03-01 07:36:09 +00:00
thepurpleblob
84769fd8a8 Moving quiz import/export files to new question area. 2006-02-24 15:14:09 +00:00