@@ -27,7 +27,7 @@ import type { JupyterNotebook, Cell } from "@cocalc/jupyter/nbgrader/types";
27
27
28
28
export function create_autograde_ipynb (
29
29
instructor_ipynb : string ,
30
- student_ipynb : string
30
+ student_ipynb : string ,
31
31
) : { autograde_ipynb : string ; ids : string [ ] } {
32
32
const instructor = JSON . parse ( instructor_ipynb ) ;
33
33
const student = JSON . parse ( student_ipynb ) ;
@@ -45,7 +45,7 @@ export function create_autograde_ipynb(
45
45
// TODO: be more clever within inserting this...? What does nbgrader upstream do?
46
46
console . warn (
47
47
"WARNING: student deleted locked cell with grade_id (inserting at end for now)" ,
48
- grade_id
48
+ grade_id ,
49
49
) ;
50
50
student . cells . push ( copy ( instructor_cell ) ) ;
51
51
} else {
@@ -175,10 +175,12 @@ function get_score(output: object, lang: string): number | undefined {
175
175
output [ "traceback" ] != null || // has a traceback
176
176
output [ "ename" ] != null || // name of the error
177
177
output [ "evalue" ] != null || // metadata about error
178
- output [ "output_type" ] == "error" || // it's an error output
179
- output [ "name" ] == "stderr" // writing to stderr stream
178
+ output [ "output_type" ] == "error" // it's an error output
180
179
) {
181
180
// If there is any traceback or error indication at all, it's obviously 0 points.
181
+ // However, the one thing that is NOT zero points is 'output["name"] == "stderr"'
182
+ // since warnings output to stderr with some kernels (e.g., R), and there's a lot
183
+ // of cases when warnings are OK.
182
184
return 0 ;
183
185
}
184
186
if ( output [ "text" ] == null ) {
0 commit comments