Open
Description
The current mission format allows us to select from a fixed set of libraries, such as TWO_DIM_RUNES, as in
<DEPLOYMENT interpreter="2">
<EXTERNAL name="TWO_DIM_RUNES">
<SYMBOL>beside</SYMBOL>
<SYMBOL>make_cross</SYMBOL>
...
These libraries are currently hard-wired into the Source Academy frontend. I suggest that we instead use JavaScript modules that we take from a folder lib in this assessments repository. More specifically, the IMPORT tag will include a relative path that is extended by the Source Academy to a full path to the master assessment repository of the Source Academy github organization.
Example:
<DEPLOYMENT interpreter="2">
<IMPORT module="cs1101s_1920/two_dim_runes">
<SYMBOL>beside</SYMBOL>
<SYMBOL>make_cross</SYMBOL>
This assessment would load the following module:
https://github.com/source-academy/assessments/tree/master/lib/cs1101s_1920/two_dim_runes.js
as if it was imported as follows:
import { beside, make_cross } from 'two_dim_runes';
assuming that the module two_dim_runes
is written like this:
export function beside(x, y) {
return ...;
}
export function make_cross(x) {
return ...;
}
Views?