Autolab icon indicating copy to clipboard operation
Autolab copied to clipboard

Clarify Disable Autolab Submissions Option

Open jhs-panda opened this issue 1 year ago • 1 comments

Description

Adjusted UI to make the "Disable Autolab submissions" button and functionality more noticeable. Also edited description on submissions page. Before: Screen Shot 2024-09-27 at 4 41 53 PM Screen Shot 2024-09-27 at 4 46 38 PM

After: Screen Shot 2024-09-27 at 4 44 31 PM Screen Shot 2024-09-27 at 4 44 43 PM Screen Shot 2024-09-27 at 4 45 57 PM

Motivation and Context

Some classes have assignments that shouldn't be submitted through Autolab. The functionality for disabling submissions through Autolab exists, but it is currently a bit unclear what the button does and many classes therefore don't use it. Fixes #2216.

How Has This Been Tested?

Tested locally (see screenshots) to make sure changes were saved and toggle between disable/enable handins and gray-out worked as expected.

Types of changes

  • [x] 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 change)

Checklist:

  • [x] I have run rubocop and erblint for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • [ ] My change requires a change to the documentation, which is located at Autolab Docs
  • [ ] I have updated the documentation accordingly, included in this PR

Other issues / help required

jhs-panda avatar Sep 27 '24 20:09 jhs-panda

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes introduce a new JavaScript function, toggleHandinAutolab, to manage the state of a handin filename text field based on a checkbox for disabling handins. The checkbox and text field are updated to ensure proper functionality and validation. Additionally, the message displayed in the assessments' show view is modified to clarify that Autolab handins are disabled, enhancing user understanding.

Changes

File Path Change Summary
app/views/assessments/_edit_handin.html.erb Added JavaScript function toggleHandinAutolab for managing handin filename field state; updated checkbox and text field attributes; removed conditional rendering of text field.
app/views/assessments/show.html.erb Updated message to specify "Autolab handins are disabled for this assessment."

Suggested reviewers

  • evanyeyeye

Assessment against linked issues

Objective Addressed Explanation
Clarify disable submissions option in assessment handin settings (#2216)

[!TIP]

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ab9c699688a430859804a998594d8a3dac7a6c8 and fb0849f6935ea6f1193e53232998e74e08b42e17.

📒 Files selected for processing (1)
  • app/views/assessments/show.html.erb (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/views/assessments/show.html.erb
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: test
  • GitHub Check: Analyze (ruby)
  • GitHub Check: Analyze (javascript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Sep 27 '24 20:09 coderabbitai[bot]

However, this PR forces the "Handin filename" field to always be handin.c on the frontend view, even when it has been successfully modified.

I believe I have corrected this my recent commits.

Also, I noticed that in your "After" screenshot the "Autograder settings" button is gone in the left navigation column. Is that an effect of the PR?

Sorry, I chose different assessments pages to screenshot and one of them wasn't an autograded assignment. I've corrected the image in the "After" screenshot.

Thanks!

jhs-panda avatar Oct 27 '24 15:10 jhs-panda

Also, the sanitization for handin filename is probably a little too restrictive. For example, hyphens are used pretty regularly for 15213 assessments.

evanyeyeye avatar Mar 10 '25 19:03 evanyeyeye

Also, the sanitization for handin filename is probably a little too restrictive. For example, hyphens are used pretty regularly for 15213 assessments.

For some reason, allowing hyphens lets any type of character in the filename (adding hyphens was suggested by CodeRabbit before and any filename was allowed). That's why I removed it and allowed the other characters. If we want it to be on the profs' side to have valid filenames, it's fine. Otherwise, allowing hyphens in the pattern will mess up any filename error checking.

jhs-panda avatar Mar 17 '25 14:03 jhs-panda