Giter VIP home page Giter VIP logo

module-code's Introduction

Edrys Code Editor Module

This module allows teachers and students to collaborate over some code and "run" it in some form. It is meant to be used with stations, where commands are going to be run using the the Command Runner Agent, for example to upload code to an embedded device or run it on locally and return the result.

Usage

Use this URL to add the module to your class:

https://edrys-org.github.io/module-code/

You may specify the following config:

Next, set up the Command Runner Agent on your station(s) to allow the module to run commands when the code is run. On the station device, you will be able to specify what commands will be run when students or teachers run the code. Every station has its own set of commands saved (they will be saved locally on each station).

The module will silently fail if the agent is not locally running in the station device (expected to be on the default port 8585).

You may optionally specify any of the following module config:

{
    "editorText": "Starting text in editor...",
    "terminalText": "Starting text in terminal...",
    "commands": "Default commands",
    "language": "cpp", // https://microsoft.github.io/monaco-editor
    "theme": "light"
}

Arduino example

Below is an exmaple where this module is used to allow students to upload code to a live Arduino station.

This is what students and teachers see in the station, where the top section is the code editor, and the bottom section is a terminal showing command output when the code is run (note dark theme is pictured):

When visiting the module on the station device itself, you will also be able to customize what commands will be run for that module (using $CODE in the commands to substitue for the submitted code):

Arduino CLI is set up manually beforehand on station devices.

module-code's People

Contributors

edrysorg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

module-code's Issues

General Editor Module

Hi, I think it would be great to have something like a general Editor module, without any additional functionality at all.
The idea is, that the editor module can be configured to publish on different topics, when the "run-button" is hit. Another module can be configured also, to listen this topic in promiscuity-mode, which then releases some kind of action.

I did this, within the following module, which will execute the code, that is published from other modules:

https://github.com/Cross-Lab-Project/pyxtermjs

This way one editor module could be used for different purposes, even within the same classroom.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.