Index: mod/choice/view.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/choice/view.php,v
retrieving revision 1.102.2.11
diff -u -r1.102.2.11 view.php
--- mod/choice/view.php	30 Nov 2009 17:12:18 -0000	1.102.2.11
+++ mod/choice/view.php	21 Jun 2010 14:10:22 -0000
@@ -1,10 +1,10 @@
-<?php  // $Id$
+<?php  // $Id: view.php,v 1.102.2.9 2009-02-09 09:52:59 danmarsden Exp $
 
     require_once("../../config.php");
     require_once("lib.php");
 
     $id         = required_param('id', PARAM_INT);                 // Course Module ID
-    $action     = optional_param('action', '', PARAM_ALPHA);
+    $action     = optional_param('action', '', PARAM_ALPHANUM);
     $attemptids = optional_param('attemptid', array(), PARAM_INT); // array of attempt ids for delete action
     
     if (! $cm = get_coursemodule_from_id('choice', $id)) {
@@ -42,10 +42,15 @@
     if ($form = data_submitted() && has_capability('mod/choice:choose', $context) && confirm_sesskey()) {
         $timenow = time();
         if (has_capability('mod/choice:deleteresponses', $context)) {
-            if ($action == 'delete') { //some responses need to be deleted     
+            if ($action == 'delete') { //some responses need to be deleted
                 choice_delete_responses($attemptids, $choice->id); //delete responses.
                 redirect("view.php?id=$cm->id");
             }
+
+            if (preg_match('/^\d+$/', $action, $matches)) { // Move selected responses to new option
+                choice_move_responses($attemptids, $choice->id, $matches[0]); //move responses.
+                redirect("report.php?id=$cm->id");
+            }
         }
         $answer = optional_param('answer', '', PARAM_INT);
 
