Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensure user has_capability('mod/hotpot:attempt', $module) when viewin…

…g a HotPot or submitting results
  • Loading branch information...
commit e8c35867b7a431c9bb7bc0886d6821ddebc51286 1 parent 68bddc6
@gbateson gbateson authored
Showing with 3 additions and 0 deletions.
  1. +2 −0  mod/hotpot/attempt.php
  2. +1 −0  mod/hotpot/view.php
View
2  mod/hotpot/attempt.php
@@ -23,6 +23,8 @@
// make sure this user is enrolled in this course
require_login($course->id);
+ $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+ require_capability('mod/hotpot:attempt', $context);
$next_url = "$CFG->wwwroot/course/view.php?id=$course->id";
$time = time();
View
1  mod/hotpot/view.php
@@ -36,6 +36,7 @@
}
require_login($course->id);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
+ require_capability('mod/hotpot:attempt', $context);
}
// set nextpage (for error messages)
$nextpage = "$CFG->wwwroot/course/view.php?id=$course->id";
Please sign in to comment.
Something went wrong with that request. Please try again.