RunestoneInteractive / RunestoneComponents

Packaging of the Runestone tools for publishing educational materials using github pages
http://runestoneinteractive.org
Other
101 stars 225 forks source link

Make activecode components clean up old errors before displaying new ones #1350

Closed ascholerChemeketa closed 2 years ago

ascholerChemeketa commented 2 years ago

Currently if a student is working in an activecode area, each attempt to build and run that has errors generates a new error box (each with identical html id) and displays it AFTER any existing error boxes created by previous attempts to build and run.

This deletes existing error boxes before displaying new ones.

An alternate approach would be to keep old errors, but display new errors on top where they are most visible and make it clear that the older boxes may no longer be relevant. I don't see much value in that unless the editor itself had a better sense of history.

bnmnetp commented 2 years ago

Strange, I do not see the problem you describe.

ascholerChemeketa commented 2 years ago

Sorry, I agree - looks like the code that is in runProg is doing this already. It was broken for me on a page, but I can't recreate it now. I think there must have been a character in the component's id that the js string template on line 1298 of activecode.js did not like.

bnmnetp commented 2 years ago

I noticed you were changing activecode_js.js Maybe this is isolated to Javascript activecodes only? I didn't check and am on vacation with pretty bad internet.