47566 Commits

Author SHA1 Message Date
David Mudrak
c5c315e2a7 MDL-27718 Migrate files embedded in the activity intro fields
Contains various fixed spotted through the way, too.
2011-06-05 17:37:58 +02:00
David Mudrak
fa30779b70 MDL-22414 Fixed the convert_path data handling 2011-06-05 16:17:23 +02:00
David Mudrak
718f781690 MDL-27718 Files embedded into the course summary and section summaries are migrated during the conversion 2011-06-04 23:34:26 +02:00
David Mudrak
02e9095677 MDL-27448 IMS content package module conversion improved
The files embedded into the intro field and the backup of the original
content package are migrated now, too.
2011-06-04 22:12:47 +02:00
David Mudrak
85d91b6a1b MDL-27448 Do not stop conversion because of missing course files 2011-06-04 22:11:03 +02:00
David Mudrak
baa44e3d3d MDL-27448 Simplified migration of the files embedded in the resources HTML texts 2011-06-04 21:13:56 +02:00
David Mudrak
afb4494bd0 MDL-27448 URL resource module backup conversion improved
The patch also fixes invalid 'course' field in moodle2 backup code.
2011-06-04 21:04:02 +02:00
David Mudrak
c39226d9b2 MDL-22414 Added a helper method to migrate all files referenced from a hypertext 2011-06-04 21:03:11 +02:00
David Mudrak
351bf4826c MDL-27448 Improved resource module converter 2011-06-04 20:03:28 +02:00
David Mudrak
aa97e0dd52 MDL-22414 File manager allows to set explicit sortorder and accepts filepaths not ending with a slash
We want to set migrated content file in the File module as a main file.
Main files are files with sortorder set to 1. Therefore the file manager
must provide a way to set the sortorder property of the new file record.

The second change allowing filepaths not ending with slash is a helper
as we can easily use dirname() as a value (see the usage in the next
commits). Not providing the dirname() was a bug as the reference to a
file in the HTML text did not respect the migrated file path.
2011-06-04 20:02:03 +02:00
David Mudrak
93dd33b405 MDL-27448 Folder module conversion improved 2011-06-04 18:28:58 +02:00
David Mudrak
9b2ab50d27 MDL-27448 Page module conversion improved 2011-06-04 18:28:35 +02:00
David Mudrak
9e3e8c8004 MDL-27448 Changed the interface of resource module successors to make it clear they are a special case 2011-06-04 16:11:59 +02:00
David Mudrak
48fcecffb6 MDL-27448 Page module conversion fixed and improved
The embedded files are now converted into the proper file area on the
conversion. The previous usage of $CFG->wwwroot/file.php was wrong for two
reasons: (1) the moodle.xml does not (should not) contain these links but
$@FILEPHP@$ placeholder and (2) even if it did, we could not compare to
our wwwroot but to the original wwwroot.

Also fixed the actual list of fields being written into page.xml - the
previous version included legacy fields (like type, reference and
friends).
2011-06-04 14:43:04 +02:00
David Mudrak
b2e905102a MDL-27448 Pretty pedantic fix of using spaces in the code 2011-06-04 14:42:07 +02:00
David Mudrak
9b5f831803 MDL-27448 Added common base class for all resource module successors 2011-06-04 14:38:41 +02:00
David Mudrak
d61ed0afdc MDL-22414 Added possibility to explicitly reset the list of migrated files by a file manager instance 2011-06-04 14:29:39 +02:00
David Mudrak
904888daee MDL-27448 Resource intro (legacy summary) field converted consistently by the resource handler 2011-06-04 13:24:03 +02:00
David Mudrak
069b5b80c4 MDL-27448 Fixed copyright and phpdoc info 2011-06-04 13:24:03 +02:00
David Mudrak
56bd82cceb MDL-27448 IMS content package converter checks that the manifest file exists 2011-06-04 13:24:03 +02:00
Andrew Davis
5da3af58a0 MDL-27448 resource conversion support to restore 1.9 backup to 2.1 2011-06-04 13:24:03 +02:00
David Mudrak
c818e2df49 MDL-22414 Added helper methods to migrate files referenced by $@FILEPHP@$ 2011-06-04 13:22:27 +02:00
David Mudrak
d73c82e791 MDL-22414 Getting rid of a relict method copied from restore subsystem 2011-06-04 11:46:31 +02:00
David Mudrak
a78b139ce6 Merge branch 'master' into backup-convert 2011-06-03 23:22:23 +02:00
David Mudrak
db6491bf9e Merge pull request #10 from nebgor/MDL-27451
MDL-27451 Backup - added 1.9 backup conversion handler for wiki
2011-06-03 14:15:26 -07:00
David Mudrak
c15649fbd2 MDL-27626 random question conversion support 2011-06-03 22:59:13 +02:00
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
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
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
Eloy Lafuente (stronk7)
a56c68e3f4 weekly release 2.1dev 2011-06-02 23:35:35 +02: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