From cd76af42463bd80539db8c9671a427a9f0fe5d69 Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sun, 20 Nov 2011 16:24:39 +0100 Subject: color change, rating change --- js/liststudy.js | 5 ++++- js/reviewdesu.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/liststudy.js b/js/liststudy.js index b33ed6c..4d715b8 100644 --- a/js/liststudy.js +++ b/js/liststudy.js @@ -59,7 +59,10 @@ function show_contents_table() { } html += '' + items[i].win + ''; html += ' 0 ? (items[i].fail > items[i].win ? ' style="background-color: #ff7777"' : ' style="background-color: #FFFF00"') : '') + '>' + items[i].fail + ''; - html += '' + items[i].score + ''; + html += '' + items[i].score + ''; } html += ''; html += '

Medium score : ' + med_score + '

'; diff --git a/js/reviewdesu.js b/js/reviewdesu.js index 2868dbb..45726dd 100644 --- a/js/reviewdesu.js +++ b/js/reviewdesu.js @@ -48,7 +48,7 @@ function prepare_questions() { function next_question() { if (questions.length == 0) { - score = Math.ceil(score * 50 / total); + score = Math.ceil(score * 100 / total); $("core").innerHTML = '

Finished. Score : ' + score + '/100. Saving data...

'; new Ajax.Request('index.php?p=brresults-study-' + batchid, { method: 'post', @@ -86,6 +86,6 @@ function show_answer() { function answer_question(a) { results.push([question.key, a]); - score += (a+1); + score += a; next_question(); } -- cgit v1.2.3