S08 judging#103
Conversation
Merge branch 'master' of https://github.com/Code-Institute-Community/ci-hackathon-app into S08-Judging
Merge branch 'master' of https://github.com/Code-Institute-Community/ci-hackathon-app into S08-Judging
|
Pulled the latest PRs from upstream, updated this branch and fixed merge conflicts. |
stefdworschak
left a comment
There was a problem hiding this comment.
@Sarosim the PR looks good. There are a few comments for you. I think the main thing to look at is using an extra judging status in the hackathon instead of the end_date to check if judging should be allowed.
Also, can you create a follow-up PR to create the page to list all team projects for a hackathon and link from the hackthon to the list of all projects page and then to the scoring page?
hackathon/views.py
Outdated
| user_is_judge = True | ||
| if not user_is_judge: | ||
| messages.error(request, "You are not a judge for that event!") | ||
| template = 'home/index.html' |
There was a problem hiding this comment.
This seems to be defined a couple of times which is not needed, I would just add the template directly to the render function without declaring it as a variable.
Same for all instances below.
hackathon/views.py
Outdated
| return render(request, template) | ||
|
|
||
| # verify if event is ready to be judged (finished) | ||
| finish = event.values('end_date')[0]['end_date'] |
There was a problem hiding this comment.
Not sure this is the right trigger. If the event is finished, it is over and done with I would think. Maybe instead of that we can add another status to the hackathon called judging and add that.
hackathon/views.py
Outdated
|
|
||
| # verify that the selected team belongs to the selected event | ||
| team_belongs_to_event = False | ||
| for team in event.values('teams'): |
There was a problem hiding this comment.
Again this could probably be simplified.
hackathon/views.py
Outdated
| return render(request, template) | ||
|
|
||
| # check if the judge has already scored the requested team's Project | ||
| the_event = get_object_or_404(Hackathon, pk=hack_id) |
There was a problem hiding this comment.
You already have this defined further up, so I would reuse that instance.
|
reviewed all the change requests and solved them, have not made migrations but pushed all other changes. |
stefdworschak
left a comment
There was a problem hiding this comment.
@Sarosim LGTM
Please just fix the two small comments and I will merge this.
|
All done @stefdworschak |
stefdworschak
left a comment
There was a problem hiding this comment.
@Sarosim not sure if I overlooked some of these things, but I think you introduced some new chnages here. Could you please make the few additional changes before merging? Thanks
|
all done @stefdworschak |
Description
This PR includes the rendering of the judging page according to the ‘Judging Page’ wireframe, as well as handling the score submission and saving it to the model.
Pull request type
S08 As Staff, I would like to Judge each submission.
Related Issue
none existing, one question to be decided:
The Project Score Categories model doesn't have description field for the score categories, so the wireframes couldn't be fully followed. I have included screenshots with and without descriptions, if we want to have the descriptions, the model needs to be adjusted.
Configuration instructions
needs to have Hackathon event with finish date in the past, participating team in the event, valid user as judge for the event, project assigned to the team and scores to be non existent for the hackathon and the team by the judge. Also, project score categories have to be present in the respective model.
Testing
Four verifications are included:
all four tested.
Scores cannot be submitted without valid score for each and every project score categories
Responsiveness tested in Chrome Dev Tools screen shots included
Screenshots
Additional Information
none
Does this introduce a breaking change