]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10579 capabilities for grade export plugins
authorskodak <skodak>
Tue, 24 Jul 2007 08:51:45 +0000 (08:51 +0000)
committerskodak <skodak>
Tue, 24 Jul 2007 08:51:45 +0000 (08:51 +0000)
21 files changed:
grade/export/csv/db/access.php
grade/export/csv/version.php [new file with mode: 0644]
grade/export/lib.php
grade/export/ods/db/access.php [new file with mode: 0644]
grade/export/ods/export.php
grade/export/ods/index.php
grade/export/ods/version.php [new file with mode: 0644]
grade/export/txt/db/access.php [new file with mode: 0644]
grade/export/txt/export.php
grade/export/txt/index.php
grade/export/txt/version.php
grade/export/xls/db/access.php [new file with mode: 0644]
grade/export/xls/export.php
grade/export/xls/index.php
grade/export/xls/version.php [new file with mode: 0644]
grade/export/xml/db/access.php [new file with mode: 0644]
grade/export/xml/export.php
grade/export/xml/index.php
grade/export/xml/version.php [new file with mode: 0644]
lib/accesslib.php
version.php

index b28b04f643122b019e912540f228c8ed20be9eeb..8d7eec88a7a933094d08d3b303223997aafe4ab1 100644 (file)
@@ -1,3 +1,17 @@
+<?php  // $Id$
 
+$gradeexport_csv_capabilities = array(
 
+    'gradeexport/csv:view' => array(
+        'riskbitmask' => RISK_PERSONAL,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
 
+?>
diff --git a/grade/export/csv/version.php b/grade/export/csv/version.php
new file mode 100644 (file)
index 0000000..bb12a6c
--- /dev/null
@@ -0,0 +1,6 @@
+<?PHP // $Id$
+
+$plugin->version  = 2007072404;
+$plugin->requires = 2007072402;
+
+?>
index b277b214280c7e3b29fe125ef116a3d67463b001..14ae50edb486166b0038d16bf985f75ec76d9187 100755 (executable)
@@ -23,8 +23,8 @@
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
 
-include_once($CFG->dirroot.'/lib/gradelib.php');
-include_once($CFG->dirroot.'/grade/lib.php');
+require_once($CFG->dirroot.'/lib/gradelib.php');
+require_once($CFG->dirroot.'/grade/lib.php');
 /**
  * Prints all grade items for selection
  * @input int id - course id
diff --git a/grade/export/ods/db/access.php b/grade/export/ods/db/access.php
new file mode 100644 (file)
index 0000000..b7b6c2d
--- /dev/null
@@ -0,0 +1,17 @@
+<?php  // $Id$
+
+$gradeexport_ods_capabilities = array(
+
+    'gradeexport/ods:view' => array(
+        'riskbitmask' => RISK_PERSONAL,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
+
+?>
index eac52a141fe5452b84308b48a16760afbd52ab65..efeff42d41c173a2b42c2d3a05874707e8477f6d 100755 (executable)
@@ -1,12 +1,46 @@
-<?php
+<?php  //$Id$
 
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_ods.php');
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// NOTICE OF COPYRIGHT                                                   //
+//                                                                       //
+// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
+//          http://moodle.com                                            //
+//                                                                       //
+// Copyright (C) 2001-2003  Martin Dougiamas  http://dougiamas.com       //
+//                                                                       //
+// This program is free software; you can redistribute it and/or modify  //
+// it under the terms of the GNU General Public License as published by  //
+// the Free Software Foundation; either version 2 of the License, or     //
+// (at your option) any later version.                                   //
+//                                                                       //
+// This program is distributed in the hope that it will be useful,       //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
+// GNU General Public License for more details:                          //
+//                                                                       //
+//          http://www.gnu.org/copyleft/gpl.html                         //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-$id = required_param('id', PARAM_INT); // course id
-$itemids = explode(",", required_param('itemids', PARAM_RAW));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_ods.php';
+
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
+$itemids  = explode(",", required_param('itemids', PARAM_RAW));
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/ods:view', $context);
+
 
 // print all the exported data here
 $export = new grade_export_ods($id, $itemids);
index 54a9a5b40ca62ec6e00bed3a2e32e9e93582137a..1fc60c3311e0c342cb2df2ab3ea2c09503382090 100755 (executable)
@@ -1,4 +1,5 @@
-<?php
+<?php  //$Id$
+
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 // NOTICE OF COPYRIGHT                                                   //
 //          http://www.gnu.org/copyleft/gpl.html                         //
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_ods.php');
-
-$id = required_param('id', PARAM_INT); // course id
 
-require_login($id);
-require_capability('moodle/grade:export', get_context_instance(CONTEXT_COURSE, $id));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_ods.php';
 
-$course = get_record('course', 'id', $id);
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/ods:view', $context);
+
+
 $strgrades = get_string('grades', 'grades');
 $actionstr = get_string('modulename', 'gradeexport_ods');
+
 $gradenav = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>";
 $gradenav .= " -> <a href=\"$CFG->wwwroot/grade/index.php?id=$course->id\">$strgrades</a>";
 $gradenav .= " -> $actionstr";
+
 print_header($course->shortname.': '.get_string('grades'), $course->fullname, $gradenav);
 // process post information
 if (($data = data_submitted()) && confirm_sesskey()) {
diff --git a/grade/export/ods/version.php b/grade/export/ods/version.php
new file mode 100644 (file)
index 0000000..5450dc1
--- /dev/null
@@ -0,0 +1,6 @@
+<?PHP // $Id$
+
+$plugin->version  = 2007072409;
+$plugin->requires = 2007072402;
+
+?>
diff --git a/grade/export/txt/db/access.php b/grade/export/txt/db/access.php
new file mode 100644 (file)
index 0000000..243bd9b
--- /dev/null
@@ -0,0 +1,17 @@
+<?php  // $Id$
+
+$gradeexport_txt_capabilities = array(
+
+    'gradeexport/txt:view' => array(
+        'riskbitmask' => RISK_PERSONAL,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
+
+?>
index a38782a071521a78bd187806825e4fb0e363710d..9d368102f6a855fc66d63fa205da10ee99bca832 100755 (executable)
@@ -1,12 +1,45 @@
-<?php
+<?php  //$Id$
 
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_txt.php');
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// NOTICE OF COPYRIGHT                                                   //
+//                                                                       //
+// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
+//          http://moodle.com                                            //
+//                                                                       //
+// Copyright (C) 2001-2003  Martin Dougiamas  http://dougiamas.com       //
+//                                                                       //
+// This program is free software; you can redistribute it and/or modify  //
+// it under the terms of the GNU General Public License as published by  //
+// the Free Software Foundation; either version 2 of the License, or     //
+// (at your option) any later version.                                   //
+//                                                                       //
+// This program is distributed in the hope that it will be useful,       //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
+// GNU General Public License for more details:                          //
+//                                                                       //
+//          http://www.gnu.org/copyleft/gpl.html                         //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-$id = required_param('id', PARAM_INT); // course id
-$itemids = explode(",", required_param('itemids', PARAM_RAW));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_txt.php';
+
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
+$itemids  = explode(",", required_param('itemids', PARAM_RAW));
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/txt:view', $context);
 
 // print all the exported data here
 $export = new grade_export_txt($id, $itemids);
index ad681a00f7434c2e9e01b8e8804df51b69d1bc61..d8612d9d647d2cccbe586a17bf9ebdba498c39ec 100755 (executable)
@@ -1,4 +1,5 @@
-<?php
+<?php  //$Id$
+
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 // NOTICE OF COPYRIGHT                                                   //
 //          http://www.gnu.org/copyleft/gpl.html                         //
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_txt.php');
-
-$id = required_param('id', PARAM_INT); // course id
 
-require_login($id);
-require_capability('moodle/grade:export', get_context_instance(CONTEXT_COURSE, $id));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_txt.php';
 
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
-$course = get_record('course', 'id', $id);
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/txt:view', $context);
+
+
 $strgrades = get_string('grades', 'grades');
 $actionstr = get_string('modulename', 'gradeexport_txt');
+
 $gradenav = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>";
 $gradenav .= " -> <a href=\"$CFG->wwwroot/grade/index.php?id=$course->id\">$strgrades</a>";
 $gradenav .= " -> $actionstr";
+
 print_header($course->shortname.': '.get_string('grades'), $course->fullname, $gradenav);
 
 // process post information
index 96db5bce31a1d2815fa3e96182f4457ca01a08b9..7dcd2ffa31f376afb9d7cf472e81477b1c0a6721 100755 (executable)
@@ -1,6 +1,6 @@
-<?php
+<?PHP // $Id$
 
-$plugin->version  = 2007052201;
-$plugin->requires = 2007051801;
+$plugin->version  = 2007072403;
+$plugin->requires = 2007072402;
 
 ?>
diff --git a/grade/export/xls/db/access.php b/grade/export/xls/db/access.php
new file mode 100644 (file)
index 0000000..6ea4d57
--- /dev/null
@@ -0,0 +1,17 @@
+<?php  // $Id$
+
+$gradeexport_xls_capabilities = array(
+
+    'gradeexport/xls:view' => array(
+        'riskbitmask' => RISK_PERSONAL,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
+
+?>
index fbea383dcd33649b1a3d82aa7d77a0d957a6d618..d283ac8f8f9f6aef28bd18a8b809634051fb228c 100755 (executable)
@@ -1,12 +1,45 @@
-<?php
+<?php  //$Id$
 
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_xls.php');
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// NOTICE OF COPYRIGHT                                                   //
+//                                                                       //
+// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
+//          http://moodle.com                                            //
+//                                                                       //
+// Copyright (C) 2001-2003  Martin Dougiamas  http://dougiamas.com       //
+//                                                                       //
+// This program is free software; you can redistribute it and/or modify  //
+// it under the terms of the GNU General Public License as published by  //
+// the Free Software Foundation; either version 2 of the License, or     //
+// (at your option) any later version.                                   //
+//                                                                       //
+// This program is distributed in the hope that it will be useful,       //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
+// GNU General Public License for more details:                          //
+//                                                                       //
+//          http://www.gnu.org/copyleft/gpl.html                         //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-$id = required_param('id', PARAM_INT); // course id
-$itemids = explode(",", required_param('itemids', PARAM_RAW));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_xls.php';
+
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
+$itemids  = explode(",", required_param('itemids', PARAM_RAW));
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/xls:view', $context);
 
 // print all the exported data here
 $export = new grade_export_xls($id, $itemids);
index 49dd07f4f43015ea3f2c28b98d00a4071adadabf..7d7336c70a4c3c6c16ebbfd71120ba7c0d3dbbc8 100755 (executable)
@@ -1,4 +1,5 @@
-<?php
+<?php  //$Id$
+
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 // NOTICE OF COPYRIGHT                                                   //
 //          http://www.gnu.org/copyleft/gpl.html                         //
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_xls.php');
-
-$id = required_param('id', PARAM_INT); // course id
 
-require_login($id);
-require_capability('moodle/grade:export', get_context_instance(CONTEXT_COURSE, $id));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_xls.php';
 
-$course = get_record('course', 'id', $id);
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
 
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/xls:view', $context);
+
+
 $strgrades = get_string('grades', 'grades');
 $actionstr = get_string('modulename', 'gradeexport_xls');
 $gradenav = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>";
diff --git a/grade/export/xls/version.php b/grade/export/xls/version.php
new file mode 100644 (file)
index 0000000..7dcd2ff
--- /dev/null
@@ -0,0 +1,6 @@
+<?PHP // $Id$
+
+$plugin->version  = 2007072403;
+$plugin->requires = 2007072402;
+
+?>
diff --git a/grade/export/xml/db/access.php b/grade/export/xml/db/access.php
new file mode 100644 (file)
index 0000000..51233ab
--- /dev/null
@@ -0,0 +1,17 @@
+<?php  // $Id$
+
+$gradeexport_xml_capabilities = array(
+
+    'gradeexport/xml:view' => array(
+        'riskbitmask' => RISK_PERSONAL,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    )
+);
+
+?>
index e0d4af54bf33fc57583cf8f5d7ded35189ae40f1..056161755d67ce80767859a236e65ceb140d80d2 100755 (executable)
@@ -1,12 +1,45 @@
-<?php
+<?php  //$Id$
 
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_xml.php');
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// NOTICE OF COPYRIGHT                                                   //
+//                                                                       //
+// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
+//          http://moodle.com                                            //
+//                                                                       //
+// Copyright (C) 2001-2003  Martin Dougiamas  http://dougiamas.com       //
+//                                                                       //
+// This program is free software; you can redistribute it and/or modify  //
+// it under the terms of the GNU General Public License as published by  //
+// the Free Software Foundation; either version 2 of the License, or     //
+// (at your option) any later version.                                   //
+//                                                                       //
+// This program is distributed in the hope that it will be useful,       //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
+// GNU General Public License for more details:                          //
+//                                                                       //
+//          http://www.gnu.org/copyleft/gpl.html                         //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-$id = required_param('id', PARAM_INT); // course id
-$itemids = explode(",", required_param('itemids', PARAM_RAW));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_xml.php';
+
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
+$itemids  = explode(",", required_param('itemids', PARAM_RAW));
+
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/xml:view', $context);
 
 // print all the exported data here
 $export = new grade_export_xml($id, $itemids);
index 9c2ca8adce543b7954bc72febf5d2e4a9934ffce..c673ed0cc9e3b673089e73e048c5bc72265e6c20 100755 (executable)
@@ -1,4 +1,5 @@
-<?php
+<?php  //$Id$
+
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 // NOTICE OF COPYRIGHT                                                   //
 //          http://www.gnu.org/copyleft/gpl.html                         //
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
-require_once("../../../config.php");
-require_once($CFG->dirroot.'/grade/export/lib.php');
-require_once('grade_export_xml.php');
-
-$id = required_param('id', PARAM_INT); // course id
 
-require_login($id);
-require_capability('moodle/grade:export', get_context_instance(CONTEXT_COURSE, $id));
+require_once '../../../config.php';
+require_once $CFG->dirroot.'/grade/export/lib.php';
+require_once 'grade_export_xml.php';
 
-$course = get_record('course', 'id', $id);
+$id       = required_param('id', PARAM_INT); // course id
 $feedback = optional_param('feedback', '', PARAM_ALPHA);
 
+if (!$course = get_record('course', 'id', $id)) {
+    print_error('nocourseid');
+}
+
+require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $id);
+
+require_capability('moodle/grade:export', $context);
+require_capability('gradeexport/xml:view', $context);
+
+
 $strgrades = get_string('grades', 'grades');
 $actionstr = get_string('modulename', 'gradeexport_xml');
 $gradenav = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>";
diff --git a/grade/export/xml/version.php b/grade/export/xml/version.php
new file mode 100644 (file)
index 0000000..7dcd2ff
--- /dev/null
@@ -0,0 +1,6 @@
+<?PHP // $Id$
+
+$plugin->version  = 2007072403;
+$plugin->requires = 2007072402;
+
+?>
index f53baec3629763dda4ce5fbe68e2a564b4e0cc5a..5a12b611fe5af9e7a449c3b6af31521e136a178d 100755 (executable)
@@ -2438,20 +2438,25 @@ function load_capability_def($component) {
             $defpath = $CFG->dirroot.'/'.$compparts[0].
                                 's/'.$compparts[1].'/db/access.php';
             $varprefix = $compparts[0].'_'.$compparts[1];
+
         } else if ($compparts[0] == 'format') {
             // Similar to the above, course formats are 'format' while they
             // are stored in 'course/format'.
             $defpath = $CFG->dirroot.'/course/'.$component.'/db/access.php';
             $varprefix = $compparts[0].'_'.$compparts[1];
+
         } else if ($compparts[0] == 'gradeimport') {
-            $defpath = $CFG->dirroot.'/grade/import/'.$component.'/db/access.php';
-            $varprefix = $component;
+            $defpath = $CFG->dirroot.'/grade/import/'.$compparts[1].'/db/access.php';
+            $varprefix = $compparts[0].'_'.$compparts[1];
+
         } else if ($compparts[0] == 'gradeexport') {
-            $defpath = $CFG->dirroot.'/grade/export/'.$component.'/db/access.php';
-            $varprefix = $component;
+            $defpath = $CFG->dirroot.'/grade/export/'.$compparts[1].'/db/access.php';
+            $varprefix = $compparts[0].'_'.$compparts[1];
+
         } else if ($compparts[0] == 'gradereport') {
-            $defpath = $CFG->dirroot.'/grade/report/'.$component.'/db/access.php';
-            $varprefix = $component;
+            $defpath = $CFG->dirroot.'/grade/report/'.$compparts[1].'/db/access.php';
+            $varprefix = $compparts[0].'_'.$compparts[1];
+
         } else {
             $defpath = $CFG->dirroot.'/'.$component.'/db/access.php';
             $varprefix = str_replace('/', '_', $component);
index c0095f21044d7fd2c66dc15ca630e2892d26921e..9ae7854dd7c36b43e062ae49ce0a69168f509c9c 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2007072400;  // YYYYMMDD = date
+    $version = 2007072402;  // YYYYMMDD = date
                             //       XY = increments within a single day
 
     $release = '1.9 dev';   // Human-friendly version name