Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion About.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

MarkUs is a web application for the submission and grading of student programming assignments. The primary purpose of MarkUs is to provide TAs with simple tools that will help them to give high quality feedback to students. MarkUs also provides a straight-forward interface for students to submit their work, form groups, and receive feedback. The administrative interface allows instructors to manage groups, organize the grading, and release grades to students.

Since 2008, more than 120 undergraduate students have participated in the development of MarkUs; some as full-time summer interns, but most working part time on MarkUs as a project course. The fact that we have have uncovered so few major bugs, and that MarkUs has been so well-received by instructors is a testament to the high quality work of these students. MarkUs is used in more than a dozen courses at the University of Toronto, in several courses at the University of Waterloo, and at École Centrale Nantes (in French).
Since 2008, more than 120 undergraduate students have participated in the development of MarkUs; some as full-time summer interns, but most working part-time on MarkUs as a project course. The fact that we have uncovered so few major bugs, and that MarkUs has been so well-received by instructors is a testament to the high quality work of these students. MarkUs is used in more than a dozen courses at the University of Toronto, in several courses at the University of Waterloo, and at École Centrale Nantes (in French).

MarkUs is written using Ruby on Rails, and stores student submissions in Git repositories.
22 changes: 11 additions & 11 deletions Admin-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ From the MarkUs Administration home page, you can view a list of dashboards. The

### Resque

The Resque dashboard allows you to easily monitor monitor queues, jobs, and workers for MarkUs' background jobs. To access this dashboard click on the `Resque dashboard` link.
The Resque dashboard allows you to easily monitor queues, jobs, and workers for MarkUs' background jobs. To access this dashboard click on the `Resque dashboard` link.

![Resque Link](images/markus-admin-resque-link.png)

Expand All @@ -35,13 +35,13 @@ This tool allows you to monitor the status of each worker, display information a

### Rails Performance

The Rails Performance dashboard allows you to monitor and visualize information regarding request traffic and MarkUs' response times. To enable this dashboard, in the MarkUs [settings yaml file](Configuration.md#markus-settings) ensure you set the `enabled` setting under `rails_performance` to true. Once you have confirmed the MarkUs server was started with this setting enabled, log in to the MarkUs Administration home page. You will see a link to the `Rails Performance dashboard`.
The Rails Performance dashboard allows you to monitor and visualize information regarding request traffic and MarkUs' response times. To enable this dashboard, in the MarkUs [settings YAML file](Configuration.md#markus-settings) ensure you set the `enabled` setting under `rails_performance` to true. Once you have confirmed the MarkUs server was started with this setting enabled, log in to the MarkUs Administration home page. You will see a link to the `Rails Performance dashboard`.

![Rails Performance Link](images/markus-admin-rails-performance-link.png)

![Rails Performance Dashboard](images/markus-admin-rails-performance-dashboard.png)

This tool allows you to monitor and visualize information surrounding each request that is made to MarkUs. You can view the time it took for MarkUs to respond to each request, how many requests per minute MarkUs recieves, any 500 errors that occurred and the most common requests MarkUs recieves. This dashboard is currently supported through the `rails_performance` gem. For more information about what you can access see the Rails Performance [homepage](https://github.com/igorkasyanchuk/rails_performance).
This tool allows you to monitor and visualize information surrounding each request that is made to MarkUs. You can view the time it took for MarkUs to respond to each request, how many requests per minute MarkUs receives, any 500 errors that occurred and the most common requests MarkUs receives. This dashboard is currently supported through the `rails_performance` gem. For more information about what you can access see the Rails Performance [homepage](https://github.com/igorkasyanchuk/rails_performance).

## Managing Courses

Expand All @@ -60,11 +60,11 @@ In order to access a specific course you may do so by navigating to the list of
![Markus Course View Link](images/markus-admin-go-to-course-link.png)

Doing so will take you to the course's dashboard page where you can view and access the course as if you were an instructor. This is accomplished by giving you an "AdminRole" for the course. This role is created automatically for you when you try and access a course via the UI for the first time. If you wish to create, view or update this role manually, please see the relevant API [documentation](RESTful-API.md#get-apicoursescourse_idroles).
> :spiral_notepad: **NOTE:** Only you have the ability to view and access the Admin role. Instructors cannot see that you have this role when using either the UI or API.
> 🗒️ **NOTE:** Only you have the ability to view and access the Admin role. Instructors cannot see that you have this role when using either the UI or API.

### Creating and editing a course

In order to create a course, click on the "Create Course" link located at the top right corner of the page.
In order to create a course, click on the "Create Course" link located in the top right corner of the page.

![Markus Course New Link](images/markus-admin-course-new-link.png)

Expand All @@ -74,11 +74,11 @@ This will redirect you to a page where you can specify the following course prop

- **Name**: The name or course code for this course. Please ensure this is correct before creating the course as this cannot be edited later.
- **Display Name**: A longer course name or title for users to see.
- **Autotester URL**: A URL that points to the API of a running [Automated Tester](https://github.com/MarkUsProject/markus-autotesting) instance. Setting this will enable automated testing for this course. To disable automated testing, set this to the empty string.
- **Maximum File Size (bytes)**: The maximum file size (in bytes) that users are allowed to upload to MarkUs.
- **Course Visibility**: Selecting "hidden" will hide the course from students in a course. Graders and instructors for the course can still see and manage the course as usual.
- **Autotester URL**: A URL that points to the API of a running [Automated Tester](https://github.com/MarkUsProject/markus-autotesting) instance. Setting this will enable automated testing for this course. To disable automated testing, set this to the empty string.
- **Course Visibility**: Selecting "Hidden" will hide the course from students in a course. Graders and instructors for the course can still see and manage the course as usual.

After clicking "Save", the course will be created and you will be taken back to the list of all courses.
After clicking "Save", the course will be created, and you will be taken back to the list of all courses.

If you later wish to modify the properties of a course you can reach any course's edit page by going to the list of all courses and clicking on the "edit" action of the course you wish to modify.

Expand Down Expand Up @@ -109,7 +109,7 @@ This will take you to a page that lists data about every admin and end user.

### Creating and Editing Users

In order to create a new user, click on the "Create User" link located at the top right corner of the page.
In order to create a new user, click on the "Create User" link located in the top right corner of the page.

![Markus User New Link](images/markus-admin-user-new-link.png)

Expand All @@ -136,7 +136,7 @@ This will take you to the user's edit page, where you can update the same proper

### Bulk Uploading of End Users

If you plan on creating many end users, you may find it convenient to instead upload a list of users for markus to create. To do this, click on the "Upload End Users" link located at the top right corner of the page.
If you plan on creating many end users, you may find it convenient to instead upload a list of users for markus to create. To do this, click on the "Upload End Users" link located in the top right corner of the page.

![Markus User CSV Upload Link](images/markus-admin-user-csv-upload-link.png)

Expand All @@ -161,7 +161,7 @@ username_3,last_name_3,first_name_3,id_number_3,email_3
```

After you have selected a file to upload, click on the "Upload" button on the modal. MarkUs will then create End Users from the list of users you provided. The users administration page will be refreshed after all users.
> :spiral_notepad: **Note:**
> 🗒️ **NOTE:**
>
> - Only CSV files are currently supported with this feature.
> - Any errors such as a missing username, first name or last name will result in the entire upload to fail.
Expand Down
36 changes: 20 additions & 16 deletions Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ echo 'puts JSON.parse(Settings.to_json).to_yaml' | NO_SCHEMA_VALIDATE=1 NO_INIT_
```

By specifying `NO_SCHEMA_VALIDATE` an error will not be raised if a required key is missing.

By specifying `NO_INIT_SCHEDULER` an error will not be raised if MarkUs can't connect to a redis instance (not required for this task).

## Settings
Expand All @@ -20,7 +21,10 @@ By specifying `NO_INIT_SCHEDULER` an error will not be raised if MarkUs can't co

All values under the `rails:` key are used to set the `Rails.configuration` object when the app starts.

For example, the `queue_adapter` option sets `Rails.configuration.queue_adapter`, and `asset_host` sets `Rails.configuration.action_mailer.asset_host`. For full details see [Rails Guides](https://guides.rubyonrails.org/configuring.html)
> ▶️ **EXAMPLE:** The `queue_adapter` option sets `Rails.configuration.queue_adapter`,
> and `asset_host` sets `Rails.configuration.action_mailer.asset_host`.
>
> For full details see [Rails Guides](https://guides.rubyonrails.org/configuring.html)

The default values for these should be good enough for most applications.

Expand All @@ -35,7 +39,7 @@ rails:
log_level: # log level (one of: debug info warn error fatal unknown)
cache_store: # cache store name (redis_cache_store is recommended because MarkUs already uses redis elsewhere)
active_job:
queue_adapter: # queue adapter name (supported by ActiveJob::QueueAdapters) (resque is recommended because MarkUs already uses redis elsewhere)
queue_adapter: # queue adapter name (supported by ActiveJob::QueueAdapters) (Resque is recommended because MarkUs already uses redis elsewhere)
assets:
prefix: # relative path from the rails root to write compiled assets to
active_record:
Expand All @@ -51,7 +55,7 @@ rails:
perform_deliveries: # boolean indicating whether to send mail or not
deliver_later_queue_name: # name of queue used to send mail as a background job
sendmail_settings: # (required if delivery_method == sendmail) hash containing sendmail settings
smtp_settings: # (required if delivery_method == smtp) hash containing smtp settings
smtp_settings: # (required if delivery_method == SMTP) hash containing SMTP settings
file_settings: # (required if delivery_method == file) hash containing file settings
active_support:
deprecation: # string indicating where to write deprecation warnings (See ActiveSupport::Deprecation::Behavior for details)
Expand Down Expand Up @@ -94,7 +98,7 @@ student_csv_order: # column order of student csv upload file (choices are: user_
jupyter_server:
hosts: # list of host names of servers running jupyterhub that are allowed to connect to this instance of MarkUs
repository:
type: # repository type used to store student submissions. Choose from 'git', 'mem'. 'git' is preferred since 'mem' is not persistant and should only be used for testing.
type: # repository type used to store student submissions. Choose from 'git', 'mem'. 'git' is preferred since 'mem' is not persistent and should only be used for testing.
url: # base url used to remotely access a repository over http/https
ssh_url: # (required if enable_key_storage == true) base url used to remotely access a repository over ssh
is_repository_admin: # boolean indicating whether MarkUs manages repositories
Expand Down Expand Up @@ -124,11 +128,11 @@ rails_performance:
enabled: # boolean whether to enable the rails performance dashboard (See the "Admin Guide" page for more information about this dashboard)
duration: # duration in minutes for rails performance to store data for monitoring
exception_notification:
enabled: # boolean indicating whether to enable email notifactions when errors occur (See "Error Notification Emails" below for more details)
enabled: # boolean indicating whether to enable email notifications when errors occur (See "Error Notification Emails" below for more details)
sender: # email address string with which to email error notifications
sender_display_name: # sender display name for recipients to see
email_prefix: # string text to prefix to the error subject line that summarizes the error
recipients: # list of string email addresses who will recieve error notification emails
recipients: # list of string email addresses who will receive error notification emails
file_storage:
default_root_path: # absolute path to a directory where MarkUs can write and store files
scanned_exams: # (optional) absolute path to a directory where MarkUs can store scanned exam files (if null, a subdirectory under the default_root_path will be used)
Expand All @@ -140,16 +144,16 @@ file_storage:

## Additional queue names

By default, background jobs will be run using the queue specified by the
By default, background jobs will be run using the queue specified by the following setting.

```yaml
queue:
default:
```

setting. If you would like to use different queue names for different background jobs, you can specify additional keys (the background job name written in snake case) under the `queue:` key.
If you would like to use different queue names for different background jobs, you can specify additional keys (the background job name written in snake case) under the `queue:` key.

For example, the following conifguration:
For example, the following configuration:

```yaml
queue:
Expand Down Expand Up @@ -229,15 +233,15 @@ Additionally, MarkUs can be set to restrict remote logins based on username and/

### Logout redirect

The `logout_redirect` setting determines where the user will be redirected when they logout of MarkUs. It can be one of `DEFAULT`, `NONE`, or a URL.
The `logout_redirect` setting determines where the user will be redirected when they log out of MarkUs. It can be one of `DEFAULT`, `NONE`, or a URL.

- `DEFAULT`: the user will be redirected to MarkUs' login page
- `NONE`: MarkUs will render a 404 error page
- URL: MarkUs will redirect the user to this URL

## Environment variables

All of the settings described above can also be set using environment variables. Environment variables start with `MARKUS__` followed by each nested yaml key separated by `__`. For example,
All the settings described above can also be set using environment variables. Environment variables start with `MARKUS__` followed by each nested YAML key separated by `__`. For example,

```sh
MARKUS__REDIS__URL=redis://localhost:6379/1
Expand All @@ -260,23 +264,23 @@ RAILS_RELATIVE_URL_ROOT=/csc108 bundle exec rails server

## Error Notification Emails

If you wish to be informed when a user encounters a server error whilst using MarkUs, you can configure MarkUs to send you an email whenever such an error event happens along with its details. To do so, under the `exception_notification` settings, set the `enabled` setting to true. Be sure to then specify a `sender` email address and a list of `recipients` addresses. You can also optionally set a `sender_display_name` and an `email_prefix`.
If you wish to be informed when a user encounters a server error whilst using MarkUs, you can configure MarkUs to email you whenever such an error event happens along with its details. To do so, under the `exception_notification` settings, set the `enabled` setting to true. Be sure to then specify a `sender` email address and a list of `recipients` addresses. You can also optionally set a `sender_display_name` and an `email_prefix`.

Note that in order for this feature to work, you **must** have ActionMailer [configured](https://guides.rubyonrails.org/action_mailer_basics.html) to send emails. This means that you must select an ActionMailer `delivery_method` with the appropriate settings and you must also set `perform_deliveries` to true. You will be unable to send or recieve error notification emails otherwise.
Note that in order for this feature to work, you **must** have ActionMailer [configured](https://guides.rubyonrails.org/action_mailer_basics.html) to send emails. This means that you must select an ActionMailer `delivery_method` with the appropriate settings, and you must also set `perform_deliveries` to true. You will be unable to send or receive error notification emails otherwise.

This feature informs you of all uncaught exceptions that occur in the MarkUs backend. In order to possibly avoid filling recipient inboxes with a lot of the same error notifications, email notifications are sent after every `2**n` occurences of the same error. For more details, visit the [exception notification](https://github.com/smartinez87/exception_notification) gem homepage with which we use to provide you this feature.
This feature informs you of all uncaught exceptions that occur in the MarkUs backend. In order to possibly avoid filling recipient inboxes with a lot of the same error notifications, email notifications are sent after every `2**n` occurrences of the same error. For more details, visit the [exception notification](https://github.com/smartinez87/exception_notification) gem homepage with which we use to provide you this feature.

## LTI Settings

>**Note**: LTI routes are not enabled in production by default. To enable them, you must edit `routes.rb` file.
> 🗒️ **Note**: LTI routes are not enabled in production by default. To enable them, you must edit `routes.rb` file.

If you wish to use Learning Tools Interoperability (LTI) with MarkUs, you'll need to configure the LTI settings as follows

- `lti.domains` must be a whitelist of all hosts you expect to receive LTI launches from.
- `lti.token_endpoint` must be the url used to generate an LTI credentials token for the external platform.
- `lti.sync_schedule` must be a cron schedule dictating when MarkUs should attempt to automatically sync its roster via LTI.

You must also create a private key for generating Javascript Web Tokens to sign LTI requests.
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:
Expand Down
Loading