CS 241 ISA Duties

This page describes important tasks CS 241 ISAs must do throughout the term. The focus of this page is mostly on tasks that require technical knowledge or step-by-step instructions (rather than e.g. "set up a meeting with the course instructor").

"Beginning of Term" Tasks

Access The Course Account

Ensure you are able to access the course account. There are detailed instructions at CourseAccountSshKeyAccess.

In summary, you need to generate an SSH key pair, which consists of a public key and a private key, and then the public key must be copied to the /u/cs241/.ssh/authorized_keys file in the course account. The copying of the public key is usually done automatically, but if the automated system is not working then your ISC or someone else with course account access can copy it into the file manually. Once it has been copied, you can use the private key to access the course account through SSH.

Test The Course Email Account

We will be using Connect for the course email account. The email address is cs241@uwaterloo.ca. This is identical to how you use Connect for your personal uwaterloo account. The username is cs241 and the password will be given to you by the ISC.

Make sure that you are comfortable with Connect as important course emails from instructors, the ISC and the students will be sent to this account.

Update The Course Webpage

All the files for the course webpage are stored in /u/cs241/public_html. The HTML source for the main page of the site is in the file index.html. Changes you make to files in public_html will be reflected immediately on the course webpage.

Usually the previous ISA will do some of the tasks below for you, but not all.

  • Clear out any announcements.
  • Update the "Syllabus" link to point to the current term's syllabus.
  • Update the "Schedule of Classes" link to point to current term's schedule.
  • Update the "Personnel" section to list the current term's instructor and ISA. Make sure to change the office hours as well.
  • Comment out the content of the "Exams" section and replace it with something like "Information to be announced".
  • Comment out the assignment links on the main page (except possibly Assignment 1, depending how early the instructor wants it to be available) and update the due dates.
  • On each individual assignment page, update the due dates and change any references to the previous term (e.g. if it says "Fall 2012" anywhere, change it to "Winter 2013"). Also, comment out the code that creates links to the next assignment page, but leave the text alone (you can ignore links to the previous assignment page or to another assignment on the same page).
  • In the "Resources" section, comment out the links to lecture notes and other resources (if any).
  • Comment out the "Tutorial Materials" links and update the URLs (e.g. if the URL contains "tutorial_f12", change it to "tutorial_w13").
  • Under "Additional Reference Material", comment out the "Materials for Assignment N" links (except for Assignment 1).
  • Update the Piazza links (in the "Piazza" section, as well as the "Jump to" thing near the top) to point to the current term's Piazza class.
Additionally, make sure permissions on folders are set correctly (this can be done using the "chmod" command). Assignment folders (other than Assignment 1) should not be readable or executable by "others" if you do not want students to peek at future assignments before they are released. If you don't want students to look at tutorials from previous terms, disable read and execute permissions for "others" on these folders as well (if they aren't disabled already).

Update The Google Calendar

There is a Google Calendar on the course website that shows the following information:

  • Lecture times
  • Tutorial times
  • Office hours
  • Assignment deadlines
  • Midterm and final exam times (when available)
The calendar is on the Google account cs241uwaterloo@gmail.com. Ask your ISC for the password.

Use repeating events for things like lectures, tutorials and office hours to make it easier to set them up, but make sure the events stop repeating before the exam period so students don't get confused.

Set Up Marmoset

Before you can do any of the following setup, the current term's offering of CS 241 must be added to Marmoset and the build servers must be set up (normally done by CSCF) and your ISC must give you instructor privileges on Marmoset. If you have instructor privileges, you will be presented with three accounts to select from when you log in instead of the usual single account: "userid", "userid-student", and "userid-canonical". Select "userid" (the other two are for special purposes). Then click the offering of CS 241 corresponding to the current term, and click the "Instructor View" link near the top of the page. Instructor View mode allows you to access the administrative functions of Marmoset.

Giving Students Access To Marmoset

  1. Follow the instructions on MountingCourseAccountOnCampus so that you can browse the contents of the course account from your office computer. Alternatively, download the classlist from the course account to your personal computer.
  2. The classlist is a hidden file. If you have activated the corresponding crontab task (see Activate Crontab Tasks below) a non-hidden copy of the classlist will get created/updated hourly. It's strongly recommended to enable hidden files in Finder (see this page for instructions) if you want to open the hidden file directly.
  3. From Instructor View mode, click "Register UW students for this course by uploading a classlist file".
  4. Ensure that "Limit user ID to first 8 characters" is selected, then browse for the classlist and upload it.
The classlist will change frequently for the first few weeks of the term. You should repeat this process regularly until the classlist stabilizes to ensure every student enrolled in the course has access to Marmoset. The classlist upload tool will not create duplicate students, so you can just reupload the whole list every time.

You may need to give an individual student who is not in the classlist access to Marmoset (e.g. a student on the waiting list who is not officially in the course yet). In this case click "Register one student for this course using a web interface". Fill out their information.

You may also need to give instructors or TAs access to Marmoset. For this, use the link "Register an Instructor or TA for this course using a web interface" and fill out their information.

Setting Up Marmoset Projects

Each assignment problem in CS 241 gets its own Marmoset project. Here is how to create a project:

  1. Click "create new project" from Instructor View.
  2. For the "project number" and "project title", enter the assignment problem name (e.g. A2P7, A10P4, A5Bonus). It's important that they both use this format, because some of the scripts written for the course read from the project number, and others read from project title.
  3. Enter the due date for the corresponding assignment in the "on-time deadline" field. For the "late deadline", read the course outline or ask an instructor/ISC about the late policy for the term, and fill out the field accordingly. You can leave the "late constant" and "late multiplier" fields as the default values, as generally late mark calculation is handled by the MarmSql script.
  4. For the URL, use a link to the assignment page (e.g. https://www.student.cs.uwaterloo.ca/~cs241/a1/).
  5. The "description" can be left blank.
  6. For the "stack trace policy", select "the entire stack trace for Java or full output printed to stdout for C".
  7. Most other options can be left at their default settings. For the "canonical class account", you might want to change this to "youruserid-canonical" (if it is not the default) since you are the one creating the projects, but it doesn't really matter which canonical account is used.
  8. After setting up the project, upload the corresponding test and sol zip files to the project.
  9. After testing has succeeded, navigate to the utilities page for the project and set up the correct weighting for each test case.
  10. Finally navigate to the course home page and make sure all parts are labelled active.
Repeat this for every assignment problem. There is currently no automatic or fast way of doing this; you may wish to spread out the project creation over the term if doing it all at once is too mind-numbing. A more detailed walkthrough of steps 8-10 is under Uploading Test Setups and Canonical Solutions tab.

Uploading Test Setups And Canonical Solutions

After creating the projects, you need to upload and activate the test scripts for each assignment problem.

Important: It is important to note that the problem numbers for test setups and canonical solutions (referred to as "stubs") may not match the ones on the assignment page if the course has recently changed. You must check that each problem solutions correspond to the file asked. For example, if the previous term removed a problem, all following problems would be offset by 1. You need to upload the test setup and solutions for the corresponding problem, not necessarily the one with the same name. Try to keep the stub names up to date with the course to avoid causing problems for future ISAs!

  1. Log in to the course account, then from there type ssh cs241t@linux.student.cs.uwaterloo.ca to log in to the cs241t account. This special account is where Marmoset tests are executed and where the test setups are stored.
  2. From the home directory, type mkstubs. This creates "stubs" for each of the Marmoset test setups in /u/cs241t/assignments and stores them in /u/cs241t/stubs. (See Marmoset for more information about how these "stubs" are used.)
  3. Follow the instructions on MountingCourseAccountOnCampus but mount the cs241t account instead of cs241. Alternatively, download all the stubs to your personal computer.
  4. Go to the "Utilities" page for the project you want. Find the "Upload new test setup" form and navigate to the folder containing the stubs. Look for a file called aXpY.test.zip, where "aXpY" is the assignment name (e.g. a4p2). This should be the test setup for that project (it might not be if the assignment specification changed since the previous term, or if the folder names in /u/cs241t/assignments were not properly updated).
  5. After the test setup is uploaded, upload the canonical solution via the "Project submission via jar file for canonical account" form. The canonical solution is also stored in /u/cs241/stubs as aXpY.sol.zip.
  6. Once both the test setup and canonical solution are uploaded, the canonical solution will be run against the test setup to check for correctness. If the test fails, try running mkstubs again to regenerate all the stubs, then upload the test setup and canonical solution again. If it still fails, there could be an error in the test scripts or the solution.
  7. Once the test passes, click "assign points" to assign marks to each test case. See CompSci241MarmMarks for a table of mark values. If the assignment problem has changed since that table was last updated and it's no longer valid, you can look at the previous term's Marmoset, ask the instructor, or just make up reasonable values. Update the CompSci241MarmMarks table with the new values afterwards.
  8. After assigning marks, the test setup will be active, though the project will not be visible to students until you click the "Make visible" button. Verify that the test setup works correctly before you click this button, since you cannot (easily) make a project invisible after it has been made visible.
Repeat this for every assignment problem. There is currently no automatic or fast way of doing this.

Set Up Piazza

  1. Go to http://piazza.com and log in under your own credentials - userid@uwaterloo.ca.
  2. Create a new CS 241 class for the current term. The previous term's ISA or the current term's instructor may have done this already. If not, the process should be fairly straightforward. When asked whether you want to enroll as a student, TA, or professor, you can select "professor" (not sure what the differences are between professor or and TA accounts, but the latter might have less privileges).
  3. Modify the class settings by clicking "Manage Class" on the top bar. You can probably leave most of the settings at their defaults, but look through to see if there is anything that you think needs changing. It is recommended that you disable anonymous posting; if disabled, then students will still be able to be anonymous to classmates but not to instructors. It is easier to help students if you know their name since you can look up their assignment submissions on Marmoset (or test them with MarmSql).
  4. Enroll the instructor(s) and your ISC. There is a form for this on the class settings page; just copy and paste their emails in. Your ISC may also ask you to enroll the TAs.
  5. Enroll the students. As with the instructor(s) and the ISC, there is a form for this on the class settings page that allows you to copy and paste the student's emails in. You can use the command "clem extract classlist-emails.txt" to generate a file called classlist-emails.txt containing a list of all student emails. This file might also be automatically generated by the crontab for you if the corresponding crontab task is activated (see Activate Crontab Tasks below).
The classlist will change frequently for the first few weeks of the term. You should repeat the last step (enrolling students) regularly until the classlist stabilizes to ensure every student enrolled in the course has access to Piazza. The form for enrolling students is smart enough to figure out which email addresses are already enrolled and avoid creating duplicate students.

Some students might use an "@edu.uwaterloo.ca" instead of an "@uwaterloo.ca" email address for Piazza. If these students are having trouble logging in, direct these students to https://piazza.com/account_settings and ask them to add their @uwaterloo.ca email under "Other Emails". This will link both emails to one account and they should be able to log in.

Check Permissions On CS 241 Tools

Log in to the course account and navigate to /u/cs241/pub. This "public" folder contains tools such as cs241.binasm and mips.twoints that students must use throughout the term. However, we do not want all of the tools to be available at the very start of the term (for example, if cs241.binasm was available at the start then students could use it to do Assignment 1 very easily). To ensure students do not have access to particular tools, you need to check that the previous term's ISA reset the file permissions correctly (and set them yourself if they did not).

You can check the permissions on a file (or directory) in Unix by typing ls -l filename. It will display something like this:

-rwxr-xr-x 1 cs241 cs241 389 Sep 13  2011 filename

The leftmost part of the output (the sequence of dashes and letters) is a representation of the file permissions. If you do not know how to read Unix file permissions, you can find explanations online. The last three characters of this permission string are particularly important, since they define what permissions are available to "others" (that is, all users aside from the owner of the file and users in the "CS 241" group). For example, the last three characters of the permission string for filename are r-x, which means that every user has permission to read and execute filename, but does not have permission to write to the file.

In general, the "others" permissions on files and directories under /u/cs241/pub should be set as follows:

  • If students should be allowed to freely browse the files in a directory, the directory should have r-x permissions. Otherwise, it should probably have --- permissions.
  • If students are allowed to execute a program or script, it should have r-x permissions. For the Java classes under /u/cs241/pub/classes, it seems to be sufficient to use r-- permissions. If students should not be allowed to execute the program, it should have --- permissions.
Use the chmod command to add or remove permissions. You can find guides for using this command online. The variations you will probably use most often are chmod o-rx file (remove read and execute permissions for "others" from file) and chmod o+rx file (add read and execute permissions for "others" to file).

Most of the tools students will use are accessed through the wrappers under /u/cs241/pub/wrappers. These wrappers check if a particular Java class is readable or program is executable, and if not, display an informative error message to the students. Some other tools are in /u/cs241/pub/bin. Here is a list of all the tools that are currently relevant in the course, with paths are given relative to /u/cs241/pub:

  • wrappers/cs241.wordasm: Limited assembler students use for Assignment 1. Calls Java class classes/cs241/wordasm.class.
  • wrappers/cs241.binasm: Standard assembler students use for most of the course. Calls Java class classes/cs241/binasm.class.
  • wrappers/cs241.linkasm: Linking assembler used late in the course. Calls Java class classes/cs241/linkasm.class.
  • wrappers/cs241.DFA: DFA recognizer used in Assignment 5. Calls Java class classes/cs241/DFA.class.
  • wrappers/cs241.cfgcheck: Tool for checking validity of the context-free grammar files used in Assignment 6. Calls Java class classes/cs241/CFGCheck.class.
  • wrappers/cs241.cfgrl: Tool for converting the .cfg-r files from Assignment 7 to ordinary context-free grammar files. Calls executable bin/cfgrl.
  • wrappers/cs241.slr: Tool for generating .lr1 files used by the parser written in Assignment 7. Calls Java class classes/jslr/Jslr.class.
  • wrappers/cs241.merl: Tool for converting MERL files to plain MIPS files. Calls Java class classes/cs241/merl.class.
  • bin/mips.array: MIPS simulator for running MIPS files with array input.
  • bin/mips.twoints: MIPS simulator for running MIPS files with two integer parameters.
  • bin/wlp4c: Reference implementation of the WLP4 compiler.
  • bin/wlp4scan: Reference implementation of the WLP4 scanner.
  • bin/wlp4parse: Reference implementation of the WLP4 parser.
  • bin/wlp4icheck: Tool for checking the format of .wlp4i files (which represent WLP4 program parse trees).
  • bin/cs241.linker: Linker used in conjunction with cs241.linkasm late in the course.
  • bin/marmoset_submit: Command line tool for submitting to Marmoset.
Here are the recommended guidelines for how the "others" permissions should be set at the start of the term. The previous ISA may have done this for you already but you should double check everything.
  • All programs in "wrappers" should be readable and executable. To control access, change permissions on the programs or Java classes pointed to the by the wrappers.
  • Most of the aforementioned programs in "bin" should be readable and executable, with two possible exceptions:
    • You may want to make wlp4c inaccessible. The reason is there is a not-well-known command line argument that makes it output assembly source code instead of machine code. Since the assembly code output includes a print subroutine, students could potentially steal this print subroutine and use it for Assignment 2. This is pretty unlikely but it could happen.
    • You may want to make cs241.linker inaccessible. Past versions of the course had a linking assignment that would be trivialized by the linker. If you are planning to bring back this assignment, make cs241.linker inaccessible.
  • Definitely make sure bin/marmoset_submit is readable and executable - students will want to use this pretty soon after the course starts and will be confused if it's not working. There's no real reason for an ISA to disable this but double check it just in case.
  • Under the classes folder:
    • Make sure cs241/wordasm.class is readable.
    • Make sure cs241/binasm.class and cs241.linkasm.class are not readable. Any class with "asm" in its name (hexasm, relasm) is probably a leftover assembler from an earlier version of the course, and should be disabled as well.
    • cs241/linker.class should not be readable - I believe this is an outdated version of the linker and we don't want students to accidentally use it.
    • Probably all other classes under the cs241 folder should be readable - a lot of them are not relevant until later assignments but they also don't allow students to cheat or do stuff more easily.
    • Classes under other folders (jslr, mips, uw) should probably already have permissions set correctly, and should not be touched unless they are not working.

Activate Crontab Tasks

The Unix tool cron allows tasks to be scheduled and automatically executed at certain times. The tasks and the times at which they will be executed are defined by a "crontab" (cron table) file. Each user has a personal crontab they can edit.

The main CS 241 crontab is stored on the ubuntu1804-002.student.cs.uwaterloo.ca server. (Not only does each user have a personal crontab, but each server has its own set of crontabs for each user.) If you modify the CS 241 crontab on some other server, you will see it does not have the same tasks defined as the main one (most likely it will be empty). You can define new tasks on this server's crontab and they will still be executed, but it is best to keep all the task definitions in one place. If the CS 241 crontab is moved to some other server, update this paragraph.

The CS 241 crontab currently contains the following tasks:

  • Automatically create and update a non-hidden copy of the classlist with the comments and blank lines removed. This is just for convenience.
  • Automatically create and update a list of student emails. This is again for convenience.
  • Update the scoreboard for the compiler optimization contest.
  • Save a daily backup of the CS 241 crontab in /u/cs241/bin/crontab-backup in case the original is lost or overwritten.
At the beginning of the term, most of these tasks will be deactivated (i.e. commented out, by putting a "#" at the start of the line that defines the task). To activate these tasks, log in the course account on the server where the crontab is stored. The command crontab -l will display the crontab, and crontab -e will open it in a text editor. The crontab is fully documented, so it should be clear which lines correspond to the tasks you need to activate. Remove the "#" from the beginning of these lines, then save and exit.

The tasks you should activate are:

Well, nothing really. Currently crontab tasks are not really used in this course except for the compiler optimization scoreboard, and the task for the compiler optimization scoreboard doesn't need to be activated until late in the term. You may wish to activate the tasks for creating a non-hidden classlist and a student email list just for convenience, but you can also create these yourself by running the commands shown in the crontab. If you do activate any crontab tasks, you should also activate the task that creates a backup of the crontab.

Create Course Staff File For Current Term

Several scripts used by ISG-supported courses expect there to be a file in the home directory of the course account containing information about the course staff for the current term. This file is not used very much in CS 241, but you should set it up nonetheless.

The file should be stored in /u/cs241 and should be named .coursestaff.XXXX, where XXXX is a number corresponding to the current term. The term number should be in the "MFCF format":

  • The first two digits encode the current year, e.g. 12 for 2012.
  • The last two digits encode the starting month of the term: 01 for January, 05 for May, or 09 for September.
For example, the file for Fall 2012 would be called .coursestaff.1209, and the file for Winter 2015 would be called .coursestaff.1501. The command termcode -m returns the number corresponding to the current term in this format.

The format of the course staff file is described at ClassListPerlModule, though it is not necessary to include the information about lectures, tutorials, labs, etc. as mentioned on that page. It should be easy to figure out what the file should contain by looking at examples from previous terms. Here is an example course staff file (where each "userid" should be replaced with the appropriate user ID of the ISA, ISC or instructor):

userid:tutor::::
userid:isc::::
userid:instructor::::

Note the term "tutor" is used instead of ISA (a long time ago, ISAs were known as "Tutors"). Also, you aren't limited to one ISA, ISC or instructor; you can have multiple lines for different ones.

You can check that this file is set up correctly by visiting the marks page on the CS 241 website. This page uses the course staff file to give staff access to a special interface for looking up student marks. Also, the page you get when lookup a student's marks uses the course staff file to display the ISC's name.

"During the Term" Tasks

Update The Course Webpage

Throughout the term, make the following updates to the course webpage:

  • Uncomment assignment links when the assignments are released. Make sure to enable read and execute permissions for "others" on the assignment folders as well.
  • On each assignment page, make sure the links that let you go forward/backward between assignments are working.
  • If the instructor wants their lecture notes posted on the course webpage, post them under the "Resources" section.
  • After releasing an assignment, uncomment the corresponding "Material for Assignment N" section under "Additional Reference Material".
  • Uncomment tutorial material links after each tutorial.
  • Sometime before the midterm and final respectively, add the links to the corresponding information page under the "Exams" section.
  • After the midterm marks are released, set up the midterm remarking form (see Set Up And Close Down Midterm Remarking Form) and add a link to it under the "Exams" section. Disable the remarking form once the deadline passes.

Update The Google Calendar

Update the calendar when you learn the time and place of the midterm and final exam. Also be sure to update it if there are any changes throughout the term to scheduled events like office hours, assignment deadlines, or (less likely) tutorials and lectures.

Upload Unofficial Marks

CS 241 has a page where students can view their unofficial marks. (These are referred to as "public marks" in many places for some reason, even though students can only view their own marks.)

You should update this page shortly after the on-time deadline and late deadline for each assignment, and perhaps also after any extensions students have on the assignment pass. Do not update it too frequently, as then clever students will be able to look at their marks to determine if they passed release tests without using tokens.

You should also update this page after midterm marks are released, and after any handmarking results are released.

Here is how you update this page:

  1. Navigate to ~/marks/raw (where ~ is the CS 241 course account home directory). If it is the start of the term, delete all the contents. At any other time, when you need to download marks for an assignment, type ~/bin/marm_sql -v -m AX, where X is the assignment number.
  2. When you need to upload MarkUs marks or Crowdmark midterm results, download the CSV file from MarkUs or Crowdmark respectively and put them in ~/marks/raw. Note that these files need to have specific names or the script that creates the public marks file won't pick them up. If Markus or Crowdmark changes the name format of the CSV files they output, you may need to edit the ~/marks/bin/pubmarks.py script to work with the new names.
  3. Edit ~/marks/bin/pubmarks.py to update the names of the following to the correct values. The script's documentation should guide you through the details of how to edit each field:
    1. The midterm file name, the midterm marks total, and whether the midterm marks should be released yet.
    2. The weightings associated with each question on each assignment.
    3. Which assignments have a handmarking portion.
  4. Run ~/marks/bin/pubmarks.py to create public-marks.txt.
  5. Check the result at the public marks page on the course webpage with a few random students to make sure everything worked correctly and the marks were computed correctly. This is particularly important for midterm and handmarking marks due to the aforementioned issue with the names.
Note that the script determines whether you are allowed to see students' marks by whether you are present in the course staff file ~/.coursestaff.[termcode], so if it isn't letting you view the public marks page make sure that file is set up correctly first.

Give Students Access To CS 241 Tools For Each Assignment

Throughout the term, you should give students access to the tools they need to do the assignments.

Here are the recommended guidelines for how the "others" permissions on the tools should be set throughout the term.

  • Make sure ~/pub/classes/cs241/binasm.class and ~/pub/classes/cs241/linkasm.class are readable after Assignment 1 and before Assignment 2.
  • Make sure ~/pub/classes/cs241/DFA.class is readable before Assignment 5.
  • Make sure ~/pub/bin/wlp4c is readable and executable after Assignment 2 and before Assignment 5.
  • Make sure ~/pub/classes/cs241/CFGCheck.class is readable before Assignment 6.
  • Make sure ~/pub/bin/wlp4scan is readable before Assignment 6.
  • Make sure ~/pub/bin/cfgrl is readable and executable before Assignment 7.
  • Make sure ~/pub/bin/wlp4parse is readable and executable before Assignment 7.
  • Make sure ~/pub/classes/jslr/Jslr.class is readable before Assignment 7.
  • Make sure ~/pub/bin/wlp4icheck is readable and executable before Assignment 8.
  • Make sure ~/pub/bin/cs241.linker is readable and executable before Assignment 9.

Give Students Access To Print And Allocation Libraries Once Code Generation Assignments Are Available

There are two MIPS assembly language libraries ( print.asm and alloc.asm) students must use in the code generation assigments. We only want students who are enrolled in the course to be able to access these. This is done through the use of a .htaccess file, which currently must be manually created each term. Note that this file also needs to have read permissions turned on for "others".

Navigate to /u/cs241/public_html/a10/lib, the directory where the print.asm and alloc.asm libraries are stored. There should be a script in there called mk_require.bash. Run this script and it will generate a file called require_list.txt, which consists of a bunch of lines of the form "require user userid" for each student in the classlist. Then open the hidden .htaccess file in a text editor and copy and paste the contents of require_list.txt into the .htaccess file (below the comment that says "student list from require_list.txt"). Students who are in the require_list.txt (which should be all students enrolled in the class) should now have access to the libraries. You can manually add yourself to the .htaccess file if you want to confirm that the authentication system is working.

Set Up And Close Down Midterm Remarking Form

After the midterm marks are released, you should set up the form that lets students submit midterm remarking requests. After the deadline for remarking requests, you should disable the form (unfortunately it needs to be disabled manually).

On the course account, navigate to ~/public_html/cgi-bin/midterm_remarking and open the requests.cgi file. Change the "deadline" variable to the deadline for the term. Once you want to open the form, change the "beforeDeadline" variable to true. Now students should be able to submit requests. The link to the form should be commented out somewhere on the course website's index.html page; uncomment it to make it available to students. If you want to change the text shown on the form page, look near the bottom of the requests.cgi script.

Note that students can break the form if they put certain things in the "Page" field - for example if they write "Page 2/16" instead of just "2". Keep this in mind if students are getting errors after you open the form.

When it's time to close the form, simply set "beforeDeadline" to false.

The remark request data is stored in ~/public_html/cgi-bin/mditerm_remarking/data, grouped by page number. Page number grouping may not be ideal for actually handling the remark requests, so there is a script called group-by-students.bash in the midterm_remarking folder which will group the requests by student and store them in a folder called "students". This script has hard-coded assumptions about the structure of the .classlist file, and may break if the format of the .classlist file changes. It is also very slow to run (since for each student, it searches the entire request list to find that student's requests) but it should only need to be run once.

Activate Bonus Scoreboard Once Optimization Bonus Is Available

The automatically updating scoreboard for the compiler optimization bonus problem (usually part of Assignment 10) is handled by the CS 241 crontab (see the Activate Crontab Tasks section above) and the make_scoreboard script.

Navigate to /u/cs241/bin and open the file make_scoreboard. There should be instructions in the comments of the script telling you which variables to change and how.

Once this file is properly updated, open the crontab and uncomment the line that calls the make_scoreboard script and updates the scoreboard. If the line isn't there for some reason, add it:

*/5 * * * * /bin/bash -c "/u/cs241/bin/make_scoreboard > /dev/null"

The scoreboard should start updating every 5 minutes once you do this. Activate the crontab task that backs up the crontab as well, if it isn't activated already.

Run Moss To Check For Plagiarism

Your ISC will ask you to run Moss (plagiarism checking system for code) on some of the assignment problems. The exact set of assignment problems used can vary slightly from term to term. Once you know which assignment problem you will be running Moss on, see RunningMoss for details on the process.

"End of Term" Tasks

Fill In The Marks Spreadsheet

The official CS 241 marks spreadsheet, used to compute final grades, is stored under /u/cs241/marks. It should be named something like TERM_CS241_Grades.xls, e.g. F12_CS241_Grades.xls. A template spreadsheet should be stored under the /u/cs241/marks folder; if not, ask your ISC for the template. To open it, you should log on to one of the office Macs and follow the instructions on MountingCourseAccountOnCampus so you can browse the files on the course account through Finder. Then double-click the file to open it in Excel.

Alternatively, you can download it and use an Excel-compatible spreadsheet program on your own computer. If you use the online version of Excel or a similar online tool like Google Sheets, make sure to delete the spreadsheet after grades are submitted! We don't want student grades to leak if your account is compromised.

You don't need to update the official CS 241 marks spreadsheet throughout the term. However, at end of the term you will need to do each of the following tasks:

  • Transfer the student information from the classlist file into the spreadsheet.
  • Transfer the assignment and midterm marks from the public-marks.txt file into the spreadsheet.
  • Enter the final exam marks in the spreadsheet.

Importing The Classlist And Assignment/Midterm Marks

If you are using Excel through your office computer (after mounting the course account), these first two tasks may already be done for you - there is a feature in Excel called "Get External Data" for automatically importing data from external files. The spreadsheet might be set up to use this feature. To make it work you will need to run the following command to create a sorted, non-hidden copy of the classlist for Excel to import:

sed -e 's/#.*//' -e '/^$/d' /u/cs241/.classlist | sort -t: -k2 > /u/cs241/classlist.txt

This may be done automatically for you if you have activated the corresponding crontab task. Note that once the final classlist is imported into the spreadsheet you should deactivate this crontab task because near the very end of the term, the classlist changes to next term's classlist. You don't want to import next term's classlist into the current term's spreadsheet!

If the "Get External Data" feature is not enabled or not working, it is not necessary to use it - just manually copy the data from the classlist in into the "classlist" sheet and from public-marks.txt into the "public-marks" sheet. The "Get External Data" feature was more useful when the marks spreadsheet needed to be updated throughout the term rather than just at the end of the term. The Outdated Information section contains instructions for setting up "Get External Data" if you really want or need to use it.

Once all the information has been imported successfully, check the main worksheet; it should now contain students' names and assignment marks (and midterm marks if they have been added to public-marks.txt).

Entering Final Exam Marks

After the final exam marking is complete, you can download a CSV file containing all the marks from Crowdmark (assuming Crowdmark is being used in the course in the current term).

Open the "Final" worksheet in the main spreadsheet, and modify the existing question numbers and mark values to reflect the current term's final exam. Then transfer the data from the Crowdmark CSV into the main spreadsheet. This may require some editing of the Crowdmark CSV file to make the formats match up.

Once you have entered the marks in the "Final" worksheet, they should also appear on the main worksheet. When assignment, midterm and final exam marks are all added, the final grades should be calculated and shown in the corresponding column. Make sure the final grades on the main worksheet are correct, since these marks are the ones that will eventually be submitted to the Registrar's Office!

Archive Course Material

At the end of each term, course-related files are stored in /u/cs241/archives under a directory named after the corresponding term number.

The/u/cs241/archives/archive.sh script will do most of the archiving for you. Run it with the current termcode as the argument (you can use the termcode command to get this code) and make sure there are no errors when copying.

The saved contents are things like, the main index page, the midterm and final folders, the assignment pages, the cgi-bin folder, the course outline, and the tutorial materials and solutions (you do not need to archive the whole public_html directory), the handin folder (particularly important to archive, since the Moss scripts (see RunningMoss) will look at archived student submissions from previous terms to catch students who plagiarize from people who have already taken the course), the make_scoreboard script, etc. You can look at the source of the script to see exactly what it archives.

The archive.sh script does not copy are the assignment testing scripts used by Marmoset (assignments folder on cs241t), so you should copy those yourself using scp.

The archive.sh script does not copy the LaTeX source for the tutorials or the midterm and final review sessions (unless the sources are stored under public_html for some reason). Make sure to archive these in case the next term's ISA wants to make adjustments to the tutorials.

You should download annotations and rubric criteria from Markus for each assignment and put them in the markus_files folder. The archive.sh script creates this folder, but does not automatically put the annotations and rubrics in it.

Finally, copy any other files that have changed significantly from the previous term or are specific to the current term, and are not already copied by the archive.sh script.

You should empty the contents of the following directories once you have confirmed that everything is archived properly:

  • handin/ EXCEPT the base, external, and moss-bin folders
  • markus/ EXCEPT the bin folder
  • public_html/cgi-bin/midterm_remarking/data/
  • public_html/cgi-bin/studentCard/cards/

Deactivate Crontab Tasks

See the Activate Crontab Tasks section for an explanation of what the crontab is and how to edit it.

Sometime after the end of lectures, but before the very end of the term, you should disable all crontab tasks except the crontab backup.

To deactivate a task, add a # character at the start of the corresponding line to comment the line out.

Remove Access To CS 241 Tools

To ensure that students will not have access to tools that trivialize early assignments (like the assembler for A1) at the start of the next term, set the appropriate permissions on all the tools. See the Check Permissions on CS 241 Tools section for information about the tools; set them back to the recommended "start of term" state. You should wait until after the final exam to do this so students can still use the tools while they study.

This is not strictly necessary, since it can be done by the next term's ISA, but it will help the next term's ISA a bit if you do it in advance.

Clean Up Website

Complete as many of the tasks in the Update The Course Webpage section as you can. Again, this is not necessary, but it will reduce the next ISA's workload a bit.

Delete Or Remove Confidential Information

When the term ends, you should do the following to ensure that the next ISA is not able to access any confidential information.

  • Delete all emails from the course email account. Delete emails from the inbox as well as the sent mail folders. It is best to do this at the very end of the term once you are no longer checking or using the course email account. At this time you should also disable any email forwarding functionality you have set up.
  • Delete the marks spreadsheet and public-marks.txt file once final grades have been submitted. Aldo empty the ~/marks/raw folder.
  • Log in to the CS 241 Piazza account and un-enroll from the current term's offering of CS 241. This is done so the next ISA cannot read private questions from previous terms. Note that it might be difficult to re-enroll in the class once you have done this, so don't do it until you no longer need to read Piazza anymore.
  • If you have any papers with confidential information, put them in boxes for shredding. You might not have anything to shred now that midterms are handled using Crowdmark rather than kept in the ISA's office.

Update the TWiki

  • If any information you read on the TWiki during this term was inaccurate or out of date, update it.
  • If any of the explanations of how to do certain tasks were unclear, rewrite them.
  • If there are any tasks requiring technical knowledge that you had to do throughout the term, and they aren't documented on this page, add them.
  • If you think of a better way to organize the CS 241 section of the TWiki than having most of the information on this giant page, reorganize it.
  • If the assignments changed in any way since the previous term (e.g., number of questions changed, number of marks per question changed, new test cases were added) you will probably need to update the mark values on CompSci241MarmMarks.
  • If you made any changes or extensions to MarmSql, the PublicMarksUploader, or the Moss scripts, update those pages with the information and upload the new versions.
  • If you wrote any new scripts or tools for future ISAs to use, create a new TWiki page explaining what they are and how to use them.
  • If you think of anything else that should be on this list of things to update, add it.

Outdated Information

This section is for information from previous terms that is no longer relevant or correct due to changes in the course.

Updating The Classlist When CS 241E Is Running

CS 241E (enriched version) and CS 241R (regular version, that is, this course) used to have a combined classlist. They seem to have separate classlists now. Here are instructions for working with the combined classlist in case they ever get merged again for some reason.

The .classlist file contains the students from both the regular and enriched version of the ourse. If CS 241E is currently running this term, you will need to run the script ./parse_classlist.bash on a regular basis until the classlist stabilizes. This script makes the files .classlist_241e and .classlist_241r. You will need to upload .classlist_241r instead of the .classlist file so that the CS 241E students will not have access to the CS 241R Marmoset, Piazza, and Markus.

Adding An Access Code For Piazza

In some terms, Piazza has been protected with an "access code" to prevent students who are not enrolled from viewing it. This probably isn't necessary but if you are requested to add one by an instructor or your ISC, instructions are below.

In "Manage Class", under "Class Information" there should be an "Access Code" option you can click on to add the access code. If there is no such option, you may need to email team@piazza.com asking them to make it available.

Old Method Of Updating Bonus Scoreboard Script

The automatically updating scoreboard for the compiler optimization bonus problem is handled by the CS 241 crontab (see the Activate Crontab Tasks section above) and the make_scoreboard script.

In the past, this script needed to be updated every term by manually editing some giant SQL queries. Now updating it is much simpler - you just change a few variables at the top of the file. Here are the old instructions for updating the script.

  1. Navigate to /u/cs241/bin and open the file make_scoreboard.
  2. Find the "project PK" for the A10Bonus Marmoset project. You can find this by clicking the "view" link for the A10Bonus project and looking at the URL; it will look something like https://marmoset.student.cs.uwaterloo.ca/view/instructor/project.jsp?projectPK=1000. Take this number and search through the make_scoreboard script for all occurrences of "project_pk" and update the corresponding value.
  3. The structure of the make_scoreboard script looks something like a sequence of commands of the form make sc 'giant SQL query' X, where X is some file path. Look for the queries where X is private/a10bonus, a10bonus_ontime, and a10bonus_topten. These correspond to updating the "ontime" scoreboard. Within the corresponding SQL query, change the date and time in submission_timestamp < [date/time]= part to the deadline of A10 for the current term.
  4. For the command make sc 'giant SQL query' private/a10bonus_topten, change the submission_timestamp < [date/time]= to some time after the final exam.
  5. If you intend to submit some stuff to the A10Bonus problem with your user account, add the condition AND NOT students.campus_uid LIKE "userid" to each SQL query (where "userid" is your user ID). This will ensure your submissions do not show up on the scoreboard.

Using "Get External Data" With The Marks Spreadsheet

In the past, the CS 241 marks spreadsheet was set up to import the classlist and assignment marks automatically so it would stay up to date throughout the term. (It might still be set up to do this or it might have been broken at some point.) This is not really necessary anymore since the marks spreadsheet is usually just updated once at the end of the term. If you want to use external data imports, here are instructions for setting them up.

Open the marks spreadsheet. If you get a security warning notifying you that "data connections have been disabled" (or something similar), there should be a button on the warning that lets you re-enable the data connections; you must do this or the external data imports will not work. Now navigate to the "public-marks" worksheet. If the external data imports were already set up in a previous term, then hopefully you should see all the public-marks.txt data in this sheet. If the data is not there, or outdated data is displayed, try clicking "Refresh" under the "External Data Sources" section of the "Data" tab. If this doesn't fix the problem, you need to set up the external data import again. There are instructions for doing this in the spreadsheet, as well as below.

  1. Go to Insert > Name > Define. If "public-marks" is a defined name, delete it. Then delete all the data in this sheet (if any).
  2. Highlight cell A1 then go to Data > Get External Data > Import Text File and import the file /u/cs241/marks/public-marks.txt. When asked which delimiters to use, choose "Comma".
  3. Right click anywhere in the imported data and select "Data Range Properties". Make sure "Save query definition" and "Refresh data on file open" are checked, and "Prompt for file name on refresh" and "Remove external data from worksheet before saving" are unchecked.
Now navigate to the "classlist" worksheet. Again, the classlist data may already be in this sheet, or you may have to set up the external data import again. The instructions for setting up the import are below:
  1. Go to Insert > Name > Define. If "classlist" is a defined name, delete it. Then delete everything to the left of column P, if there is any data there.
  2. If so, highlight cell A1 then go to Data > Get External Data > Import Text File and import the file /u/cs241/classlist.txt. When asked which delimiters to use, choose "Other" and type a colon.
  3. Right click anywhere in the imported data and select "Data Range Properties". Make sure "Save query definition" and "Refresh data on file open" are checked, and "Prompt for file name on refresh" and "Remove external data from worksheet before saving" are unchecked.
Edit | Attach | Watch | Print version | History: r44 < r43 < r42 < r41 < r40 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r44 - 2020-04-28 - SylvieDavies
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback