Browse files

Give Up button modified to send results and set status to abandoned. …

…Microincrement version to 2006052200 (release = v2.1.20)
  • Loading branch information...
1 parent 3e55705 commit 01f31282645d102c9d442a5fbcaf69b02028079e gbateson committed May 22, 2006
Showing with 9 additions and 7 deletions.
  1. +1 −1 mod/hotpot/README.TXT
  2. +6 −4 mod/hotpot/lib.php
  3. +2 −2 mod/hotpot/version.php
View
2 mod/hotpot/README.TXT
@@ -1,4 +1,4 @@
-This is v2.1.19 of the HotPot module
+This is v2.1.20 of the HotPot module
This module allows teachers to administer Hot Potatoes and TexToys quizzes via Moodle.
It has been tested on:
View
10 mod/hotpot/lib.php
@@ -1604,11 +1604,13 @@ function insert_submission_form($attemptid, $startblock, $endblock, $keep_conten
$this->insert_form($startblock, $endblock, $form_name, $form_fields, $keep_contents);
}
function insert_giveup_form($attemptid, $startblock, $endblock, $keep_contents=false) {
- $form_name = 'giveup';
+ $form_name = ''; // no <form> tag will be generated
$form_fields = ''
- . '<input type="hidden" name="attemptid" value="'.$attemptid.'" />'
- . '<input type="hidden" name="status" value="'.HOTPOT_STATUS_ABANDONED.'" />'
- . '<input type="submit" value="'.get_string('giveup', 'hotpot').'" class="FuncButton" onfocus="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseover="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" />'
+ . '<button onclick="Finish('.HOTPOT_STATUS_ABANDONED.')" class="FuncButton" '
+ . 'onfocus="FuncBtnOver(this)" onblur="FuncBtnOut(this)" '
+ . 'onmouseover="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" '
+ . 'onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)">'
+ . get_string('giveup', 'hotpot').'</button>'
;
$this->insert_form($startblock, $endblock, $form_name, $form_fields, $keep_contents, true);
}
View
4 mod/hotpot/version.php
@@ -3,8 +3,8 @@
/// Code fragment to define the version of hotpot
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006050201; // release date of this version (see note below)
-$module->release = 'v2.1.19'; // human-friendly version name (used in mod/hotpot/lib.php)
+$module->version = 2006052200; // release date of this version (see note below)
+$module->release = 'v2.1.20'; // human-friendly version name (used in mod/hotpot/lib.php)
$module->cron = 0; // period for cron to check this module (secs)
// interpretation of YYYYMMDDXY version numbers
// YYYY : year

0 comments on commit 01f3128

Please sign in to comment.