Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store Numbas config in backend #16

Merged

Conversation

satikaj
Copy link
Collaborator

@satikaj satikaj commented Mar 22, 2024

Description

The backend schema and files for task definition were updated to store Numbas config options.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This was tested with the frontend task editor UI. Upon uploading and configuring Numbas tests, the state is saved even after refreshing the page.

image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if appropriate
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have created or extended unit tests to address my new additions
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ublefo ublefo force-pushed the new/numbas-integration branch from 92b86ea to a65580d Compare March 22, 2024 10:32
@ublefo
Copy link
Collaborator

ublefo commented Mar 22, 2024

db:populate should all be fixed now, added missing columns to the test csv file so task import from csv will work properly. Other csv files will likely also require adjustments since they are used for unit tests.

@@ -28,6 +28,9 @@ class TaskDefinitionsApi < Grape::API
optional :upload_requirements, type: String, desc: 'Task file upload requirements'
optional :plagiarism_checks, type: String, desc: 'The list of checks to perform'
requires :plagiarism_warn_pct, type: Integer, desc: 'The percent at which to record and warn about plagiarism'
requires :has_enabled_numbas_test, type: Boolean, desc: 'Whether or not Numbas test assessment is enabled for this task'
requires :numbas_time_delay, type: String, desc: 'The time delay between Numbas test attempts'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this time delay to an integer (in minutes) as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Daniel plans to have an incremental delay feature which the tutor can enable. So first 2 attempts would have no delay, the next would have a 30 min delay, then 2 hours, and so on until the student has to see the tutor. I've modified the code to accomodate this already.

@maddernd maddernd merged commit 4b4746c into thoth-tech:new/numbas-integration Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants