@@ -54,23 +54,27 @@ protected function define_structure() {
54
54
55
55
// 2. Define each element separately.
56
56
$ pdfannotator = new backup_nested_element ('pdfannotator ' , array ('id ' ), array (
57
- 'name ' , 'intro ' , 'introformat ' , 'usevotes ' , 'useprint ' , 'useprintcomments ' , 'use_studenttextbox ' , 'use_studentdrawing ' , 'useprivatecomments ' , 'useprotectedcomments ' , 'timecreated ' , 'timemodified ' ));
57
+ 'name ' , 'intro ' , 'introformat ' , 'usevotes ' , 'useprint ' , 'useprintcomments ' , 'use_studenttextbox ' , 'use_studentdrawing ' ,
58
+ 'useprivatecomments ' , 'useprotectedcomments ' , 'timecreated ' , 'timemodified ' ));
58
59
59
60
$ annotations = new backup_nested_element ('annotations ' );
60
- $ annotation = new backup_nested_element ('annotation ' , array ('id ' ), array ('page ' , 'userid ' , 'annotationtypeid ' , 'data ' , 'timecreated ' , 'timemodified ' , 'modifiedby ' ));
61
+ $ annotation = new backup_nested_element ('annotation ' , array ('id ' ), array ('page ' , 'userid ' , 'annotationtypeid ' ,
62
+ 'data ' , 'timecreated ' , 'timemodified ' , 'modifiedby ' ));
61
63
62
64
$ subscriptions = new backup_nested_element ('subscriptions ' );
63
65
$ subscription = new backup_nested_element ('subscription ' , array ('id ' ), array ('userid ' ));
64
66
65
67
$ comments = new backup_nested_element ('comments ' );
66
- $ c = array ('pdfannotatorid ' , 'userid ' , 'content ' , 'timecreated ' , 'timemodified ' , 'modifiedby ' , 'visibility ' , 'isquestion ' , 'isdeleted ' , 'ishidden ' , 'solved ' );
68
+ $ c = array ('pdfannotatorid ' , 'userid ' , 'content ' , 'timecreated ' , 'timemodified ' , 'modifiedby ' , 'visibility ' ,
69
+ 'isquestion ' , 'isdeleted ' , 'ishidden ' , 'solved ' );
67
70
$ comment = new backup_nested_element ('comment ' , array ('id ' ), $ c );
68
71
69
72
$ votes = new backup_nested_element ('votes ' );
70
73
$ vote = new backup_nested_element ('vote ' , array ('id ' ), array ('userid ' , 'annotationid ' ));
71
74
72
75
$ reports = new backup_nested_element ('reports ' );
73
- $ report = new backup_nested_element ('report ' , array ('id ' ), array ('courseid ' , 'pdfannotatorid ' , 'message ' , 'userid ' , 'timecreated ' , 'seen ' ));
76
+ $ report = new backup_nested_element ('report ' , array ('id ' ), array ('courseid ' , 'pdfannotatorid ' , 'message ' ,
77
+ 'userid ' , 'timecreated ' , 'seen ' ));
74
78
75
79
// 3. Build the tree (mind the right order!)
76
80
$ pdfannotator ->add_child ($ annotations );
@@ -97,7 +101,8 @@ protected function define_structure() {
97
101
// Add all annotations specific to this annotator instance.
98
102
$ annotation ->set_source_sql ('SELECT a.* FROM {pdfannotator_annotations} a '
99
103
. 'JOIN {pdfannotator_comments} c ON a.id = c.annotationid '
100
- . "WHERE a.pdfannotatorid = ? AND c.isquestion = 1 AND (c.visibility = 'public' OR c.visibility = 'anonymous') " ,
104
+ . "WHERE a.pdfannotatorid = ? AND c.isquestion = 1 AND "
105
+ . "(c.visibility = 'public' OR c.visibility = 'anonymous') " ,
101
106
array ('pdfannotatorid ' => backup::VAR_PARENTID ));
102
107
103
108
// Add any subscriptions to this annotation.
0 commit comments