Permalink
Browse files

Fixed a problem

  • Loading branch information...
1 parent d994263 commit b455078417d48fbcf65fc8030a722320ead6f904 bobopinna committed Sep 20, 2005
Showing with 6 additions and 5 deletions.
  1. +6 −5 mod/scorm/validate.php
View
11 mod/scorm/validate.php
@@ -5,12 +5,13 @@
require_login();
-if (confirm_sesskey()) {
- $reference = clean_param($_POST["reference"], PARAM_PATH);
- $courseid = $_POST["id"];
+$reference = required_param('reference', '', PARAM_PATH);
+$courseid = required_param('id', '', PARAM_INT);
+$scormid = optional_param('instance','', PARAM_INT);
+
+if (confirm_sesskey() && isteacher($courseid)) {
$launch = 0;
- if (isset($_POST["instance"])) {
- $scormid = $_POST["instance"];
+ if (!empty($scormid)) {
if (is_file($CFG->dataroot.'/'.$courseid.'/'.$reference)) {
$fp = fopen($CFG->dataroot.'/'.$courseid.'/'.$reference,"r");
$fstat = fstat($fp);

0 comments on commit b455078

Please sign in to comment.