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

Make moss page for current course only #1863

Merged

Conversation

umar221b
Copy link
Contributor

Description

  1. Remove usages of undefined a variable in views/courses/moss.html.erb.
  2. If the course does not have any assessments, block the moss page with a message and a link to install an assessment.
  3. Do not show all courses and their assessments in this page, only the current course and its assessments.

Motivation and Context

Fixes #1861 in addition to making the page for the current course only, which makes more sense as the page is opened within a course's context.

How Has This Been Tested?

Tested locally on the latest docker images.

Here is how the page looks when there is at least 1 assessment:

Screenshot 2023-03-31 at 3 26 50 AM

And here is how it looks when there are no assessments:

Screenshot 2023-03-31 at 3 26 20 AM

I also submitted a few submissions to moss confirm nothing broke there.

Types of changes

  • 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)

@damianhxy damianhxy self-requested a review March 31, 2023 03:12
@damianhxy
Copy link
Member

What do you think about making the "Add an assessment" button consistent with the "Install assessment" button (from the course home page?)

Screenshot 2023-04-02 at 15 58 13

@umar221b
Copy link
Contributor Author

umar221b commented Apr 2, 2023

What do you think about making the "Add an assessment" button consistent with the "Install assessment" button (from the course home page?)

Screenshot 2023-04-02 at 15 58 13

Yes, that is a good idea. I will do it.

@umar221b umar221b requested a review from damianhxy April 2, 2023 20:58
Copy link
Member

@damianhxy damianhxy left a comment

Choose a reason for hiding this comment

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

Verified that MOSS still works, changes work as expected on course with assessments / no assessments.

Left a few nits, but otherwise lgtm!

app/views/courses/moss.html.erb Outdated Show resolved Hide resolved
app/views/courses/moss.html.erb Show resolved Hide resolved
app/views/courses/moss.html.erb Show resolved Hide resolved
app/views/courses/moss.html.erb Outdated Show resolved Hide resolved
@umar221b
Copy link
Contributor Author

umar221b commented Apr 4, 2023

@damianhxy, resolved all the nits, let me know if anything else needs addressing!

@damianhxy
Copy link
Member

LGTM. Thanks again for the PR!

@damianhxy damianhxy added this pull request to the merge queue Apr 7, 2023
Merged via the queue into autolab:master with commit 62c8331 Apr 7, 2023
@umar221b umar221b deleted the make_moss_page_for_current_course branch April 9, 2023 19:45
@umar221b
Copy link
Contributor Author

Hi @damianhxy, sorry to go back to this, but I just had a thought that a very usual use case in subsequent runs for a course is to run plagiarism against previous runs of that course. Do you think my work here:

Do not show all courses and their assessments in this page, only the current course and its assessments).

should be reverted?

@reviewpad reviewpad bot added the large Pull request is large label May 29, 2023
@damianhxy
Copy link
Member

That's also a thought that I had. However, I don't think that's necessary, files from previous iterations can be uploaded via the additional files tar for comparison

@damianhxy
Copy link
Member

damianhxy commented Oct 24, 2023

@umar221b On second thoughts, we had an instructor today request this previous ability to compare across semesters.
Also, it might be tricky to use the additional files tar feature since it doesn't recursively expand archives.

Would it be difficult to revert this change?

@umar221b
Copy link
Contributor Author

@umar221b On second thoughts, we had an instructor today request this previously ability to compare across semesters. Also, it might be tricky to use the additional files tar feature since it doesn't recursively expand archives.

Would it be difficult to revert this change?

It should not be, let me try to work on something over the weekend.

@coderabbitai coderabbitai bot mentioned this pull request Nov 19, 2023
6 tasks
@damianhxy
Copy link
Member

This has been resolved by #2015

@umar221b
Copy link
Contributor Author

This has been resolved by #2015

Terribly sorry I did not get a chance to work on this.

@damianhxy
Copy link
Member

No worries, thank you for all your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moss Cheat Checker page crashes if there are no assessments in the database
2 participants