MDL-24958 - bad permission check on anonymous feedbacks

This commit is contained in:
Andreas Grabs 2010-10-31 22:05:57 +00:00
parent 8f609a37cf
commit 8d8e6694c8
3 changed files with 5 additions and 1 deletions

View File

@ -98,6 +98,8 @@
if(isset($CFG->feedback_allowfullanonymous)
AND $CFG->feedback_allowfullanonymous
AND $course->id == SITEID
AND (!$courseid OR $courseid == SITEID)
AND $feedback->anonymous == FEEDBACK_ANONYMOUS_YES ) {
$feedback_complete_cap = true;
}

View File

@ -9,7 +9,7 @@
*/
$module->version = 2010102300; // The current module version (Date: YYYYMMDDXX)
$module->version = 2010103100; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2010080300; // Requires this Moodle version
$feedback_version_intern = 1; //this version is used for restore older backups
$module->cron = 0; // Period for cron to check this module (secs)

View File

@ -40,6 +40,8 @@ if(has_capability('mod/feedback:complete', $context)) {
if(isset($CFG->feedback_allowfullanonymous)
AND $CFG->feedback_allowfullanonymous
AND $course->id == SITEID
AND (!$courseid OR $courseid == SITEID)
AND $feedback->anonymous == FEEDBACK_ANONYMOUS_YES ) {
$feedback_complete_cap = true;
}