Closed umar221b closed 1 year ago
Hi @umar221b, thanks for bringing this to our attention. Indeed, it appears that the four uses of id='<%= a.id %>OptionsDiv'
(including one in the loop) are unnecessary and MOSS works even without them.
If you'd like, feel free to submit a PR removing the mentioned uses of a.id
.
As for the warning message, I would suggest using materialize's collections to style it and/or linking to the course's install_assessment
page (i.e. by linking to install_assessment_course_assessments_path(@course)
)
I would be happy to assist as well!
Yes, I will do the fix.
Regarding linking to the install_assessment
page, are you visualizing something with a list of the courses and links to each one of them? I was thinking about displaying an empty page with a message that the user should add assessments first to access this page. Displaying the list of course links will grow ugly if there are many courses. What do you think?
What I had in mind was a clickable link to the install assessment page for the current course (since MOSS is run within the context of a course).
e.g. a message like "There are currently no assessments to run MOSS on, add an assessment to this course to get started" -- where the bolded text will be the link.
Got it, I will work on something. 👍
Your environment I am using the latest Docker image.
Steps To Reproduce
Current behavior Page crashes with a 500 error inside
views/courses/moss.html.erb
at<div id='<%= a.id %>OptionsDiv' style="margin-right: 10px;" >
Expected behavior Page does not crash.
Screenshots
The reason of the crash is that the variable
a
is used in a couple of locations outside the loop that defines it. Not quite sure these parts it is used in should be in the loop or the usages should be removed (I believe the latter), but if the usages are not needed we could just remove them from the ids of the divs. Happy to submit a PR that removes the usages ofa
outside the loop, and maybe displays a message "to add assessments to get started with plagiarism checking"?Let me know what you think.