Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/allenyu94/gatol-html in…
Browse files Browse the repository at this point in the history
…to gh-pages
  • Loading branch information
saurabhmitra committed Nov 26, 2015
2 parents 0fc3613 + 3c330b1 commit c98274c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2><a name="solution">Our Solution</a></h2>
<h1 class="gatol">Game-a-Thon</h1>
<p><center>And that's exactly we did.</center></p>
<div class="center">
<img src="images/game_example.png">
<img src="images/blobbers_example.png">
</div>
<p><b>Game-a-Thon</b> is not your average, run-of-the-mill learning tool—a series of lecture videos with quizzes or set of plain flashcards. Instead, Game-a-Thon takes learning to a new level by utilizing the power of <em>games</em> to make learning engaging and fun, rather than a thorn in your side!</p>
<p>The Game-a-Thon online learning platform makes learning and training easy, both for those in charge and those following the lead. Using Game-a-Thon, <em>trainers</em> can create games from an assorted collection of game templates, input their own questions and answers, and assign the game to their students to complete. <em>Students</em> just have to register to login see their assignments and complete them by playing the games. Trainers can view their students' statistics on their games and unassign games from students at any time.</p>
Expand Down
2 changes: 1 addition & 1 deletion dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div id="game_preview">

<div class="padding_top50 col">
<img id="game_preview_img" class="img_med" src="images/game_example.png">
<img id="game_preview_img" class="img_med">
</div>

<div class="padding_top50 col2">
Expand Down
29 changes: 29 additions & 0 deletions js/create_game.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ var CreateGame = (function() {
});

create_container.on('click', '#delete_csv_btn', function(e) {
qset = $('.csv_item.selected');
try {
qset_li = qset[0].closest('li');
} catch (err) {
alert("Please select a csv");
return;
}
del_id = qset_li.id;

token = getCookie('auth_token');


var delSuccess = function(data) {
console.log(data)

bar = $('#' + del_id).next('div');
$('#' + del_id).remove();
bar.remove();
};

var delFailed = function(data) {
consoleError(data);
alert("You have games that rely on this CSV. You can not delete it.");
};


url = '/api/question_sets/';
makeDeleteRequestWithAuthorization(url + del_id, token, delSuccess, delFailed)

});

Expand All @@ -28,6 +56,7 @@ var CreateGame = (function() {
qset_li = qset[0].closest('li');
} catch (err) {
alert("Please select a csv");
return;
}
finish.question_set_id = qset_li.id;
finish.game_template_id = template_li.id;
Expand Down
8 changes: 2 additions & 6 deletions js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ var DashBoard = (function() {
var a = document.createElement('a');
var bar = document.createElement('div');

a.innerHTML = "Score: " + stat.score + ", Date: " + stat.date;
a.innerHTML = "Score: " + stat.score + ", Date: " + stat.updated_at.substring(0, 10);
bar.setAttribute('class', 'fullbar');
li.appendChild(a);
ul.appendChild(li);
Expand All @@ -335,18 +335,14 @@ var DashBoard = (function() {
consoleError(data);
};

//game_instances/stats?game_id=<>

if (trainer) {
if (trainer == "true") {
url = '/api/game_instances/summary?game_id=' + current_game_id;
makeGetRequestWithAuthorization(url, token, trainerStatsSuccess, statsFailure);
} else {
url = '/api/game_instances/stats?game_id=' + current_game_id;
makeGetRequestWithAuthorization(url, token, studentStatsSuccess, statsFailure);
}




var leaderboardSuccess = function(data) {
$("#leader_list li").remove();
Expand Down

0 comments on commit c98274c

Please sign in to comment.