Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-27820 backup - fix backup of ratings

  • Loading branch information...
commit 5edac71d16f0a95e2de6af8ec67943961cd721d1 1 parent 6911fa1
Eloy Lafuente (stronk7) stronk7 authored
4 mod/data/backup/moodle2/backup_data_stepslib.php
@@ -101,8 +101,8 @@ protected function define_structure() {
101 101
102 102 $rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
103 103 'itemid' => backup::VAR_PARENTID,
104   - 'component' => 'mod_data',
105   - 'ratingarea' => 'entry'));
  104 + 'component' => backup_helper::is_sqlparam('mod_data'),
  105 + 'ratingarea' => backup_helper::is_sqlparam('entry')));
106 106 $rating->set_source_alias('rating', 'value');
107 107 }
108 108
4 mod/forum/backup/moodle2/backup_forum_stepslib.php
@@ -126,8 +126,8 @@ protected function define_structure() {
126 126 $track->set_source_table('forum_track_prefs', array('forumid' => backup::VAR_PARENTID));
127 127
128 128 $rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
129   - 'component' => 'mod_forum',
130   - 'ratingarea' => 'post',
  129 + 'component' => backup_helper::is_sqlparam('mod_forum'),
  130 + 'ratingarea' => backup_helper::is_sqlparam('post'),
131 131 'itemid' => backup::VAR_PARENTID));
132 132 $rating->set_source_alias('rating', 'value');
133 133 }
4 mod/glossary/backup/moodle2/backup_glossary_stepslib.php
@@ -103,8 +103,8 @@ protected function define_structure() {
103 103
104 104 $rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,
105 105 'itemid' => backup::VAR_PARENTID,
106   - 'component' => 'mod_glossary',
107   - 'ratingarea' => 'entry'));
  106 + 'component' => backup_helper::is_sqlparam('mod_glossary'),
  107 + 'ratingarea' => backup_helper::is_sqlparam('entry')));
108 108 $rating->set_source_alias('rating', 'value');
109 109
110 110 $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.