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

Handle case where no test groups are runnable by instructors #7038

Merged
merged 7 commits into from
May 8, 2024

Conversation

mimischly7
Copy link
Contributor

@mimischly7 mimischly7 commented Apr 26, 2024

Motivation and Context

This PR achieves the same task as PR#7003 but for instructors.

In the autotest-settings page (in the instructor view), the instructor has the ability to make all test groups NOT-runnable by students. Currently, when an instructor presses the "Run Tests" button, a request is still sent to the auto-testing server and 0/0 is shown on the front-end. We want to change this so that, if no test-groups are instructor-runnable, when instructor presses "Run Tests" we avoid the unnecessary request to the autotest server and present an appropriate message on the screen.

Note that there are two ways for an instructor to attempt to run tests - both in the Submissions tab.

The first one is from the submissions tab itself, where you can select arbitrary students (and groups) and run tests for them. This is handled by the run_tests action in the submissions_controller.

Screenshot 2024-04-26 at 7 24 39 PM

The other one is by following the link to a particular student (in the Submissions tab, each row in the table includes a link titled as the student's utorid). This is handled by the run_tests action in the results_controller.

Screenshot 2024-04-26 at 7 24 02 PM

Your Changes

Description:
An Assignment object has a test_groups association (corresponding to a test_groups table in the postgres database) holding information about the autotest-settings set by the instructor for that assignment, including who can run the tests, which is an array equal to one of the four following: ["instructor", "student"], ["instructor"], ["student"], [].
In the run_tests actions of the submissions_controller and the results_controller we examine the test_groups attribute of the current assignment and if there is no test-group runnable by an instructor, we flash an appropriate message and return early.

Type of change (select all that apply):

  • Bug fix (non-breaking change which fixes an issue)

Testing

Parallels the testing exhibited in PR#7003; in this case with the files corresponding to the submissions_controller and the results_controller.

Questions and Comments (if applicable)

Checklist

  • I have performed a self-review of my own code.
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported on Coveralls.
  • I have added tests for my changes.
  • I have updated the Changelog.md file.

mimischly7 and others added 4 commits April 26, 2024 19:06
…instructor-runnable.

 Instead of sending a redundant request to the autotesting server, the MarkUs server handles it (by inspecting the test_groups attribute of the corresponding Assignment object).
@coveralls
Copy link
Collaborator

coveralls commented Apr 27, 2024

Pull Request Test Coverage Report for Build 8943385724

Details

  • 42 of 42 (100.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 91.482%

Totals Coverage Status
Change from base Build 8927201981: 0.006%
Covered Lines: 39887
Relevant Lines: 42935

💛 - Coveralls

@mimischly7 mimischly7 requested a review from david-yz-liu April 27, 2024 01:01
@mimischly7 mimischly7 force-pushed the instructor-runnable branch from 9ba3653 to d6591f6 Compare May 1, 2024 02:08
@david-yz-liu david-yz-liu merged commit 85c714a into MarkUsProject:master May 8, 2024
6 checks passed
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