Skip to content

Commit

Permalink
MDL-61464 Backup: Include contextid for questuin tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Mar 23, 2018
1 parent 6bbb7ed commit 06d7352
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup/moodle2/backup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,7 @@ protected function define_structure() {

$tags = new backup_nested_element('tags');

$tag = new backup_nested_element('tag', array('id'), array('name', 'rawname'));
$tag = new backup_nested_element('tag', array('id', 'contextid'), array('name', 'rawname'));

// Build the tree

Expand Down Expand Up @@ -2266,7 +2266,7 @@ protected function define_structure() {
ORDER BY id',
array('questionid' => backup::VAR_PARENTID));

$tag->set_source_sql("SELECT t.id, t.name, t.rawname
$tag->set_source_sql("SELECT t.id, ti.contextid, t.name, t.rawname
FROM {tag} t
JOIN {tag_instance} ti ON ti.tagid = t.id
WHERE ti.itemid = ?
Expand Down

0 comments on commit 06d7352

Please sign in to comment.