Skip to content
/ pl-ucb-csxxx Public template

Example course structure for PrairieLearn

Notifications You must be signed in to change notification settings

ace-lab/pl-ucb-csxxx

Repository files navigation

Welcome! New here?

If you're new, please use this repo's wiki to get started!

Did you just have a course created for you?

If so, this repo was used as a template, and your course repo's name should be pl-SSS-CCC, where SSS is your project institution name (ucb, csulb, ecc) and CCC is the lowercase course number at your institution (eg pl-ucb-cs169a, pl-ecc-csci8, etc).

We (UCB PL admins) should already have created a team pl-dev-SSS-CCC that has write access to your repo; email us the names of any course staff who should have access. WARNING: your repo will likely contain sensitive content such as exam questions. Be careful who has access. All access to PL repos is by teams, not by adding individuals, to keep access control manageable.

  • Delete (meaning git rm) the elements subdirectory, unless you specifically want to use the custom elements in here (see below for some documentation)
  • Delete the contents of serverFilesCourse and clientFilesCourse
  • Delete the contents of courseInstances (you'll add your own later)
  • Delete the contents of questions/, which will be replaced with your course's questions
  • Immediately update this README.md and infoCourse.json to reflect the info for your course, including inserting a valid UUID for the course. You can run uuidgen at a shell prompt to make one. Important. Just about every type of thing in PL -- course, question, element, etc. -- has a UUID (Universally Unique ID). You can generate one by typing uuidgen at a terminal window or by using the UUID generator. For safety, in the template repo all UUID values have been set to "9999...". In your new repo, immediately git rm any files you do not need, and in the files that remain, replace every UUID with a fresh one.

Note: Although it has become customary to name the primary Git branch main rather than master, do not do so for PL repos as the server will not be able to sync them. The server will only sync to the master branch.

Developing Prairielearn materials with this repo

We now have a configuration to launch a devcontainer with Prairielearn launched automatically! The primary benefit of this is to enable demos/development without installing docker (or even an IDE!) locally -- see "Run in the cloud" below.

Run in the cloud / browser

Screenshot 2024-06-12 at 10 58 32 AM 1. Click the "Code" dropdown on the page of this branch (will also work on master once merged) 2. Click the "Codespaces" tab 3. Click the "+" to create a new codespace 4. You will be dropped into a VSCode web editor - If you prefer your local IDE, then you can connect to the codespace via an extension ([vscode](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) | [intellij](https://plugins.jetbrains.com/plugin/20060-github-codespaces))

Run locally

  1. Have docker installed (desktop | headless) and (if you installed docker engine) your user given docker execution/configuration permissions
  2. Open this repo in your IDE
  3. Launch the devcontainer as supported by your IDE
    • VSCode:

      1. Install the Devcontainers extension Screenshot 2024-06-12 at 11 05 03 AM
      2. Open the Command Pallet (Ctrl+Shift+P (Windows,Linux) or Cmd+Shift+P (Mac)) and select "Dev Containers: Reopen in Container" Screenshot 2024-06-12 at 11 07 59 AM
    • IntelliJ: see their docs

    • Other IDEs will likely require the devcontainers cli and a remote (similar to ssh) connection to the started container. This process is rather involved and somewhat unstable as of 12 June 2024. If your IDE supports it, I recommend connecting to a codespace as detailed above ("Run in the cloud").