Skip to content
Browse files

MDL-17050 excorising $_POST - thanks to mikec for patch merged from HEAD

  • Loading branch information...
1 parent 062b672 commit a82fa6146a57f57be750900aaf52a60470a6e142 danmarsden committed Oct 31, 2008
Showing with 5 additions and 5 deletions.
  1. +5 −5 mod/choice/report.php
View
10 mod/choice/report.php
@@ -3,10 +3,11 @@
require_once("../../config.php");
require_once("lib.php");
- $id = required_param('id', PARAM_INT); //moduleid
- $format = optional_param('format', CHOICE_PUBLISH_NAMES, PARAM_INT);
- $download = optional_param('download', '', PARAM_ALPHA);
- $action = optional_param('action', '', PARAM_ALPHA);
+ $id = required_param('id', PARAM_INT); //moduleid
+ $format = optional_param('format', CHOICE_PUBLISH_NAMES, PARAM_INT);
+ $download = optional_param('download', '', PARAM_ALPHA);
+ $action = optional_param('action', '', PARAM_ALPHA);
+ $attemptids = optional_param('attemptid', array(), PARAM_INT); //get array of responses to delete.
if (! $cm = get_coursemodule_from_id('choice', $id)) {
error("Course Module ID was incorrect");
@@ -33,7 +34,6 @@
add_to_log($course->id, "choice", "report", "report.php?id=$cm->id", "$choice->id",$cm->id);
if ($action == 'delete' && has_capability('mod/choice:deleteresponses',$context)) {
- $attemptids = isset($_POST['attemptid']) ? $_POST['attemptid'] : array(); //get array of repsonses to delete.
choice_delete_responses($attemptids); //delete responses.
redirect("report.php?id=$cm->id");
}

0 comments on commit a82fa61

Please sign in to comment.
Something went wrong with that request. Please try again.