@@ -27,7 +27,7 @@ import type { JupyterNotebook, Cell } from "@cocalc/jupyter/nbgrader/types";
2727
2828export function create_autograde_ipynb (
2929 instructor_ipynb : string ,
30- student_ipynb : string
30+ student_ipynb : string ,
3131) : { autograde_ipynb : string ; ids : string [ ] } {
3232 const instructor = JSON . parse ( instructor_ipynb ) ;
3333 const student = JSON . parse ( student_ipynb ) ;
@@ -45,7 +45,7 @@ export function create_autograde_ipynb(
4545 // TODO: be more clever within inserting this...? What does nbgrader upstream do?
4646 console . warn (
4747 "WARNING: student deleted locked cell with grade_id (inserting at end for now)" ,
48- grade_id
48+ grade_id ,
4949 ) ;
5050 student . cells . push ( copy ( instructor_cell ) ) ;
5151 } else {
@@ -175,10 +175,12 @@ function get_score(output: object, lang: string): number | undefined {
175175 output [ "traceback" ] != null || // has a traceback
176176 output [ "ename" ] != null || // name of the error
177177 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
180179 ) {
181180 // 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.
182184 return 0 ;
183185 }
184186 if ( output [ "text" ] == null ) {
0 commit comments