Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c309e4f
)
MDL-29793 Advanced grading - do not execute the restore step if the grading.xml is...
author
David Mudrak
<david@moodle.com>
Mon, 14 Nov 2011 20:09:52 +0000
(21:09 +0100)
committer
David Mudrak
<david@moodle.com>
Mon, 14 Nov 2011 20:11:41 +0000
(21:11 +0100)
backup/moodle2/restore_stepslib.php
patch
|
blob
|
blame
|
history
diff --git
a/backup/moodle2/restore_stepslib.php
b/backup/moodle2/restore_stepslib.php
index
68bfb2c
..
3044c7f
100644
(file)
--- a/
backup/moodle2/restore_stepslib.php
+++ b/
backup/moodle2/restore_stepslib.php
@@
-1877,6
+1877,21
@@
class restore_activity_logs_structure_step extends restore_course_logs_structure
*/
class restore_activity_grading_structure_step extends restore_structure_step {
+ /**
+ * This step is executed only if the grading file is present
+ */
+ protected function execute_condition() {
+
+ $fullpath = $this->task->get_taskbasepath();
+ $fullpath = rtrim($fullpath, '/') . '/' . $this->filename;
+ if (!file_exists($fullpath)) {
+ return false;
+ }
+
+ return true;
+ }
+
+
/**
* Declares paths in the grading.xml file we are interested in
*/