autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
757 stars 215 forks source link

Nil check for file manager #2147

Closed KesterTan closed 5 months ago

KesterTan commented 5 months ago

Fixed nil check for file manager (https://nightly.autolabproject.com/file_manager/comptest/hello/autograde-Makefile)

Description

How Has This Been Tested?

Types of changes

Checklist:

coderabbitai[bot] commented 5 months ago
Walkthrough ## Walkthrough The recent updates aim to enhance the File Manager within the course management system. These improvements include refined file type handling in the controller and expanded features in the documentation for instructors. The changes are designed to improve user interaction with files, enforce new limits and standards, and enhance instructors' capabilities in course and file management. ## Changes | File Path | Change Summary | |---------------------------------|-----------------------------------------------------------------------------------------------------| | `.../file_manager_controller.rb` | Updated file handling logic to better distinguish between binary and text files for appropriate actions. | | `docs/instructors.md` | Enhanced File Manager features detailed; added viewing and management capabilities for instructors, along with new file size limits and naming conventions. |

Recent Review Details **Configuration used: CodeRabbit UI**
Commits Files that changed from the base of the PR and between 03f10eaad2097c81b4ea572e8a3db928fd3f22fc and a320cde9d6375c1148b4189d19cf2f5bd8919d05.
Files selected for processing (1) * docs/instructors.md (1 hunks)
Additional Context Used
LanguageTool (66)
docs/instructors.md (66)
Near line 3: Possible spelling mistake found. Context: ...the basic ideas and capabilities of the Autolab system. It's meant to be read from begi... --- Near line 7: Possible spelling mistake found. Context: ...uctors opt to give some or all of their TAs instructor status. ## Roster The _ros... --- Near line 11: Possible spelling mistake found. Context: ... by uploading a CSV file in the general Autolab format: ``` Semester,email,last_name,f... --- Near line 23: This sentence does not start with an uppercase letter. Context: ...il","College","Department",... ``` !!! warning "Attention CMU Instructors:" S3 lis... --- Near line 24: Put a space after the comma. Context: ...ich lists the section letter (e.g., A, B,...) in the section field. Be careful not... --- Near line 24: Possible spelling mistake found. Context: ...re(s), and then upload a single file to Autolab with all of the sections. For the bulk... --- Near line 24: Consider removing “of” to be more concise Context: ...en upload a single file to Autolab with all of the sections. For the bulk upload, you can... --- Near line 28: Possible spelling mistake found. Context: ... new students in the roster file to the Autolab roster, or to 2. **update** the Autola... --- Near line 30: This sentence does not start with an uppercase letter. Context: ...file to the Autolab roster, or to 2. **update** the Autolab roster by marking student... --- Near line 30: Possible spelling mistake found. Context: ...utolab roster, or to 2. **update** the Autolab roster by marking students missing from... --- Near line 32: Possible spelling mistake found. Context: ... For a linked course, you can sync the Autolab roster by clicking the refresh button a... --- Near line 36: Possible spelling mistake found. Context: ... in the linked course as dropped on the Autolab roster. Instructors and course assist... --- Near line 39: Possible spelling mistake found. Context: ...ork and do not appear on the instructor gradebook. Instructors can change the dropped sta... --- Near line 41: Possible spelling mistake found. Context: ...ible to the student when they visit the Autolab site. A student can be enrolled in an a... --- Near line 41: Possible spelling mistake found. Context: ...n be enrolled in an arbitrary number of Autolab courses. ## Access Codes To allow stu... --- Near line 53: Possible spelling mistake found. Context: ...ng that your students make submissions (handins) for. This could be a programming assig... --- Near line 59: Possible spelling mistake found. Context: ..._, e.g., "Lab", "Exam", "Homework". ## Autograders and Scoreboards Labs can be _autograde... --- Near line 61: Possible spelling mistake found. Context: ...tograders and Scoreboards Labs can be _autograded_ or not, at your discretion. When a stu... --- Near line 61: Possible spelling mistake found. Context: ...iscretion. When a student submits to an autograded lab, Autolab runs an instructor-supplie... --- Near line 61: Possible spelling mistake found. Context: ...b, Autolab runs an instructor-supplied _autograder_ program that assigns scores to one or ... --- Near line 61: Possible spelling mistake found. Context: ... more problems associated with the lab. Autograded labs can have an optional _scoreboard_ ... --- Near line 61: Possible spelling mistake found. Context: ... Authors](/lab/) for details on writing autograded labs with scoreboards. ## Important Da... --- Near line 65: Before the countable noun ‘without’ an article or a possessive pronoun is necessary. Context: ...s can submit until the due date without penalty or consuming grace days. Submissions ar... --- Near line 67: Possible spelling mistake found. Context: ...ns are disabled after the end date. ## Handins/Submissions Once an assessment is live... --- Near line 69: Possible spelling mistake found. Context: ...rt date), students can begin submitting handins, where each handin is a single file, wh... --- Near line 69: Possible spelling mistake found. Context: ...an begin submitting handins, where each handin is a single file, which can be either a... --- Near line 69: The official name of this software platform is spelled with a capital “H”. Context: ...repo's corresponding branch. Check [here](/installation/github_integration) for how to set up and try ... --- Near line 73: Possible spelling mistake found. Context: ...structors to assign groups through the [Autolab Frontend API](/api-overview). ## Penal... --- Near line 73: Possible spelling mistake found. Context: ...groups through the [Autolab Frontend API](/api-overview). ## Penalties and Extensions You can... --- Near line 77: Possible spelling mistake found. Context: ...ensions You can set penalties for late handins, set hard limits on the number of handi... --- Near line 77: Possible spelling mistake found. Context: ...ndins, set hard limits on the number of handins, or set soft limits that penalize exces... --- Near line 77: Possible spelling mistake found. Context: ...set soft limits that penalize excessive handins on a sliding scale. You can also give a... --- Near line 81: Possible spelling mistake found. Context: ...dates for that student. ## Grace Days Autolab provides support for a late handin poli... --- Near line 82: Possible spelling mistake found. Context: ...ys Autolab provides support for a late handin policy based on _grace days_. Each stud... --- Near line 82: Possible spelling mistake found. Context: ... that are automatically applied if they handin after the due date. Each late day consu... --- Near line 82: Possible spelling mistake found. Context: ...mes one of the budgeted grace days. The Autolab system keeps track of the number of gra... --- Near line 82: Possible spelling mistake found. Context: .... If students run out of grace days and handin late, then there is a fixed late penalt... --- Near line 92: Possible spelling mistake found. Context: ...er the end date, or automatically by an autograder after each submission. Problem scores c... --- Near line 98: Possible missing comma found. Context: ...sments in a specific instructor-defined category such as "Labs, or "Exams". By default t... --- Near line 98: Unpaired symbol: ‘"’ seems to be missing Context: ...fic instructor-defined category such as "Labs, or "Exams". By default the categor... --- Near line 98: Did you mean: “By default,”? Context: ...ned category such as "Labs, or "Exams". By default the category average is the arithmetic ... --- Near line 102: Possible spelling mistake found. Context: ...o Grade" submission will show up in the gradebook as NG and a zero will be used when calc... --- Near line 102: Possible missing comma found. Context: ...ission will show up in the gradebook as NG and a zero will be used when calculatin... --- Near line 102: Possible spelling mistake found. Context: ...Excused" submission will show up in the gradebook as EXC and will not be used when calcul... --- Near line 106: Possible spelling mistake found. Context: ...lated by a default Ruby function called `fooAverage`, which you can override in the `course... --- Near line 106: Possible spelling mistake found. Context: ...Average`, which you can override in the `course.rb` file. For example, in our course, we p... --- Near line 122: Possible spelling mistake found. Context: ...ormalized points. The assessment called `datalab` is graded out of a total of 63 points ... --- Near line 137: Possible spelling mistake found. Context: ...puted by a default Ruby function called `courseAverage`, which can be overridden by the `cours... --- Near line 137: Possible spelling mistake found. Context: ...verage`, which can be overridden by the `course.rb` file in the course directory. Here is ... --- Near line 151: Possible spelling mistake found. Context: ... file" on the "Manage course" page. ## Handin History For each lab, students can vie... --- Near line 153: Possible spelling mistake found. Context: ...ciated with those submissions, via the _handin history_ page. ## Gradesheet The _gra... --- Near line 155: Possible spelling mistake found. Context: ...ons, via the _handin history_ page. ## Gradesheet The _gradesheet_ (not to be confused w... --- Near line 157: Possible spelling mistake found. Context: ...din history_ page. ## Gradesheet The _gradesheet_ (not to be confused with the _gradeboo... --- Near line 157: Possible spelling mistake found. Context: ...adesheet_ (not to be confused with the _gradebook_) is the workhorse grading tool. Each a... --- Near line 157: Possible spelling mistake found. Context: ...ng tool. Each assessment has a separate gradesheet with the following features: - Provi... --- Near line 165: Possible spelling mistake found. Context: ... - Provides a link to each student's handin history. ## Gradebook The _gradebook_... --- Near line 167: Possible spelling mistake found. Context: ...k to each student's handin history. ## Gradebook The _gradebook_ comes in two forms. Th... --- Near line 169: Possible spelling mistake found. Context: ...t's handin history. ## Gradebook The _gradebook_ comes in two forms. The _student grade... --- Near line 169: Possible spelling mistake found. Context: ...ebook_ comes in two forms. The _student gradebook_ displays the grades for a particular s... --- Near line 169: Possible spelling mistake found. Context: ...and the course average. The _instructor gradebook_ is a table that displays the grades fo... --- Near line 171: Possible spelling mistake found. Context: ...y averages and course average. For the gradebook calculations, submissions are classifie... --- Near line 171: Possible spelling mistake found. Context: ...o Grade" submission will show up in the gradebook as NG and a zero will be used when calc... --- Near line 171: Possible missing comma found. Context: ...ission will show up in the gradebook as NG and a zero will be used when calculatin... --- Near line 171: Possible spelling mistake found. Context: ...Excused" submission will show up in the gradebook as EXC and will not be used when calcul... --- Near line 183: Possible spelling mistake found. Context: ... access the File Manager via the Manage Autolab dropdown. Note: - You cannot create f... --- Near line 187: Possible spelling mistake found. Context: ...ate to Create New Course via the Manage Autolab dropdown. - You cannot rename files in...
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `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 generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@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.` 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 as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
KesterTan commented 5 months ago

The errors were the same ones we had in file manager, they're appearing again cause I moved the if else loop into a elsif loop