Developers' Forum

change or extend ace editor

change or extend ace editor

by stefan weber -
Number of replies: 1

does anyone have experience with changing the default editor for coderunner?

i had a request from a teacher to either change it from ace to brackets, or to add some functionality to ace.

  • is it possible to change coderunner's default editor?
  • is it possible to add "plugins" to ace? (as far as i'm aware, it's a single .js file, so one would have to change that i suppose?
In reply to stefan weber

Re: change or extend ace editor

by Richard Lobb -

CodeRunner has its own internal API for UI plug-ins. Currently supported UIs are: Ace_UI, Graph_UI, Table_UI and Gapfiller_UI. The API (if you can call it that) is documented within the userinterfacewrapper.js file. So in principle you could provide the required wrapper for brackets as an alternative to Ace.

BUT ... brackets is big, with around 100 dependencies (see here). Getting all that to work seamlessly within Moodle is unlikely to be straightforward.

CodeRunner is meant to be a question-grading plug-in, not an IDE. In our environment, students develop and test their code in an IDE and then paste it into CodeRunner for testing. Even in tests and exams, we provide the standard IDEs to students. We call it "authentic assessment", as students are provided with all their usual programming tools. CodeRunner has a basic code editor (Ace) as a UI primarily just as a convenience to students who simply wish to make a trivial change to their code before resubmitting.

While I can see the temptation to build IDE-like features into CodeRunner, I don't think that's the right way to go. Students tend to have fairly strong ideas about what IDE they wish to use (like your teacher, perhaps?) and are liable to feel frustrated if forced to use just a built-in editor with restricted functionality. And I can see an almost endless stream of requests for improved functionality. Please can we have autocompletion? Please can we have multiple windows open at once? Please can we have an immediate run mode? Please can we upload and store our own files? Please can we have a decent debugger? etc etc.

But all the same, I'd be interested to hear what functionality your teacher would like to see, that isn't currently in Ace.