diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db15e9ac..9f25404b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.37.0 + rev: v0.41.0 hooks: - id: markdownlint args: ["--fix"] diff --git a/Configuration.md b/Configuration.md index f0a4cc0f..8c10210e 100644 --- a/Configuration.md +++ b/Configuration.md @@ -277,3 +277,9 @@ If you wish to use Learning Tools Interoperability (LTI) with Markus, you'll nee You must also create a private key for generating Javascript Web Tokens to sign LTI requests. A private key can be automatically created with the `markus:lti_key` rake task. + +If you wish to filter course creation requests from LTI deployments, add the following keys: + +- `lti.course_filter_file` must be the absolute path to a Ruby file that defines a method `LtiConfig::allowed_to_create_course?(lti_deployment)`, which takes an `LtiDeployment` model instance and returns `true` or `false`. +- `lti.unpermitted_new_course_message` must be a message to display if an LTI deployment is rejected by the filter. The message must be a string with interpolation key `%{course_name}`, which will be bound to the `title` field in the launch claim `https://purl.imsglobal.org/spec/lti/claim/context`. + - Example: `"You are not permitted to create a new MarkUs course for %{course_name}. Please contact your system administrator."` diff --git a/Developer-Guide--Set-Up-With-Docker.md b/Developer-Guide--Set-Up-With-Docker.md index 9ab84986..e69f2309 100644 --- a/Developer-Guide--Set-Up-With-Docker.md +++ b/Developer-Guide--Set-Up-With-Docker.md @@ -1,93 +1,93 @@ # Developer Guide: Set Up with Docker -## Downloading and Installing - If you want to get started on working on MarkUs quickly and painlessly, this is the way to do it. +## Downloading and Installing + 1. If you are using **Windows**, you will need to install Windows Subsystem for Linux (WSL) by following the instructions on [this page](https://docs.microsoft.com/en-us/windows/wsl/install-win10). (The "Simplified Installation" section is probably easiest, but you need to join the Windows Insiders Program with a Microsoft account.) - - If you are given a choice of what operating system to use, select *Ubuntu 20.04*. + - If you are given a choice of which operating system to use, select *Ubuntu 22.04*. -2. Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). +2. Install [Docker](https://docs.docker.com/get-docker/). - On Windows, make sure you've selected the "WSL 2 backend" tab under "System Requirements" and follow those instructions. - On Linux, also follow the instructions on "Manage Docker as a non-root user" [here](https://docs.docker.com/install/linux/linux-postinstall/). 3. If you are using **Windows**, you'll need to open a terminal into the WSL system you installed. *This is the terminal where you'll type in the rest of the commands in this section.* - 1. To start the WSL terminal, open the start menu and type in "ubuntu". Click on the "Ubuntu 20.04" application. (We recommend pinning this to your taskbar to make it easier to find in the future.) + 1. To start the WSL terminal, open the start menu and type in "ubuntu". Click on the "Ubuntu 22.04" application. (We recommend pinning this to your taskbar to make it easier to find in the future.) 2. Type in the command `pwd`, which shows what folder you're currently in. You should see `/home/` printed. If it isn't, switch to your home directory using the command `cd ~`. -4. Clone the Markus repository from GitHub by following the instructions in [Setting up Git and MarkUs](Developer-Guide--Setting-up-Git.md). (This is a document you will want to read very carefully and may come back to.) +4. Clone the Markus repository. 5. Change into the repository that you just cloned: `cd Markus`. -6. Run `docker compose build app`. +6. If you are on **Windows (WSL)** or **Linux**, you will need to configure Docker to make sure the application files are owned by a user with the same UID on your host machine as in the containers: - 1. On Linux running docker engine (not docker desktop): you will need to make sure that the files are owned by a user with the same UID on your host machine as in the container: - - Create a file named `docker-compose.override.yml` in the root directory of the MarkUs code (should be your current directory) - - Discover your current UID by running the `id -u` command - - Write the following to the newly created `docker-compose.override.yml` file (replace 1001 with the UID that you discovered in the previous step): + 1. Run the command `id -u`. If the output is `1001` you can skip this the rest of this step and move onto Step 7 below. Otherwise, keep going. + 2. Follow the first two steps in the [Installing and Configuring RubyMine](#installing-and-configuring-rubymine) section below to open the MarkUs repository in RubyMine. + 3. In the MarkUs repository, create a new top-level file named `compose.override.yaml`. + 4. Copy and paste the following text into the `compose.override.yaml` file, replacing `` with the number returned by `id -u` earlier. - ```yml - services: - app: + ```yml + services: + app: + build: + args: + UID: + rails: + build: + args: + UID: + ssh: + build: + args: + UID: + resque: + build: + args: + UID: + resque-scheduler: build: - args: - UID: 1001 - ``` + args: + UID: + webpack: + build: + args: + UID: + ``` - - now you can run `docker compose build app` +7. Run `docker compose build`. -7. Run `docker compose up rails`. The first time you run this it will take a long time because it'll install all of MarkUs' dependencies, and then seed the MarkUs application with sample data before actually running the server. When the server actually starts, you'll see some terminal output that looks like: +8. Run `docker compose up rails`. The first time you run this it will take a long time because it'll install all of MarkUs' dependencies, and then seed the MarkUs application with sample data before actually running the server. When the server actually starts, you'll see some terminal output that looks like: ```text - Puma starting in cluster mode... - * Version 4.3.1 (ruby 2.5.3-p105), codename: Mysterious Traveller - * Min threads: 0, max threads: 16 - * Environment: development - * Process workers: 3 - * Preloading application - * Listening on tcp://0.0.0.0:3000 - Use Ctrl-C to stop - - Worker 0 (pid: 185) booted, phase: 0 - - Worker 1 (pid: 193) booted, phase: 0 - - Worker 2 (pid: 201) booted, phase: 0 + => Booting Puma + => Rails 7.1.3.2 application starting in development + => Run `bin/rails server --help` for more startup options + [1] Puma starting in cluster mode... + [1] * Puma version: 6.4.2 (ruby 3.0.2-p107) ("The Eagle of Durango") + [1] * Min threads: 0 + [1] * Max threads: 5 + [1] * Environment: development + [1] * Master PID: 1 + [1] * Workers: 3 + [1] * Restarts: (✔) hot (✖) phased + [1] * Preloading application + [1] * Listening on http://0.0.0.0:3000 + [1] Use Ctrl-C to stop + [1] - Worker 0 (PID: 71) booted in 0.01s, phase: 0 + [1] - Worker 1 (PID: 75) booted in 0.01s, phase: 0 + [1] - Worker 2 (PID: 77) booted in 0.01s, phase: 0 ``` - 1. On **Windows**, open a separate WSL terminal (but leave the current one running), and type in the command `docker compose run --rm rails bash`. This will take you into the Docker container; you'll see the prompt change to `app/$`. - - 2. Run the command `rails js:routes`, which will take a moment to generate a required file. - -8. Open your web browser and type in the URL `localhost:3000/csc108`. The initial page load might be slow, but eventually you should see a login page. Use the username `instructor` and any non-empty password to login. +9. Open your web browser and type in the URL `localhost:3000/csc108`. The initial page load might be slow, but eventually you should see a login page. Use the username `instructor` and any non-empty password to login. *Tip*: to terminate the Rails server, go to the terminal window where the server is running and press `Ctrl + C`/`⌘ + C`. - On Windows Home Edition, you'll need to use the Docker container's IP address instead: `192.168.99.100:3000/csc108`. -9. In a new terminal window, go into the Markus directory again and run `docker compose run rails rspec` to run the MarkUs test suite. This will take several minutes to run, but all tests should pass. - - **Troubleshooting** - - - If you see a test failing with the following message near the top: - - ```text - 1) SubmissionsController#get_file When the file is a jupyter notebook file should download the file as is - Failure/Error: _stdout, stderr, status = Open3.capture3(*args, stdin_data: file_contents) - - Errno::ENOENT: - No such file or directory - /app/nbconvertvenv/bin/jupyter-nbconvert - ``` - - Run the following commands: - - ```console - docker compose run --rm rails bash # This takes you into the Docker container - python3.8 -m venv /app/nbconvertvenv - /app/nbconvertvenv/bin/pip install wheel nbconvert - ``` - - Then try re-running the tests. You can do this from your current terminal (inside the Docker container) simply by running `rspec`. +10. In a new terminal window, go into the Markus directory again and run `docker compose run --rm rails rspec` to run the MarkUs test suite. This will take several minutes to run, but all tests should pass. Hooray! You have MarkUs up and running. Please keep reading for our recommended developer setup. @@ -99,7 +99,7 @@ We strongly recommend RubyMine (a JetBrains IDE) for all MarkUs development. 2. Open the MarkUs repository in RubyMine. - - On Windows, your repository will be located at `\\wsl$\Ubuntu-20.04\home\\Markus`. + - On Windows, your repository will be located at `\\wsl$\Ubuntu-22.04\home\\Markus`. 3. Complete the setup steps under [Docker: Enable Docker Support JetBrains guide](https://www.jetbrains.com/help/ruby/docker.html#enable_docker). @@ -117,7 +117,7 @@ We strongly recommend RubyMine (a JetBrains IDE) for all MarkUs development. ## Installing Pre-Commit Hooks -We use [pre-commit](https://pre-commit.com/) to run automated checks on code before each commit. To set this up on your local computer (not in Docker): +We use [pre-commit](https://pre-commit.com/) to run automated checks on code before each commit. To set this up on your local computer (*not* in a Docker container): 1. First, install Python 3. 2. Then, install the pre-commit library: `$ python3 -m pip install pre-commit` (or just `python` instead of `python3`, depending on your Python executable. @@ -133,11 +133,11 @@ After this, these checks will run every time you make a commit. If all checks pa Here's a summary of the few most common tasks you'll use in your development. - Start the MarkUs server: `docker compose up --no-recreate rails` -- Run the MarkUs rspec test suite: `docker compose run rails rspec` -- Run a specific rspec test file: `docker compose run rails rspec FILE` -- Run the Markus Jest test suite: `docker compose run rails npm run test` -- Run the Markus Jest test suite with the test coverage shown: `docker compose run rails npm run test-cov` -- Run a specific Jest test file: `docker compose run rails npm run test FILE` +- Run the MarkUs rspec test suite: `docker compose run --rm rails rspec` +- Run a specific rspec test file: `docker compose run --rm rails rspec FILE` +- Run the Markus Jest test suite: `docker compose run --rm rails npm run test` +- Run the Markus Jest test suite with the test coverage shown: `docker compose run --rm rails npm run test-cov` +- Run a specific Jest test file: `docker compose run --rm rails npm run test FILE` - Start a shell within the Docker Rails environment: `docker compose run --rm rails bash`. Within this shell, you can: - Install new dependencies: `bundle install`, `npm ci` @@ -197,7 +197,7 @@ If the `rails db:autotest_run` fails, you can still run the tests manually in yo ## Setting up ActionMailer -If you plan on doing work that involves sending/recieving emails from MarkUs, you will need to [configure ActionMailer](https://guides.rubyonrails.org/action_mailer_basics.html). To get you started quickly on setting up ActionMailer and understanding what it is used for in MarkUs, follow the instructions outlined in [Enabling ActionMailer In Development](Developer-Guide--Tips-And-Tricks--Enabling-ActionMailer-In-Development.md). +If you plan on doing work that involves sending/receiving emails from MarkUs, you will need to [configure ActionMailer](https://guides.rubyonrails.org/action_mailer_basics.html). To get you started quickly on setting up ActionMailer and understanding what it is used for in MarkUs, follow the instructions outlined in [Enabling ActionMailer In Development](Developer-Guide--Tips-And-Tricks--Enabling-ActionMailer-In-Development.md). ## Troubleshooting @@ -208,8 +208,8 @@ If you plan on doing work that involves sending/recieving emails from MarkUs, yo I'm writing frontend code. The files I've changed should according to the Webpack config files trigger Webpack rebuild, but that's not happening. I've verified that 1. My changes are valid and should be displayed from the URL I'm accessing. -2. There are no errors in the Webpacker container's logs. -3. If I run `npm run build-dev` in the Webpacker container's console directly, it succeeds and I'm able to see my changes afterwards. +2. There are no errors in the webpack container's logs. +3. If I run `npm run build-dev` in the webpack container's console directly, it succeeds and I'm able to see my changes afterwards. ### A1 @@ -220,11 +220,11 @@ I'm writing frontend code. The files I've changed should according to the Webpac When I run `docker compose up rails`, or when I restart my previously created `rails` container, I get a warning/error along the lines of ```MARKDOWN -markus-rails-1 | system temporary path is world-writable: /tmp -markus-rails-1 | /tmp is world-writable: /tmp -markus-rails-1 | . is not writable: /app -markus-rails-1 | Exiting -markus-rails-1 | /usr/lib/ruby/3.0.0/tmpdir.rb:39:in `tmpdir': could not find a temporary directory (ArgumentError) +system temporary path is world-writable: /tmp +/tmp is world-writable: /tmp +. is not writable: /app +Exiting +/usr/lib/ruby/3.0.0/tmpdir.rb:39:in `tmpdir': could not find a temporary directory (ArgumentError) [...stacktrace] ``` @@ -232,26 +232,24 @@ after following the setup guide step by step. I've looked into my host setup and ### A2 -It's unclear exactly why or how this occured, but one fix is as simple as using another directory for this purpose. Ruby reads a variety of environment variables (env vars) to determine the system's temporary directory that it can use, and you can customize that directory with an env var. Both warnings/errors are complaining about the same thing: no available `TMPDIR`. +It's unclear exactly why or how this occurred, but one fix is as simple as using another directory for this purpose. Ruby reads a variety of environment variables (env vars) to determine the system's temporary directory that it can use, and you can customize that directory with an env var. Both warnings/errors are complaining about the same thing: no available `TMPDIR`. Since this is not a wide-spread issue, it's more reasonable to have the setup living entirely on your local (i.e. ignored by git) than committing it to the repo. -1. Start by creating a `docker-compose.override.yml` file under Markus root. Notice that the filename is already listed in `.gitignore`. +1. Start by creating a `compose.override.yaml` file under Markus root. Notice that the filename is already listed in `.gitignore`. 2. The general idea is simple - configure `TMPDIR`, then pass this configuration in. Now we need to find a potential `TMPDIR` candidate inside the container. Reading gives us an idea of what ruby expects (at the time of writing, Markus was in ruby 3.0, but this file shouldn't expect major changes in the future versions. If it starts using other env var(s), update this documentation to reflect the new env var(s)). 3. You can find a directory in the rails container with the correct permissions (1777) & that is unused by Markus, or create your own. In my case `/var/tmp` fit the profile. 1. I found the directory by starting a shell in the `rails` container with `docker exec -it` and then running `find -type d -perm 1777` -4. Write this env var into the `docker-compose.override.yml` file you created. For example: +4. Write this env var into the `compose.override.yaml` file you created. For example: ```YAML - version: '3.7' - services: - rails: - environment: - - TMPDIR=/var/tmp + rails: + environment: + - TMPDIR=/var/tmp ``` -5. Save your changes. After `docker compose build app`, make sure you run `docker compose -f docker-compose.override.yml docker-compose.yml up rails` instead of just `docker compose up rails`. This will apply the `TMPDIR` we created, which would resolve the issue. +5. Save your changes. After `docker compose build app`, make sure you run `docker compose -f compose.override.yaml compose.yaml up rails` instead of just `docker compose up rails`. This will apply the `TMPDIR` we created, which would resolve the issue. ### Q3 @@ -291,3 +289,26 @@ Again, it's unclear exactly why this happened, but there's a fix. 4. Once `rails` container is up, start a shell inside it and run `bundle exec rails db:prepare`. Without running this, you won't be able to browse markus UI. 1. If for whatever reason this command fails, try `rails db:drop && rails db:create && rails db:migrate && rails db:seed` instead. 5. The downside is you'll have to redo this process every time the containers are recreated, but otherwise this should resolve the issue. Verify that the `schema_migrations` tables now contain the correct number of migration records. + +### Q4 + +I'm seeing a test failing with the following message near the top: + +```text +1) SubmissionsController#get_file When the file is a jupyter notebook file should download the file as is + Failure/Error: _stdout, stderr, status = Open3.capture3(*args, stdin_data: file_contents) + + Errno::ENOENT: + No such file or directory - /app/nbconvertvenv/bin/jupyter-nbconvert +``` + +### A4 + +Run the following commands: + +```console +docker compose run --rm rails bash # This takes you into the Docker container +./venv/bin/python3 -m pip install -r requirements-jupyter.txt +``` + +Then try re-running the tests. You can do this from your current terminal (inside the Docker container) simply by running `rspec`. diff --git a/Developer-Guide--Setting-up-Git.md b/Developer-Guide--Setting-up-Git.md deleted file mode 100644 index 234289dc..00000000 --- a/Developer-Guide--Setting-up-Git.md +++ /dev/null @@ -1,237 +0,0 @@ -# MarkUs, Git and GitHub: How it Works - -## Installation - -First, you'll need to [install Git](https://git-scm.com/downloads) onto your computer. -If you already have Git installed, we recommend [updating to the latest version](https://confluence.atlassian.com/bitbucketserver/installing-and-upgrading-git-776640906.html). - -**Important**: if you are developing MarkUs on Windows, you should be using WSL to manage your repository, which means you'll need to [Install Git on WSL](https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git) instead of on Windows directly. -All of the commands on this page should be run in the WSL 2 terminal (e.g., Ubuntu 20.04), not the regular Windows terminal (cmd.exe). - -## Overview - -![Workflow](images/markus-git-workflow.png) - -Note that the following few paragraphs might be a bit confusing. Hang in there, there are always people around you can ask. - -### Setting up MarkUs - -1. Open a GitHub account and set up an [SSH public key for Git](https://help.github.com/articles/generating-ssh-keys) -2. Set up your Git configuration settings. - - ```console - git config --global user.name "First-name Last-name" - git config --global user.email "your-email@example.com" - ``` - - You may omit the `--global` switch if you wish. Make sure to read up on the differences between global and non-global git configuration, though. Thanks. -3. Ask an Admin to add you as a MarkUs developer. - -4. Visit the [MarkUs GitHub repository](https://github.com/MarkUsProject/Markus) and press “Fork”. This will create a clone of the repository for your GitHub account. - -5. From your fork, copy the URL that allows you to access it using SSH. In the terminal, navigate to your intended local development directory, and run the following command using the URL you just copied. - - ```console - git clone git@github.com:YOUR_GIT_USERNAME/Markus.git - ``` - - This will create a new local "Markus" folder with a copy of your repository. - -6. Next, create a "remote" to the master repository of MarkUs upstream. This will be used to keep your local copy up to date. - - ```console - git remote add upstream git@github.com:MarkUsProject/Markus.git - ``` - - Note the remote origin should point to the SSH URL you cloned with. If this URL contains “https”, then you have not cloned using SSH. Run the following command to change it to the URL used when cloning. - - ```console - git remote set-url origin git@github.com:YOUR_GIT_USERNAME/Markus.git - ``` - -7. Make sure the remote was added. The following command should output "upstream" and "origin". - - ```console - git remote -v - ``` - -### MarkUs Development Workflow - -The steps involved until your code ends up in the main MarkUs repository are the following: - -1. Create and switch to a feature branch based on up to date local master branch - - ```console - git branch issue-1234 - git checkout issue-1234 - ``` - -2. Modify the files with the changes you want to implement. To check which files you've modified, as well as view your changes, use: - - ```console - git status - git diff - ``` - -3. Commit your changes (small commits are beautiful) on your feature branch - - ```console - git add path/to/file.rb - git commit -m "Fix for issue 1234: Implemented x behaviour in file.rb" - ``` - -4. Repeat Steps 2 & 3 until you are satisfied with your work and want to contribute to the main MarkUs repository. - -5. Before setting up a review request, make sure your issue and master branches are up to date (see section below), making sure the change-sets you just pulled in do not affect your code. - -6. Ready to submit? Push your branch to your personal MarkUs fork: - - ```console - git push origin issue-1234 - ``` - -7. Go to your GitHub fork and change to your issue branch. You should see the button "Pull Request". Fill in the issue number, quick summary of the issue, description of the fix, and what testing was performed. - -8. Click "Create Pull Request" and wait for feedback! - -### The Three MarkUs Git Repositories - -In the above picture you can see 3 main Git repositories you will interact with. The most important ones are your forked MarkUs repository (this is most likely the only MarkUs Git repository on GitHub you have read+write access to) and the clone of this repository on your local machine. If you do branch sharing with another team member that's a slightly different story and beyond the point of giving a brief overview. - -### Your Fork of the MarkUs Git Repository - -You, as a developer, will be mainly working on the locally cloned MarkUs Git repository (of your fork). Add to that quite frequent pushes to your fork on GitHub, so that other developers can test your code easily (due to a current review board limitation). In order to create a pull request you'd also want to push your feature branch onto GitHub. This interaction is represented in the above picture by the large green arrow. - -### Keeping Your Local Code Up-To-Date - -Also note the dashed arrow coming from the main ("upstream") MarkUs Git repository and pointing to your local clone of your personal MarkUs Github fork. This arrow represents interaction you have to do to keep up-to-date with the authoritative MarkUs repository, which is constantly being updated by other developers on the MarkUs team. (More on how you can do this later.) - -This subsection describes the steps you need to take to make sure your local repository is up-to-date. Generally, your `master` branch should mirror the contents of `upstream/master`, the master branch of the main MarkUs repository. Remember that **you should be doing all development on local feature branches, NOT your local master branch**! This makes merging as painless as possible. - -If this sounds too confusing for you, don't worry, we are here to help. - -1. Make sure you have already set up your "upstream" remote. (See Steps 5 and 6 of "Setting up MarkUs" above.) - -2. Switch to your local `master` branch. - - ```console - git checkout master - ``` - -3. Update the current local branch with the `master` branch of the `upstream` repository. - - ```console - git pull upstream master - ``` - - Note: if you've followed our advice and done your development only on feature branches, this step shouldn't produce any merge errors! - -4. If you're currently working on a feature branch, switch back to that branch and merge the new changes in. This step might require some manual merging. - - ```console - git checkout issue-1234 - git merge master - ``` - - Rather than running `git merge master`, you may want to *rebase* to HEAD of `upstream/master` instead, by running the following: - - ```console - git rebase upstream/master - ``` - -If this doesn't mean anything to you, you may want to ask for help first. Seriously, ask for help! There's always somebody around to clarify things. :) - -### Next Steps - -The next step should be to continue reading this document and post questions you may have on IRC or the markus-dev mailing list. - -## Git Tricks - -### Useful Commands - -- View what changes you have made on branch `issue-1234`. - - ```console - git diff --full-index master issue-1234 - ``` - -- Temporarily put your changes aside to have a cleanly tracked branch. - - ```console - git stash - ``` - -- Bring these changes back (even onto another branch, as long as it is within the same repository) - - ```console - git stash pop - ``` - -- Remove all changes made to a specific file. - - ```console - git checkout - ``` - -- Revert all changes made to the current branch. **WARNING: All changes will be lost.** - - ```console - git reset --hard HEAD - ``` - -- Once your branch `issue-1234` has been integrated into `master`, you might want to delete it. - - ```console - git branch -d issue-1234 - ``` - -- You might want to see who modified a line last, and what other changes they brought in with that commit. - - ```console - git blame config/routes.rb - ``` - - You can also use the GitHub interface for this by clicking "Blame" when viewing a file, which will take you to a page like [this](https://github.com/MarkUsProject/Markus/blame/master/config/routes.rb). - -### Issues & Solutions - -**I forgot to create an issue branch and instead made changes to my master branch. I have not committed anything yet.** - -- Create and move to a new issue branch and then commit. You don't lose your uncommited changes when moving to another branch. - - ```console - git branch issue-1234 - git checkout issue-1234 - ``` - -**I made x number of commits to my master branch and forgot to create an issue branch.** - -- Let's say you want `master` to go back to state C, and move D and E to the new branch. Here's what it looks like at first: - - ```text - A-B-C-D-E (HEAD) - ↑ - master - ``` - - After creating a new branch using `git branch issue-1234`: - - ```text - issue-1234 - ↓ - A-B-C-D-E (HEAD) - ↑ - master - ``` - - Note that the current branch is still `master`. We now move this branch back by 2 commits using `git reset --hard HEAD~2`. You *will* lose uncommitted work here! - - ```text - issue-1234 - ↓ - A-B-C-D-E (HEAD) - ↑ - master - ``` - - Finally, switch over to the new branch and get to work: `git checkout issue-1234`. diff --git a/Instructor-Guide--Assignments--Automated-Testing.md b/Instructor-Guide--Assignments--Automated-Testing.md index f547ef4b..a0e5f2c6 100644 --- a/Instructor-Guide--Assignments--Automated-Testing.md +++ b/Instructor-Guide--Assignments--Automated-Testing.md @@ -250,7 +250,7 @@ You may customize this feature using the following settings: - **Tokens available on** This allows you to set the date and time of when you would like the students to begin testing. If you wish for the students to begin testing immediately simply set this field to the current date and time. - > :spiral_notepad: **NOTE:** Students will be allowed to start tests up until the assignment deadline INCLUDING all extensions. +- **Tokens available until** This allows you to set the date and time of when you would like to disable testing. If you wish for the tests to run up until the assignment due date simply leave this field blank. - **Tokens regenerate after** This allows you to set the time it takes for tokens to regenerate. Once a token has been used, it will be unavailable until X hours have passed, at which point the students may use that token to perform another test. If you wish for tokens not to regenerate, select the "Tokens do not regenerate" checkbox. diff --git a/Instructor-Guide--Assignments--Starter-Files.md b/Instructor-Guide--Assignments--Starter-Files.md index 794545ee..feab1a48 100644 --- a/Instructor-Guide--Assignments--Starter-Files.md +++ b/Instructor-Guide--Assignments--Starter-Files.md @@ -82,3 +82,7 @@ This is useful when using either of the "random" rules to see how the files were Students will be able to download the starter files according to the starter file rules you have set on this page. If you would like to download an example of these starter files, click the "Download starter files example" link (in the "Starter File Assignment Rules" section). Note that if the rules that you have chosen involve randomly assigning files, each time you click the link you may get different files. + +## Starter File Visibility for Graders + +Note that all graders of an assignment will have read-only access to the "Starter Files" tab under "Settings" on the assignment page, where they can view starter file groups and the rules the instructor sets on how to assign them. Furthermore, they will be able to download starter file mappings and example starter files. However, they cannot modify starter files or how they are assigned, unless they are authorized to do so. diff --git a/Learning-Tools-Interoperability.md b/Learning-Tools-Interoperability.md index 0ae5533f..70d1f0eb 100644 --- a/Learning-Tools-Interoperability.md +++ b/Learning-Tools-Interoperability.md @@ -58,12 +58,16 @@ Canvas course and your MarkUs course must be made. Click 'Launch MarkUs' in your Canvas course. If you are not logged in to MarkUs, you will be prompted to do so. Once you are logged in, you will be presented with a list of MarkUs courses for which you are an instructor. Select the course that matches your Canvas -course and submit the form. If your course does not appear in the list, -you may click 'Create New Course', which will create a new -course based on the Canvas course information with you as an instructor. +course and submit the form. ![MarkUs Link Canvas Course](images/lti-link-course.png) +If your course does not appear in the list, +you may click 'Create New Course', to request a new +course based on the Canvas course information with you as an instructor. + +*Warning*: your system administrator may restrict which Canvas courses can trigger the creation of a new course on MarkUs. + #### Creating a Grade Book entry for a MarkUs Assignment Once a course association has been established, each assignment will diff --git a/RESTful-API.md b/RESTful-API.md index 06864e13..1319396c 100644 --- a/RESTful-API.md +++ b/RESTful-API.md @@ -657,6 +657,15 @@ NOTE: the "AdminRole" type can only be used by AdminUser users - has_peer_review (boolean) - starter_file_type (one of "simple", "sections", "shuffle", "group") +### DELETE /api/courses/:course_id/assignments/:id + +- description: Delete the assignment corresponding to the given course and assignment id's, if it has no groups. +- required parameters: + - id (integer) + - course_id (integer) + +NOTE: this is only available to authorised instructors (or admins) + ### GET /api/courses/:course_id/assignments/:id/test_files - description: Download a zip file containing all autotesting test files for this assignment @@ -1206,3 +1215,17 @@ NOTE: the folder_path string can include a nested path if the folder to be remov - description: Delete the section uniquely identified by the given course and section id's. - NOTE: The section must be non-empty (must not have any students). + +### PUT /api/courses/:course_id/sections/:id + +- description: Update the section uniquely identified by the given course and section id's. +- required parameters: + - name (string) + +### GET /api/courses/:course_id/sections + +- description: Get all sections for this course + +### GET /api/courses/:course_id/sections/:id + +- description: Get the section uniquely identified by the given course and section id's. diff --git a/images/automated-testing-student-run.png b/images/automated-testing-student-run.png deleted file mode 100644 index fe8e1713..00000000 Binary files a/images/automated-testing-student-run.png and /dev/null differ diff --git a/images/automted-testing-student-run.png b/images/automted-testing-student-run.png new file mode 100644 index 00000000..1e1abd9e Binary files /dev/null and b/images/automted-testing-student-run.png differ