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:
b36781d
)
MDL-22588 restore scales - fix scales not being assigned to target course. Merged...
author
Eloy Lafuente
<stronk7@moodle.org>
Fri, 28 May 2010 09:25:21 +0000
(09:25 +0000)
committer
Eloy Lafuente
<stronk7@moodle.org>
Fri, 28 May 2010 09:25:21 +0000
(09:25 +0000)
backup/restorelib.php
patch
|
blob
|
blame
|
history
diff --git
a/backup/restorelib.php
b/backup/restorelib.php
index
a3121c1
..
64d75d1
100644
(file)
--- a/
backup/restorelib.php
+++ b/
backup/restorelib.php
@@
-3684,6
+3684,10
@@
define('RESTORE_GROUPS_GROUPINGS', 3);
} else {
$sca->userid = $USER->id;
}
+ // If course scale, recode the course field
+ if ($sca->courseid != 0) {
+ $sca->courseid = $restore->course_id;
+ }
// If scale is standard, if user lacks perms to manage standar scales
// 'downgrade' them to course scales
if ($sca->courseid == 0 and !has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM), $sca->userid)) {