What You'll Learn
- how to create and embed codelab-style tutorials
- how to create and embed repl.it IDEs
- how to create and configure GitHub Classroom
- how to set up an entry-level assignment
What you're seeing is a codelab style tutorial.
- Easy to create (just a Google Doc or Markdown)
- Easy to compile (I already have all the scripts you need)
- Easy to host (generates simple html/css/js)
- Easy to embed in OnQ (huzzah!)
Creating
- Create folder
XYZ
with main.md
markdown file and assets
directory
- Special syntax, like
Duration: <min>
for each subheading
- Subheadings become pages
- Images and other files go into an
assets
directory
Download this (CIST) tutorial [here].
Compiling
- Put the claat binary and build script bash file in the parent directory
- Run
./go.sh build XYZ
to build
For those that don't want to use a Linux binary from some random faculty member (good security practice, perhaps!), you can find the releases to download or build claat yourself [here].
What go.sh
does (just an excuse to show code):
#!/bin/bash
STYLE="#codelab-feedback, google-codelab div#codelab-nav-buttons, #done { display: none; } <\/style>"
# Actual code doesn't have spaces around '*'.
# Bash scripts just render funny with '/*/'.
if [ "$1" = "build" ]
then
./claat export -o $2/build/ $2/main.md
sed -i "s/<\/style>/$STYLE/g" $2/build/ * /index.html
sed -i "s/>Download</><paper-button class=\"colored\" raised=\"\">Download<\/paper-button></g" $2/build/ * /index.html
cp -rf $2/assets $2/build/ * /
elif [ "$1" = "serve" ]
then
cd $2/build/
./../../claat serve
fi
Hosting
- You can run
./go.sh serve XYZ
to serve it locally
- The
XYZ/build/
directory is a simple html/css/js site that you can place anywhere.
Embedding
- Zip up the
build
directory,
- Upload it to OnQ.
- Unzip in OnQ.
- Profit!
Pre-configure and embed simple code IDEs
- Supports 55 different languages
- Can preconfigure / add packages
- Multi-user (multi-cursor) support
- Embeddable, and users view a clone
Setup
- Create a repl (choosing language)
- Set it up (installing packages / adding files)
- Click "Share", and copy embed code
- Profit!
General highlights:
- Course corresponds to a GitHub organizaiton
- Individual classrooms created for course
- TA's and instructors are set as "owners"
- Students are imported and connected to GitHub account
- Submissions are individual repositories, and auto-grading feasible.
- Adding class
- Classroom settings
- Roster maintenance
Roster Strategy (optional)
I'd rather not expose student ID's, emails, etc., as the course may have hundreds of students. The following strategy will get around that.
- Export your classlist from OnQ.
- Add a column in excel with random strings to ID the students anonymously.
- Export that list of random strings to seed GitHub Classroom roster.
- Export the UserID, Rand columns as a csv (just two entries per line, and comma separated)
- Give (4) to Doug to set up the server script.
- Use the following in a starting quiz or assignment:
<p>For the GitHub Classroom question, please use the following code, unique to you:</p>
<p><iframe src="https://research.cs.queensu.ca/home/muise/204-f20/?id={UserId}" scrolling="no" frameborder="0" allowfullscreen="true"></iframe></p>
- Replace
muise
with your own username on innovate
- Replace
204-f20
with whatever directory name you want (and tell Doug)
- The
{UserId}
is a shortcode that means each student will see their own unique key.
Objective
Create an initial trivial assignment to make sure students can use the course software and submission platform.
Highlights
- Create assignment, assign due date
- Make repos private
- Use template repository
- Specify Repl.It as IDE (adds button to README.md)
- Configure run command and language
- Add tests / autograding
- (optional) Enable a pull request for feedback. Info [here]
- Share assignment link to all students
Settings for grading
Test name
| Check submission
|
Setup command
| sudo -H pip3 install pytest nnf
|
Run command
| pytest test.py
|
Timeout
| -
|
Points
| 1
|
What happens
- Students will "connect" their GitHub accounts to the classroom ID only once.
- A repo will be created for them, with access only given to the student and teaching staff
- If autograding is setup, summary statistics will be available to instructors
Happy curriculum construction!