Commit graph

48213 commits

Author SHA1 Message Date
David Mudrak
0e3a69b0e5 MDL-22414 Provided a work around MDL-27713
Currently the underlying backup/restore code does not differentiate null
and empty array data. So we have to explicitly check that we got array,
even though the correct set_stash() was called.
2011-06-03 22:45:46 +02:00
David Mudrak
c0e3796e1b MDL-27626 calculated qtype conversion support
uff...
2011-06-03 21:57:00 +02:00
David Mudrak
aaf88d2cb2 MDL-27626 numerical_options are written only if there are some numerical_units available
This reflects the logic of the backup 2.0. Previously, the new
numerical_options structure was written always, even if there were no
numerical_units.
2011-06-03 21:56:59 +02:00
David Mudrak
0a562bafd1 MDL-27626 matching question type conversion handler 2011-06-03 21:56:59 +02:00
David Mudrak
23007e5d27 MDL-22414 Fixed wrong usage of static caches
These static caches were bad idea of mine. Multiple conversion jobs
executed from a single PHP script share such variables, of course, which
is wrong. This patch removes one static cache completely and
reimplements the other two static caches as normal member variables.
2011-06-03 21:54:13 +02:00
David Mudrak
38bce21a9e MDL-22414 Fixed the id generation entropy 2011-06-03 18:54:57 +02:00
David Mudrak
cd92d83bf2 MDL-22414 Added new method to get the list of existing stashes 2011-06-03 18:54:57 +02:00
David Mudrak
a4158f8d93 MDL-27626 Make sure that the <answers> structure is present before converting it
This corresponds the logic of question_backup_answers()
2011-06-03 18:54:57 +02:00
David Mudrak
7cfff0ccfb MDL-27626 multianswer (embedded, cloze) question type conversion handler 2011-06-03 18:54:57 +02:00
David Mudrak
589475665e MDL-27626 numerical question type conversion handler 2011-06-03 18:54:56 +02:00
David Mudrak
f75ad8d776 MDL-27626 moodle1_qtype_handler now provides helper methods for numerical_units and numerical_options 2011-06-03 18:54:56 +02:00
David Mudrak
1056c9b914 MDL-22414 Fixed moodle1_xml_handler::write_xml() attributes handling
The attributes did not work for nested elements because of the missing
slash.
2011-06-03 18:54:51 +02:00
Mary Evans
5d224075ae MDL-27704_master Fix for Overlapping problems in Fusion theme 2011-06-03 17:41:39 +01:00
David Mudrak
513e2215c6 MDL-27626 The test file with questions now contains numerical units in numerical qtype 2011-06-03 18:06:35 +02:00
David Mudrak
afa08aeb15 MDL-27626 essay question type conversion handler 2011-06-03 18:06:34 +02:00
David Mudrak
2b129b4cb6 MDL-27626 truefalse question type conversion handler 2011-06-03 18:06:29 +02:00
David Mudrak
2554f389d4 MDL-27626 shortanswer question type conversion handler 2011-06-03 18:06:28 +02:00
David Mudrak
7ffc82df8b MDL-27626 multichoice question type conversion handler 2011-06-03 18:06:28 +02:00
David Mudrak
22b8486fe6 MDL-27626 moodle1_qtype_handler now provides a helper method for answers structure conversion 2011-06-03 18:06:27 +02:00
David Mudrak
1ff4b8dec0 MDL-27626 moodle1_qtype_handler::process_question() is not supposed to return anything
Returning the converted array has no benefit here and makes the things
more complicated. From now on, the method is supposed to write what it
needs directly into the opened file, without returning anything.
2011-06-03 18:06:27 +02:00
David Mudrak
e19d0c109c MDL-27626 The initial support for the question bank backups conversion
This patch introduces a framework for the question bank conversion. It
deals with the common question data (that are not qtype-specific) and
the way how to make sure that the qtype plugins have access to the paths
they are interested in.
2011-06-03 18:06:27 +02:00
Mary Evans
3ae75b44c7 MDL-27692_master Fixes issue - bullets not numbers in ordered list... 2011-06-03 12:11:09 +01:00
Aparup Banerjee
61ff1fecc3 MDL-27451 Backup - added 1.9 backup conversion handler for wiki 2011-06-03 15:09:15 +08:00
David Mudrak
0f5860f707 Merge pull request #11 from nebgor/MDL-27447
MDL-27447 mod_quiz backup conversion
2011-06-02 23:08:12 -07:00
Dongsheng Cai
12c9bbbdd2 MDL-26392 WIKI added file managment support to wiki editor 2011-06-03 11:22:18 +08:00
Rajesh Taneja
6a0bf5c4b0 MDL-27577 moodlelib - fixed dst offset in userdate, usergetdate and make_timestamp functions 2011-06-03 09:50:38 +08:00
Eloy Lafuente (stronk7)
a56c68e3f4 weekly release 2.1dev 2011-06-02 23:35:35 +02:00
Ruslan Kabalin
8e26531519 MDL-27171 messages: add processor uninstall function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-02 09:27:05 +01:00
David Mudrak
78d22af957 Fixed error/required_not_stashed_data when the backup does not contain course_files 2011-06-02 09:05:59 +02:00
Aparup Banerjee
4b2da7cee0 MDL-27447 Backup - improvements to 1.9 quiz backup converter 2011-06-02 10:35:08 +08:00
Aparup Banerjee
63e9bb60e6 MDL-27447 Backup - added quiz module 1.9 backup converter 2011-06-02 10:35:08 +08:00
David Mudrak
034b0e4a30 Fixed applying convert_path recipes on sub-paths of grouped elements
Grouped elements contain arrays with the sub-paths. This patch makes
sure that the sub-paths are pre-cooked recursively. However because the
recipes do not distinguish the full path to the element, only the
implicit recipe (making the tags lowecase) is applied. To avoid
potential data loss (for example dropfields recipe would delete all
fields from the whole grouped tree, not only the direct descendants of
the path where the recipe is declared), explicit recipes are forbidden
for grouped elements. The developer has to convert the $data manually as
needed.
2011-06-02 03:26:52 +02:00
Ruslan Kabalin
d004c4b20a MDL-27171 messages: fix bug in upgrade_populate_default_messaging_prefs
isset check assumed that $defaultpreferences is the object

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-01 12:30:28 +01:00
Ruslan Kabalin
afed8d0f17 MDL-27652 messages: introduce message_update_processors
This function populates default message preferences for all existing providers
when the new message processor is added.

The change also includes update of message_set_default_message_preference to
make possible using it for particular message processor update.

install_populate_default_messaging_prefs() is no longer needed and depricted.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-01 12:02:37 +01:00
Ruslan Kabalin
67147c2550 MDL-27171 messages: populate messaging defaults after the installation
This makes the order of plugins returned by get_plugin_types not important as
all messaging defaults population is done at the end.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 16:00:32 +01:00
Ruslan Kabalin
60bbe7684a MDL-27171 messages: meet require_once usage gudelines
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 15:16:17 +01:00
Ruslan Kabalin
a4de1d8f0e MDL-27171 messages: remove excessive include_once
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 14:02:37 +01:00
Ruslan Kabalin
838075147b MDL-27171 messages: some minor fixes in translate_message_default_setting function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 13:55:57 +01:00
Ruslan Kabalin
bf0fb77293 MDL-27171 messages: avoid using depricated notification method.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 12:26:15 +01:00
Ruslan Kabalin
72e6af0344 MDL-27171 messages: fix static variable filtering bug in get_message_processors
Static $processors should contain the full list of processors only, when
filtering is required, the $processors variable should not be updated.

Lambda function refactoring is made as well.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 11:18:11 +01:00
Ruslan Kabalin
298925d4d1 MDL-27171 messages: clean up pereferences on message provider removal
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 10:55:30 +01:00
Ruslan Kabalin
31afb0a437 MDL-27171 messages: recover message_update_providers backward compatibility
'return true' was removed by mistake

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 10:05:39 +01:00
Sam Hemelryk
e455bdb3d7 MDL-27638 Removed buggy status line from query as it is being calculated in php anyway 2011-05-31 17:02:17 +08:00
Ruslan Kabalin
e8fc7940a8 MDL-27171 messages: $defaultpreferences is an object, use isset instead.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 09:46:22 +01:00
Dan Poltawski
b46ca3d7ae messaging: MDL-27171 - change variable with underscores 2011-05-31 09:07:38 +01:00
David Mudrák
193407a096 Merge pull request #9 from nebgor/MDL-27449
MDL-27449 SCORM module 1.9 converter
2011-05-30 23:35:26 -07:00
Sam Hemelryk
e5824bb9c6 MDL-25394 Tidied up several things in order to get this integrated 2011-05-31 14:28:03 +08:00
Anthony Forth
37959dd471 MDL-25394 Improved support for mobile and device themes 2011-05-31 14:25:52 +08:00
Aparup Banerjee
a1cac902ec MDL-27449 Backup - migrating scorm file within scorm module 1.9 backup converter 2011-05-31 11:29:48 +08:00
David Mudrák
ba1e221a0d Merge pull request #7 from rwijaya/MDL-27441b
MDL-27441 mod_feedback 1.9 backup conversion
2011-05-30 16:26:18 -07:00