Algomorph / CodeGrader

A Chrome browser plugin for aiding the teaching assistants grade code style on student's homework project submissions at the CS department of University of Maryland, College Park.
Other
7 stars 4 forks source link

Code syntax highlighting in MSS #35

Open Algomorph opened 4 years ago

Algomorph commented 4 years ago

Some work has already been done on this with the HLJS library (see highlightAllCheckedCode, hljs.initHighlightingOnLoad() and their attempted call in the main.js file).

However, HLJS cannot handle when code is split into a table. Hence, the only solution to get code highlighting to work on checked classes is to replace the HTMLTableElement for each one of these files with continuous text enveloped inside <pre><code>....</code></pre>. This means that a lot of submit_server_ui.js methods that highlight code and add buttons/labels within will have to be modified, and that all methods doing line-by-line processing would need to rely on CodeFile.codeLines property instead of the <tr> element collections / trCodeLines property.

Algomorph commented 3 years ago

It's unclear right now whether we need to be concerning ourselves with this. Ideally, this would be a Marmoset Submit Server issue. I know the UMD department is going to be doing some work on updating software infrastructure over the summer, perhaps the rumored "Submit Server v2" is going to be finally deployed (or, at least, worked on a lot). Deferring till at least 1.0 release.