Skip to content

Commit

Permalink
little update in backup stepslib
Browse files Browse the repository at this point in the history
  • Loading branch information
TamaroWalter committed Mar 15, 2024
1 parent 7e13b11 commit cb9311f
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions backup/moodle2/backup_moodleoverflow_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,46 +48,35 @@ protected function define_structure() {
'name', 'intro', 'introformat', 'maxbytes', 'maxattachments', 'timecreated', 'timemodified',
'forcesubscribe', 'trackingtype', 'ratingpreference', 'coursewidereputation', 'allowrating',
'allowreputation', 'allownegativereputation', 'grademaxgrade', 'gradescalefactor', 'gradecat',
'anonymous', 'needsreview', 'allowmultiplemarks', ]);
'anonymous', 'allowmultiplemarks', ]);

// Define each element separated.
$discussions = new backup_nested_element('discussions');
$discussion = new backup_nested_element('discussion', ['id'], [
'name', 'firstpost', 'userid', 'timemodified', 'usermodified', 'timestart', ]);
'name', 'firstpost', 'userid', 'timestart', 'timemodified', 'usermodified', ]);

$posts = new backup_nested_element('posts');

$post = new backup_nested_element('post', ['id'], [
'parent', 'userid', 'created', 'modified',
'mailed', 'message', 'messageformat', 'attachment', ]);
'message', 'messageformat', 'attachment', 'mailed', ]);

$ratings = new backup_nested_element('ratings');

$rating = new backup_nested_element('rating', ['id'], [
'userid', 'rating', 'firstrated', 'lastchanged', ]);

$discussionsubs = new backup_nested_element('discuss_subs');

$discussionsub = new backup_nested_element('discuss_sub', ['id'], [
'userid',
'preference',
]);
'userid', 'preference', ]);

$subscriptions = new backup_nested_element('subscriptions');

$subscription = new backup_nested_element('subscription', ['id'], [
'userid', ]);
$subscription = new backup_nested_element('subscription', ['id'], ['userid']);

$readposts = new backup_nested_element('readposts');

$read = new backup_nested_element('read', ['id'], [
'userid', 'discussionid', 'postid', 'firstread',
'lastread', ]);
'userid', 'discussionid', 'postid', 'firstread', 'lastread', ]);

$tracking = new backup_nested_element('tracking');

$track = new backup_nested_element('track', ['id'], [
'userid', ]);
$track = new backup_nested_element('track', ['id'], ['userid']);

// Build the tree.
$moodleoverflow->add_child($discussions);
Expand Down

0 comments on commit cb9311f

Please sign in to comment.