Skip to content
Browse files

MDL-27820 backup - fix backup of ratings

  • Loading branch information...
1 parent 6911fa1 commit 5edac71d16f0a95e2de6af8ec67943961cd721d1 @stronk7 stronk7 committed Jun 15, 2011
View
4 mod/data/backup/moodle2/backup_data_stepslib.php
@@ -101,8 +101,8 @@ protected function define_structure() {
$rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
'itemid' => backup::VAR_PARENTID,
- 'component' => 'mod_data',
- 'ratingarea' => 'entry'));
+ 'component' => backup_helper::is_sqlparam('mod_data'),
+ 'ratingarea' => backup_helper::is_sqlparam('entry')));
$rating->set_source_alias('rating', 'value');
}
View
4 mod/forum/backup/moodle2/backup_forum_stepslib.php
@@ -126,8 +126,8 @@ protected function define_structure() {
$track->set_source_table('forum_track_prefs', array('forumid' => backup::VAR_PARENTID));
$rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
- 'component' => 'mod_forum',
- 'ratingarea' => 'post',
+ 'component' => backup_helper::is_sqlparam('mod_forum'),
+ 'ratingarea' => backup_helper::is_sqlparam('post'),
'itemid' => backup::VAR_PARENTID));
$rating->set_source_alias('rating', 'value');
}
View
4 mod/glossary/backup/moodle2/backup_glossary_stepslib.php
@@ -103,8 +103,8 @@ protected function define_structure() {
$rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
'itemid' => backup::VAR_PARENTID,
- 'component' => 'mod_glossary',
- 'ratingarea' => 'entry'));
+ 'component' => backup_helper::is_sqlparam('mod_glossary'),
+ 'ratingarea' => backup_helper::is_sqlparam('entry')));
$rating->set_source_alias('rating', 'value');
$categoryentry->set_source_table('glossary_entries_categories', array('categoryid' => backup::VAR_PARENTID));

0 comments on commit 5edac71

Please sign in to comment.
Something went wrong with that request. Please try again.