fix points rounding in results view, clear results view on new scoring attempt.

This commit is contained in:
Ralf Teusner
2016-12-19 18:29:33 +01:00
parent f82737a7d4
commit a03d604861
2 changed files with 11 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ CodeOceanEditorEvaluation = {
*/
scoreCode: function (event) {
event.preventDefault();
this.clearScoringOutput();
this.createSubmission('#assess', null, function (response) {
this.showSpinner($('#assess'));
$('#score_div').removeClass('hidden');
@@ -139,6 +140,14 @@ CodeOceanEditorEvaluation = {
$('#output pre').remove();
},
clearScoringOutput: function() {
$('#results ul').first().html('');
$('.test-count .number').html(0);
$('#score').data('score', 0);
this.renderScore();
this.clearOutput();
},
printOutput: function (output, colorize, index) {
var element = this.findOrCreateOutputElement(index);
if (!colorize) {