diff -Naur mod/scorm/locallib.php mod/scorm/locallib.php
--- mod/scorm/locallib.php	2010-04-26 12:49:36.298340000 +0200
+++ mod/scorm/locallib.php	2010-04-26 12:56:03.111008000 +0200
@@ -1131,11 +1131,11 @@
 * Delete Scorm tracks for selected users
 *
 * @param array $attemptids list of attempts that need to be deleted
-* @param int $scormid ID of Scorm
+* @param int $scorm Scorm object
 *
 * return bool true deleted all responses, false failed deleting an attempt - stopped here
 */
-function scorm_delete_responses($attemptids, $scormid) {
+function scorm_delete_responses($attemptids, $scorm) {
     if(!is_array($attemptids) || empty($attemptids)) {
         return false;
     }
@@ -1151,7 +1151,7 @@
         if (count($keys) == 2) {
             $userid = clean_param($keys[0], PARAM_INT);
             $attemptid = clean_param($keys[1], PARAM_INT);
-            if (!$userid || !$attemptid || !scorm_delete_attempt($userid, $scormid, $attemptid)) {
+            if (!$userid || !$attemptid || !scorm_delete_attempt($userid, $scorm->id, $attemptid)) {
                     return false;
             }
         } else {
diff -Naur mod/scorm/report.php mod/scorm/report.php
--- mod/scorm/report.php	2010-04-26 12:45:22.698408800 +0200
+++ mod/scorm/report.php	2010-04-26 12:45:02.768643800 +0200
@@ -110,7 +110,7 @@
     }
 
     if ($action == 'delete' && has_capability('mod/scorm:deleteresponses',$contextmodule) && confirm_sesskey()) {
-        if (scorm_delete_responses($attemptids, $scorm->id)) { //delete responses.
+        if (scorm_delete_responses($attemptids, $scorm)) { //delete responses.
             add_to_log($course->id, 'scorm', 'delete attempts', 'report.php?id=' . $cm->id, implode(",", $attemptids), $cm->id);
             echo $OUTPUT->notification(get_string('scormresponsedeleted', 'scorm'), 'notifysuccess');
         }
