598 Commits

Author SHA1 Message Date
Frederic Massart
c7b3c10e3b MDL-42768 restore: Use sql_compare_text instead for text comparison 2013-11-13 14:46:30 +08:00
sam marshall
40e8f0260c MDL-42815 Backup/restore: Error saving files - log messages unhelpful
This commit contains three changes in the three files:
1. A bug in the backup process meant that anything logged after a
   certain point did not appear in the on-screen display of the
   backup log, because the logger was serialised and deserialised
   but display code referred to the old version. Changed so that
   code retrieves new object.
2. Add more information to backup log when there is a missing file.
3. Add more information to restore log when there is a missing file
   (and remove existing code duplication of the current message).

The 'missing file' situation is one that generally shouldn't occur in
normal usage, but when it does happen, it is useful to have full
information about the file.
2013-11-11 17:15:32 +00:00
Damyon Wiese
3b4e5a83f4 Merge branch 'MDL-38734-master' of git://github.com/danpoltawski/moodle 2013-11-01 08:55:29 +08:00
Damyon Wiese
3a33578926 Merge branch 'wip-mdl-30812' of git://github.com/rajeshtaneja/moodle 2013-10-28 12:11:34 +08:00
Eloy Lafuente (stronk7)
27ee4c13a5 Merge branch 'MDL-42377_master' of https://github.com/markn86/moodle 2013-10-25 01:14:04 +02:00
Rajesh Taneja
62b6135c38 MDL-34612 Restore: Gracefully handle empty section title while restoring 2013-10-22 09:47:42 +08:00
Mark Nelson
4543bf2423 MDL-42377 backup: fixed incorrect debugging message 2013-10-21 11:54:39 +08:00
sam marshall
62182e89cf MDL-42388 Restore: Some warnings displayed with debugging() 2013-10-18 11:59:45 +01:00
Tony Levi
1b55bdb644 MDL-38734: Automated backup failure causing all course to fail
Conflicts:
	backup/moodle2/backup_stepslib.php
2013-10-18 15:07:35 +08:00
Ankit Agarwal
b2e791d153 MDL-37877 backup: Fix issues with zipping of large files
Files bigger than 4GB is not supported at this point. Zip archiver doesn't know about it and always returns true. We need to verify if it is a valid file or not and delete if not
Also delete the backup file immediately if anything goes wrong anywhere in backup. We don't want to use up space
2013-10-15 12:14:23 +08:00
sam marshall
93eddacc61 MDL-42039 Restore: Add progress tracking while creating question files
If a backup contains a large number of questions, the
create_question_files function can take a very long time. This
change adds progress reporting during that function.
2013-10-10 10:57:31 +08:00
sam marshall
0e2637054f MDL-42039 Restore: Add progress tracking while creating users
When restoring a backup that contains a large number of users
to a different server where those users don't already exist,
creating users can take a significant time. This change adds
progress reporting so that it doesn't time out and shows
activity in the user interface while doing the creation.
2013-10-10 10:57:31 +08:00
sam marshall
bf2a039e9a MDL-42039 Restore: Add progress tracking in restore controller load
In the case of a very large backup with many activities, simply loading
the restore controller (specifically, building the plan) can take a long
time and cause timeouts. This change adds progress reporting while the
restore controller is being loaded.

(This also reduces the time between first going to the page, and the
progress bar appearing, making a slightly better user experience.)

Conflicts:

	backup/restore.php
2013-10-10 10:57:24 +08:00
sam marshall
1cd39657b5 MDL-42039 Restore: Add progress reporting to directory deletion
Deleting directories at the end of backup can take a long time if
there are many directories (potentially up to 65536 file
directories). This change reports progress while deleting
directories to avoid timeout.
2013-10-10 10:56:30 +08:00
Damyon Wiese
370058d8fb Merge branch 'MDL-41838-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-10-10 10:49:11 +08:00
Damyon Wiese
f0ae8d7a66 Merge branch 'MDL-38196-master' of git://github.com/sammarshallou/moodle
Conflicts:
	backup/backup.php
	theme/bootstrapbase/style/moodle.css
2013-10-10 09:31:33 +08:00
sam marshall
39e5102f8b MDL-41838 Backup/restore: Support .tar.gz format for .mbz (2 of 2)
The new experimental setting enabletgzbackups allows backups to be
created so that the internal format for .mbz files is .tar.gz.

Restore transparently supports .mbz files with either internal
formats (.zip or .tar.gz).

The .tar.gz format has the following benefits for backup:
- Supports larger files (no limit on total size, 8GB on single file
  vs. 4GB limit on total size)
- Compresses text better, resulting in smaller .mbz files.
- Reports progress regularly during compression of single files,
  reducing the chance of timeouts during backups that include a
  very large file.

Time performance may also be improved although I haven't done a
direct comparison.
2013-10-08 13:04:49 +01:00
sam marshall
77b3d9dfdf MDL-38196 Backup/restore: Display log if non-empty
When doing a backup or restore operation with the normal user interface,
if there is anything in the backup/restore log, it will now be displayed
at the end of the process below the Continue button.

If you have developer debugging enabled, it sets the display level to
LOG_DEBUG and there will always be content in the log. Otherwise, it
uses LOG_INFO which generally means the log is empty, and nothing
displays (no visible change for users).
2013-10-08 11:00:11 +01:00
Dan Poltawski
4f0eaf18f4 Merge branch 'MDL-40493-master' of git://github.com/damyon/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 16:42:17 +08:00
Dan Poltawski
b56a6981b3 Merge branch 'MDL-41722-master' of git://github.com/sammarshallou/moodle 2013-10-08 15:19:09 +08:00
Tim Hunt
4e3d829350 MDL-42105 questions: let attempts have a max fraction > 1.
This parallels question_attempt->minfraction, which allows the
fractional mark to go below zere.

This is needed to allow the certainty-base marking behaviours to work
better.
2013-10-04 17:52:19 +01:00
sam marshall
e555a4439f MDL-41722 Backup: Very large course times out on user interface pages
Adds 'Preparing page display' progress bars for user interface pages
if they take a long time to display.

Also adds changes where other parts of the backup progress timed out on
long backups. After this change, and MDL-41838, it is finally possible on
my dev server to successfully back up the 'XL' test course.
2013-10-04 10:32:13 +01:00
Damyon Wiese
3d27180e94 MDL-40493 User preference: Allow users to set their preferred text editor.
This changes the setting htmleditor in the user table from a 0 or 1 column
to a user preference for the name of their preferred html editor.
2013-10-02 12:49:30 +08:00
Marina Glancy
9e11059326 Merge branch 'MDL-12403-master' of git://github.com/danpoltawski/moodle 2013-09-30 18:04:38 +10:00
Dan Poltawski
f68fc38867 MDL-12403 backup: Ability to exclude question bank
Now users can choose to exclude the question bank from the backup,
this will in turn prevent any modules which use the question bank
from being included in the backup.
2013-09-26 09:55:12 +08:00
Eloy Lafuente (stronk7)
161f995849 Merge branch 'w39_MDL-41437_m26_mia' of https://github.com/skodak/moodle
Conflicts:
	admin/auth.php
	lib/db/upgrade.php
	version.php
2013-09-24 20:18:03 +02:00
Marina Glancy
84128f46b2 Merge branch 'MDL-41087-master' of git://github.com/sammarshallou/moodle 2013-09-24 16:29:00 +10:00
Petr Škoda
bde002b81a MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes:

* version column removed from modules table, now using standard config, this allows decimal version for modules
* version column removed from block table, now using standard config, this allows decimal version for blocks
* module version.php can safely use $plugins instead of module
* new plugin_manager bulk caching, this should help with MUC performance when logged in as admin
* all missing plugins are now in plugin overview (previously only blocks and modules)
* simplified code and improved coding style
* reworked plugin_manager unit tests - now using real plugins instead of mocks
* unit tests now fail if any plugin does not contain proper version.php file
* allow uninstall of deleted filters
2013-09-22 21:25:26 +02:00
sam marshall
4fb31ae6cd MDL-41669 Restore: Progress bar needs to include more tasks
1. Changes progress bar code to allow headings for progress bar (so users have
   some clue what's going on if a page has more than one progress bar).
2. Changes restore code so that a progress bar can display during pre-checks if
   they take longer than 5 seconds.
3. Changes pre-check and restore code so that, in various points where the system
   can take a long time within an individual step, intederminate progress is
   indicated and it won't time out.
2013-09-16 17:18:12 +01:00
sam marshall
2a70b70c44 MDL-41087 Backup: add progress tracking in slow steps
Adds calls to the new backup progress tracking API within various steps of the
backup system - previously it only tracked progress between steps, but some steps
can themselves be slow. This ensures the system displays progress (either by
moving the progress bar if possible, or by making the wibbler below it pulsate)
during nearly all of the backup process.
2013-09-13 11:07:23 +01:00
Eloy Lafuente (stronk7)
e034d84c48 Merge branch 'MDL-38190-master' of git://github.com/sammarshallou/moodle
Conflicts:
	backup/import.php
	theme/bootstrapbase/style/moodle.css
2013-09-02 16:56:50 +02:00
Damyon Wiese
f6c2af867f Merge branch 'master_MDL-40122' of git://github.com/danmarsden/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-08-27 13:16:55 +08:00
Damyon Wiese
97c91725d1 Merge branch 'MDL-41380-master' of https://github.com/mr-russ/moodle 2013-08-26 12:42:15 +08:00
Russell Smith
cdd8382b63 MDL-41380 backup: Fix incorrect function name from MDL-40618. 2013-08-22 12:41:51 +10:00
Dan Marsden
3d1808c6e2 MDL-40122 SCORM: replace SCORM course format with singleactivity 2013-08-21 20:26:06 +12:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
Sam Hemelryk
487caf6b65 Revert "MDL-39876 update_course_record function to update global COURSE"
This reverts commit c290ac5510ca06b3eae557c2165c2f106dde46aa.

Conflicts:
	course/lib.php
2013-08-21 15:21:06 +12:00
Sam Hemelryk
6eee89bc8f Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts:
	course/lib.php
2013-08-21 12:08:46 +12:00
sam marshall
2531ae2922 MDL-38190 (2) Backup/restore: Progress tracking for tasks and steps 2013-08-16 10:50:36 +01:00
Russell Smith
536e9be605 MDL-40893 backup: cache question answers for performance
To constrain memory we only cache a single question's answers.
A quiz must display this many answers, so it will not result
in undue memory pressure.

We now match on the full answer text rather than the first 255
characters.  This removes the risk of matching questions with the
same start.
2013-08-16 10:06:13 +10:00
sam marshall
c290ac5510 MDL-39876 update_course_record function to update global COURSE 2013-08-15 11:31:21 +01:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Russell Smith
3e7e2ab2ee MDL-40618 backup: centralize info field, use info in queries.
encode_backup_temp_info() and decode_backup_temp_info() have been
introduced to keep the info field encoding in one place.
Many locations used get_backup_ids_record() to obtain info, that
makes lots of calls to get_backup_ids_record() which can be slow.
We now complete all those inline by adding the info field to the query.
To reduce memory usage, all queries of that nature have been changed
to use get_recordset_*. gzcompress was introduced if available to minimize
traffic to/from the database and to decrease the memory required for caching.
The compression time is saved by the benefits in other places of having smaller data.
2013-07-23 19:50:53 +10:00
Petr Škoda
b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Petr Škoda
46f6f7f224 MDL-40220 use new core_component::get_plugin_types() 2013-07-16 22:31:48 +02:00
Eloy Lafuente (stronk7)
e780e5cb8f Merge branch 'MDL-40112_master' of https://github.com/totara/openbadges
Conflicts:
	lib/db/upgrade.php
	version.php
2013-07-16 01:29:01 +02:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Yuliya Bozhko
e50220f840 MDL-40112 badges: Drop unused image field from badge table 2013-07-05 09:18:59 +12:00
Damyon Wiese
74ed095606 MDL-39558 badges: Prevent backup of badges without user information 2013-07-03 10:52:50 +08:00