Skip to content

msh-shiplu/CodeSpace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To use this software to share code in class, you will need to (1) install Sublime Text and (2) install a specific plug in for Sublime Text.

Student's installation

(1) Open Sublime Text

(2) Click Show Console in the View menu.

(3) Copy this code:

import os; package_path = os.path.join(sublime.packages_path(), "GEMStudent"); os.mkdir(package_path) if not os.path.isdir(package_path) else print("dir exists"); module_file = os.path.join(package_path, "GEMStudent.py") ; menu_file = os.path.join(package_path, "Main.sublime-menu"); version_file = os.path.join(package_path, "version.go"); import urllib.request; urllib.request.urlretrieve("https://raw.githubusercontent.com/msh-shiplu/CodeSpace/master/src/GEMStudent/GEMStudent.py", module_file); urllib.request.urlretrieve("https://raw.githubusercontent.com/msh-shiplu/CodeSpace/master/src/GEMStudent/Main.sublime-menu", menu_file); # urllib.request.urlretrieve("https://raw.githubusercontent.com/msh-shiplu/CodeSpace/src/version.go", version_file)

(4) Paste copied code to Console and hit enter.

(5) In Sublime Text: (i) specify a folder on their computers to store local files, (ii) set the server address, which is shown when the server is run, and (iii) complete the registration by simply entering your given username.

Teacher's installation

Web portal

    http://server_address:course_port/

For example

    http://192.168.86.189:8088/

Running the GEM server

The instructor must run the GEM server. The server can be run permanently or each time class starts.

Method 2 (deployment mode): Download the latest server (Windows, MacOS) and make them executable on teacher's computer. This command-line server needs to be run on the teacher's computer every time GEM is used in class.

(6) First-time configuration: Add teachers

    ./gem -c config.json -add_teachers teachers.txt

Add students

    ./gem -c config.json -add_students students.txt

Run the server

    ./gem -c config.json

Examples of files containing configurations, teachers and students: config.json, teachers.txt, students.txt

(7) When the server is run for the first time after teachers and students are added, teachers and students must configure their Sublime Text modules by going through 3 steps in Sublime Text: (i) specify a folder on their computers to store local files, (ii) set the server address, which is shown when the server is run, and (iii) complete the registration by simply entering their usernames, as specify in teachers.txt and students.txt.

These steps are done only once. In subsequent usage, there is no need to go through these steps (even though the teacher's computer has a new IP address.)

Development mode

Install latest version of Go. Run these on the command line inside src folder.

  • go mod init GEM
  • go mod tidy
  • go get github.com/mattn/go-sqlite3

(6) First-time configuration: Add teachers

    ./go run *.go -c config.json -add_teachers teachers.txt

Add students

    ./go run *.go -c config.json -add_students students.txt

Run the server

    ./go run *.go -c config.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •