Skip to content

Commit

Permalink
1.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMacLab committed Jun 20, 2014
1 parent 2189b4d commit 5f2b76e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion game-on.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description: Adds support for a point system and currency for your users.
Authors: Semar Yousif, Vincent Astolfi, Ezio Ballarin, Forest Hoffman, Austin Vuong, Spencer Nussbaum, Isaac Canada
Author URI: http://maclab.guhsd.net/
Version: 1.7.6
Version: 1.7.7
*/
include('go_datatable.php');
include('types/types.php');
Expand Down
24 changes: 19 additions & 5 deletions types/tasks/task_shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,6 @@ function go_task_shortcode($atts, $content = null) {
$test_mastery_passed = $wpdb->get_var("SELECT `m_passed` FROM ".$go_table_ind." WHERE post_id = $id AND uid = $user_ID");
$_SESSION['test_mastery_passed'] = $test_mastery_passed;
}

echo "<pre>";
var_dump($test_all_answers);
echo "</pre>";
?>
<script language="javascript">
jQuery(document).ready(function() {
Expand Down Expand Up @@ -577,6 +573,15 @@ function check_locks() {
}
}

function flash_test_err() {
jQuery('#go_test_error_msg').animate({
color: "white"
}, 200, function() {
jQuery('#go_test_error_msg').animate({
color: "red"
}, 200);
});
}

// function display_failure(count) {
// if (jQuery('#failure_surprise').length == 0) {
Expand Down Expand Up @@ -786,12 +791,21 @@ function task_unlock() {
if (response == 'Incorrect password!') {
jQuery('.go_lock_message').text('Incorrect password, try again.');
}
var error_msg_val = jQuery('#go_test_error_msg').text();
if (error_msg_val.length > 0) {
flash_test_err();
}
jQuery('#go_test_error_msg').text(response);
} else if (which == 'pass'){
// display_failure(response);
jQuery('.go_lock_message').text('Incorrect password, try again.');
} else if (which == 'test') {
jQuery('#go_test_error_msg').text("Wrong answer, try again!");
var error_msg_val = jQuery('#go_test_error_msg').text();
if (error_msg_val.length == 0) {
jQuery('#go_test_error_msg').text("Wrong answer, try again!");
} else {
flash_test_err();
}
}
}
// console.log("\nresponse:"+response);
Expand Down

0 comments on commit 5f2b76e

Please sign in to comment.