Skip to content

Commit

Permalink
Block form submition when clicking enter (Fill in blanks) see #7270
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Apr 17, 2015
1 parent 3a0d681 commit 44443b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main/exercice/exercise_submit.php
Expand Up @@ -26,7 +26,7 @@
* Modified by hubert.borderiou (2011-10-21 question category)
*/

use \ChamiloSession as Session;
use ChamiloSession as Session;

require_once '../inc/global.inc.php';
$current_course_tool = TOOL_QUIZ;
Expand Down Expand Up @@ -236,7 +236,6 @@

$clock_expired_time = null;


if (empty($exercise_stat_info)) {
if ($debug) error_log('5 $exercise_stat_info is empty ');
$total_weight = 0;
Expand Down Expand Up @@ -833,7 +832,12 @@

echo '<script>
$(function() {
//$(".exercise_save_now_button").hide();
// Block form submition on enter
$(".block_on_enter").keypress(function(event) {
return event.keyCode != 13;
});
$(".main_question").mouseover(function() {
//$(this).find(".exercise_save_now_button").show();
//$(this).addClass("question_highlight");
Expand Down

0 comments on commit 44443b9

Please sign in to comment.