diff --git a/showattempts.php b/showattempts.php
index aa3aecb..041c16f 100755
--- a/showattempts.php
+++ b/showattempts.php
@@ -154,6 +154,8 @@
function game_showattempts($game){
global $CFG, $DB, $OUTPUT;
+ $allowdelete = optional_param('allowdelete', 0, PARAM_INT);
+
$userid = optional_param('userid',0,PARAM_INT);
$limitfrom = optional_param('limitfrom', 0, PARAM_INT);
$gamekind = $game->gamekind;
@@ -203,8 +205,11 @@
foreach( $recs as $rec){
echo '
';
echo '';
- if( $rec->timefinish == 0){
- echo "\r\nwwwroot}/mod/game/showattempts.php?attemptid={$rec->id}&q={$game->id}&action=delete\">";
+ if( ($rec->timefinish == 0) or $allowdelete){
+ echo "\r\nwwwroot}/mod/game/showattempts.php?attemptid={$rec->id}&q={$game->id}&action=delete";
+ if( $allowdelete)
+ echo '&allowdelete=1';
+ echo '">';
echo '';
}
echo ' | ';
diff --git a/version.php b/version.php
index 60b460b..0450899 100755
--- a/version.php
+++ b/version.php
@@ -11,7 +11,7 @@
defined('MOODLE_INTERNAL') || die();
$module->component = 'mod_game'; // Full name of the plugin (used for diagnostics)
-$module->version = 2013072903; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2013081301; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2010112400; // Requires Moodle 2.0
$module->cron = 0; // Period for cron to check this module (secs)
-$module->release = '3.7.29.3';
+$module->release = '3.8.13';