1651 Commits

Author SHA1 Message Date
Sun Zhigang
858d100fa3 MDL-27833 Backup - Fix can't search courses with non-latin characters during importing
PARAM_ALPHANUMEXT filter out all non-latin characters, including
Chinese, Japanese and etc. Use PARAM_NOTAGS instead.
2011-07-07 10:39:47 +02:00
Tim Hunt
6b92faa47f MDL-27821 backup_exception should not throw away debug info. 2011-07-04 15:35:30 +01:00
Eloy Lafuente (stronk7)
c5b0344b62 Merge branch 'MDL-28152-course-grade-category' of git://github.com/mudrd8mz/moodle 2011-07-01 22:33:04 +02:00
David Mudrak
41f21f92cf MDL-28152 Improved detection of the course grade_category on course restore 2011-07-01 22:12:30 +02:00
Eloy Lafuente (stronk7)
7ace3a2199 Merge branch 'MDL-28006-convert-gradebook' of git://github.com/mudrd8mz/moodle 2011-07-01 00:09:50 +02:00
Eloy Lafuente (stronk7)
b1273d09dd Merge branch 'MDL-28116-master' of git://github.com/sammarshallou/moodle 2011-06-30 23:56:53 +02:00
David Mudrak
d46badb176 MDL-28006 restore - improved handling of gradebook 1.9 backups
On contrary from a backup created in 2.0, the file gradebook.xml in the
converted MBZ can contain the course grade_item without the
corresponding grade_category record which is something restore_stepslib
did not expect. This patch fixes two places:

1) the gradebook restore does not use mapped itemid but calls
grade_category::fetch_course_category() to get the actual category to
link the course_item with

2) after_execute makes sure that the mapping actually exists before
trying to move the activities from the default root category
2011-06-30 22:40:54 +02:00
sam marshall
c02b60bccc MDL-28116 Fix issue restoring old backups with duplicate completion rows 2011-06-30 17:33:12 +01:00
David Mudrak
3343677e0a MDL-28006 Fixed grades subpath handling
Registering the grades subpath even if we do not process the grades yet.
This is to prevent from incorrect considering the wrapper as an empty tag.
2011-06-30 15:17:03 +02:00
Sam Hemelryk
54ae8ed032 Merge branch 'MDL-24684_master' of git://github.com/stronk7/moodle 2011-06-30 10:49:29 +08:00
Eloy Lafuente (stronk7)
b7a45fa782 MDL-24684 backup - basic protection against time/memory limits 2011-06-30 03:37:30 +02:00
Eloy Lafuente (stronk7)
f0548d18bf Merge branch 'MDL-28035' of git://github.com/timhunt/moodle 2011-06-29 20:47:16 +02:00
Eloy Lafuente (stronk7)
fae9cd077c Merge branch 'MDL-28037' of git://github.com/timhunt/moodle 2011-06-29 20:44:49 +02:00
Sam Hemelryk
7bbf41661b MDL-27988 backup grade: Calculated grade items calculation references now corrected and idnumber restore improved 2011-06-29 15:26:48 +08:00
David Mudrak
af66e7fea3 MDL-28006 code cleanup - there is nothing to do for grade_settings 2011-06-29 09:08:25 +02:00
David Mudrak
ddefec8d14 MDL-28006 moodle1 converter supports outcomes 2011-06-29 08:55:43 +02:00
David Mudrak
d98100e407 MDL-28006 moodle1 converter supports grade letters 2011-06-29 01:06:59 +02:00
David Mudrak
cfab209904 MDL-28006 moodle1 converter supports grade categories and non-module grade items 2011-06-29 01:06:10 +02:00
David Mudrak
544e0d5972 MDL-28006 moodle1 converter supports activity module grade items 2011-06-29 00:11:05 +02:00
David Mudrak
acc9a7b9e2 MDL-28006 moodle1 converter provides new get_stash_or_default() method 2011-06-29 00:11:05 +02:00
David Mudrak
477f1d2b78 MDLQA-1147 Fixed a typo in the exception class name
Thanks Steve Turley for spotting and reporting this during the QA.
2011-06-29 00:10:59 +02:00
Tim Hunt
50de6ad083 MDL-28037 Make restoring quiz_attempts more robust.
Don't assume that 0 is unique (even temporarily).
2011-06-27 18:27:12 +01:00
Tim Hunt
0366ef262a MDL-28035 problems with upgrade/restore of ataptive quizzes from 2.0
There were two main problems:

1. The unit tests for upgrading adaptive quiz attempts had slighly the
wrong $expectedqa, and so matching that the upgrade was doing the wrong
thing in certain situations. The main issue was that it was setting
-_try = 1 on the first step, which broke the penalty calculation when
the quiz was regraded. There were also some other subtleties with
incrementing -_try that were not right before.

2. It was possible in 2.0 and earlier for two question_states to get the
same seq_number, and restoring 2.0 backups was rashly assuming that that
was unique.
2011-06-27 17:10:02 +01:00
Eloy Lafuente (stronk7)
f1231efec4 MDL-28038 backup - bump 2011-06-26 19:15:06 +02:00
Eloy Lafuente (stronk7)
beae4a6684 MDL-25811 automated backups - clean running status after 90 mins of inactivity 2011-06-21 02:41:12 +02:00
Eloy Lafuente (stronk7)
8edbfba909 Merge branch 'MDL-24594_wip' of git://github.com/timhunt/moodle 2011-06-20 12:48:55 +02:00
Tim Hunt
f263d4935f MDL-27913 Stray whitespace in backup. 2011-06-17 19:37:20 +01:00
ppichet
2a6c5c52ee MDL-24594 qtype_multichoice should allow images in the choices.
This change was massively re-worked by Tim Hunt to update Pierre Pichet's original patch for Moodle 2.0 to work in Moodle 2.1.
2011-06-17 18:41:13 +01:00
Eloy Lafuente (stronk7)
28e23ea737 fix permissions 2011-06-16 19:06:07 +02:00
Eloy Lafuente (stronk7)
a16e137f21 Merge branch 'MDL-27639_wip' of git://github.com/timhunt/moodle 2011-06-15 01:30:59 +02:00
Eloy Lafuente (stronk7)
ee1235e7af Merge branch 'backup-convert' of git://github.com/mudrd8mz/moodle 2011-06-14 22:38:27 +02:00
Tim Hunt
98a3898efc MDL-27849 fix qtype_multianswer attempt data restore (2.1 -> 2.1).
Also, refactor calculatedmulti restore to avoid duplication.
2011-06-14 15:17:50 +01:00
Tim Hunt
18ab06bac5 MDL-27639 restore of attempt data from 2.0 - first attempt.
This is now at the stage where it mostly appears to work, at lease on
one backup file.
2011-06-14 12:11:19 +01:00
Eloy Lafuente (stronk7)
25b4558c40 MDL-27822 rename new methods 2011-06-14 00:33:16 +02:00
Tim Hunt
be7b29eff6 MDL-27822 old module version should be available in restore_activity_structure_step::define_structure() 2011-06-14 00:30:30 +02:00
David Mudrak
b7119f4f3f MDL-22414 Exclude unsupported modules from the course contents 2011-06-10 09:01:41 +02:00
David Mudrak
b61cf3ff8a MDL-22414 Merge branch 'master' into backup-convert
Conflicts:
	theme/base/style/core.css
2011-06-09 13:04:49 +02:00
David Mudrak
fad0f24499 MDL-22414 Removing obj_to_readable helper 2011-06-09 11:38:15 +02:00
David Mudrak
4ece48dc36 MDL-22414 Fixed the order of course modules in the restored course
During the restore, the section's sequence field is ignored and the
order of modules is controlled by the order of the <contents> activity
elements. This patch makes sure that the modules are listed in that
section in the right order.

Also, the patch removes the obsolete stash sectionidslist which was
introduced when the method get_stash_itemids() had not existed yet.
2011-06-09 02:41:27 +02:00
David Mudrak
a5f2b97b7f MDL-22414 Fixed debugging information when a particular exception is thrown 2011-06-08 19:15:40 +02:00
David Mudrak
33560f50fb MDL-22414 Added new inforef manager
This helper class keeps the referenced ids to be dumped into the
inforef.xml files. For now, it uses a in-memory storage structures but
in the future we may refactor it so that it can use some persistent
storage (like converter's stashes).
2011-06-08 10:18:56 +02:00
David Mudrak
e29746c25f MDL-22414 Added scales conversion handler 2011-06-08 10:18:44 +02:00
Tim Hunt
030fba85f1 MDL-20636 qe restor make method protected (Eloy review comment B1). 2011-06-06 17:26:33 +01:00
Tim Hunt
54771d89d1 Merge remote-tracking branch 'moodle/master' into MDL-20636_master_new_question_engine
Conflicts:
	lib/db/upgrade.php
	mod/quiz/lib.php
2011-06-06 17:14:59 +01:00
David Mudrak
fe50f530fd MDL-27379 Backup conversion logging facilities 2011-06-06 13:56:06 +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
85d91b6a1b MDL-27448 Do not stop conversion because of missing course files 2011-06-04 22:11:03 +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
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