mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Fixed Bug #4985 - Guest rights to the database module.
This commit is contained in:
parent
34f4ff351d
commit
7ddda9dbcf
@ -25,8 +25,6 @@
|
||||
require_once('../../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
require_login();
|
||||
|
||||
$id = optional_param('id', 0, PARAM_INT); // course module id
|
||||
$d = optional_param('d', 0, PARAM_INT); // database id
|
||||
$rid = optional_param('rid', 0, PARAM_INT); //record id
|
||||
@ -57,6 +55,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
require_course_login($course, false, $cm);
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
if (!record_exists('data_fields','dataid',$data->id)) { // Brand new database!
|
||||
redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id); // Redirect to field entry
|
||||
|
@ -28,7 +28,7 @@
|
||||
require_once("$CFG->libdir/rsslib.php");
|
||||
|
||||
require_once('pagelib.php');
|
||||
require_login();
|
||||
|
||||
|
||||
$id = optional_param('id', 0, PARAM_INT); // course module id
|
||||
$d = optional_param('d', 0, PARAM_INT); // database id
|
||||
@ -66,6 +66,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
if (!record_exists('data_fields','dataid',$data->id)) { // Brand new database!
|
||||
redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id); // Redirect to field entry
|
||||
|
Loading…
x
Reference in New Issue
Block a user