diff options
-rw-r--r-- | js/liststudy.js | 5 | ||||
-rw-r--r-- | js/reviewdesu.js | 4 |
2 files changed, 6 insertions, 3 deletions
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 += '<td>' + items[i].win + '</td>'; html += '<td' + (items[i].fail > 0 ? (items[i].fail > items[i].win ? ' style="background-color: #ff7777"' : ' style="background-color: #FFFF00"') : '') + '>' + items[i].fail + '</td>'; - html += '<td style="background-color: ' + (items[i].score == max_score ? '#00aa00' : (items[i].score > med_score ? '#55FF55' : '#FFFF00')) + '">' + items[i].score + '</td></tr>'; + html += '<td style="background-color: ' + + (items[i].score == max_score ? '#00aa00' : + (items[i].score > med_score ? '#55FF55' : + (items[i].score < 0 ? '#FF7777' : '#FFFF00'))) + '">' + items[i].score + '</td></tr>'; } html += '</table>'; html += '<p>Medium score : ' + med_score + '</p>'; 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 = '<p>Finished. Score : ' + score + '/100. Saving data...</p>'; 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(); } |