function xmldb_main_install() {
global $CFG, $DB, $SITE;
-/// TODO: move all statements from install.xml here
-
-
/// make sure system context exists
$syscontext = get_context_instance(CONTEXT_SYSTEM);
if ($syscontext->id != 1) {
--- /dev/null
+<?php //$Id$
+
+// This file is executed right after the install.xml
+//
+
+function xmldb_quizreport_statistics_install() {
+ global $DB;
+
+ $record = new object();
+ $record->name = 'statistics';
+ $record->displayorder = 8000;
+ $record->cron = 18000;
+ $record->capability = 'quizreport/statistics:view';
+ $DB->insert_record('quiz_report', $record);
+
+}
\ No newline at end of file
</KEYS>
</TABLE>
</TABLES>
- <STATEMENTS>
- <STATEMENT NAME="insert quiz_report" TYPE="insert" TABLE="quiz_report" COMMENT="Initial insert of records on table quiz_report">
- <SENTENCES>
- <SENTENCE TEXT="(name, displayorder, cron, capability) VALUES ('statistics', 8000, 18000, 'quizreport/statistics:view')" />
- </SENTENCES>
- </STATEMENT>
- </STATEMENTS>
</XMLDB>
\ No newline at end of file