Skip to content

Commit

Permalink
Merge branch 'sachin'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwetzel committed Jul 24, 2015
2 parents 2b3d808 + a298240 commit 8cdfe74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion www/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ define([
}
}
}


//due to a recent change of adding activities, a work around to add query.a in case its not given
if(!query.a){
query.a = "construction";
}
//Load Activity Parameters
//query.a gives the input activity through url
var activity_config;
Expand Down
4 changes: 2 additions & 2 deletions www/task_fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
if(isset($_GET['u']) && isset($_GET['m'])){
$user = mysqli_real_escape_string($mysqli,$_GET['u']);
$mode = $_GET['m'];
$activity = $_GET['a'];
$activity = !empty($_GET['a'])?$_GET['a']:"construction";
$query = <<<EOT
SELECT * FROM session WHERE session.user = '$user' AND session.section = '$section' AND session.mode = '$mode' AND session.activity = '$activity' AND session.problem = '$shortProblemName' ORDER BY session.time DESC LIMIT 1
EOT;
Expand Down Expand Up @@ -198,4 +198,4 @@ function printModel($row){
header("Location: http://$host$uri/$extra");
}
mysqli_close($mysqli);
?>
?>

0 comments on commit 8cdfe74

Please sign in to comment.