Skip to content

Commit 2d148a0

Browse files
author
Philip Guo
committed
added 'expected' output to failed tests
1 parent 8befc57 commit 2d148a0

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

edu-python-questions.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,12 @@ function gradeSubmission() {
380380

381381
var debugBtnID = 'debug_test_' + i;
382382
var debugMeBtn = '<button id="' + debugBtnID + '" class="debugBtn" type="button">Debug me</button>';
383+
var expectedSpan = '<span class="expectedSpan">Expected: </span>';
383384

384-
$("#gradeMatrix tr.gradeMatrixRow:last").append('<td>' + sadFaceImg + debugMeBtn + '</td>');
385+
$("#gradeMatrix tr.gradeMatrixRow:last").append('<td class="statusCell">' + sadFaceImg + debugMeBtn + expectedSpan + '</td>');
386+
387+
var curCell = $("#gradeMatrix tr.gradeMatrixRow:last td.statusCell:last");
388+
renderData(res.expect_val, curCell.find('span.expectedSpan:last'), true /* ignoreIDs */);
385389

386390
$('#' + debugBtnID).unbind(); // unbind it just to be paranoid
387391
$('#' + debugBtnID).click(genDebugLinkHandler(i));

edu-python.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ table#gradeMatrix {
565565
table#gradeMatrix thead {
566566
font-weight: bold;
567567
border: solid;
568-
text-align: center;
568+
/*text-align: center;*/
569569
}
570570

571571
table#gradeMatrix td.testInputCell,
@@ -607,3 +607,7 @@ div#submittedSolutionDisplay {
607607
#pyGradingPane {
608608
margin-bottom: 20px;
609609
}
610+
611+
.expectedSpan {
612+
margin-left: 8px;
613+
}

0 commit comments

Comments
 (0)