Skip to content

Commit

Permalink
MDL-17050 excorising $_POST - thanks to mikec for patch merged from HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Oct 31, 2008
1 parent 062b672 commit a82fa61
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mod/choice/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
}
Expand Down

0 comments on commit a82fa61

Please sign in to comment.