-
Notifications
You must be signed in to change notification settings - Fork 121
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
Correct flow submissions #758
Open
sahilkamboj3
wants to merge
14
commits into
inducer:main
Choose a base branch
from
sahilkamboj3:correct_flow_submissions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
608ab12
percents changed to 100.0
sahilkamboj3 83b3cdd
tests adjusted and 99.99 bug fixed
sahilkamboj3 0ac9d38
Merge branch 'master' of https://github.com/inducer/relate into corre…
sahilkamboj3 16af594
uncomment/comments modified, deleted a print statement
sahilkamboj3 3780bd7
check_pct func added and html percent bars modified
sahilkamboj3 c311026
lint errors fixed
sahilkamboj3 b5224a8
fixed more lint problems and fixed endwith blocks
sahilkamboj3 7d84f67
99.99 calculation moved into html page
sahilkamboj3 7091e14
linter problems fixed
sahilkamboj3 ff193e9
comments added in flow-completion-grade.html
sahilkamboj3 565fdf0
poetry.lock updated
sahilkamboj3 8161f04
poetry.lock fixed
sahilkamboj3 b655a5f
pulled
sahilkamboj3 b0ac6b1
poetry.lock updated
sahilkamboj3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ bulk-storage | |
/.coverage | ||
/coverage.xml | ||
/.vscode/ | ||
|
||
__pycache__ | ||
local_settings.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% extends "course/course-base.html" %} | ||
|
||
{% load mathfilters %} | ||
{% load i18n %} | ||
|
||
{% block title %} | ||
|
@@ -42,12 +42,20 @@ <h1>{% trans "Results" %}: {{flow_desc.title}}</h1> | |
{% if grade_info.total_points_percent < 100.001 %} | ||
{# otherwise we'll have trouble drawing the bar #} | ||
<div class="progress"> | ||
{# Multiplying by 0.9999 to avoid rounding to larger than 100% #} | ||
{# to avoid breaking percent bar. #} | ||
{% with points_percent=grade_info.points_percent|mul:0.9999 %} | ||
{% with missed_points_percent=grade_info.missed_points_percent|mul:0.9999 %} | ||
{% with unreachable_points_percent=grade_info.unreachable_points_percent|mul:0.9999 %} | ||
<div class="progress-bar progress-bar-success" | ||
style="width: {{ grade_info.points_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ points_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-danger" | ||
style="width: {{ grade_info.missed_points_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ missed_points_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-info" | ||
style="width: {{ grade_info.unreachable_points_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ unreachable_points_percent|stringformat:".6f" }}%"></div> | ||
{% endwith %} | ||
{% endwith %} | ||
{% endwith %} | ||
</div> | ||
{% endif %} | ||
<p> | ||
|
@@ -64,14 +72,24 @@ <h1>{% trans "Results" %}: {{flow_desc.title}}</h1> | |
{% endif %} | ||
</p> | ||
<div class="progress"> | ||
{# Multiplying by 0.9999 to avoid rounding to larger than 100% #} | ||
{# to avoid breaking percent bar. #} | ||
{% with fully_correct_percent=grade_info.fully_correct_percent|mul:0.9999 %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a template |
||
{% with partially_correct_percent=grade_info.partially_correct_percent|mul:0.9999 %} | ||
{% with incorrect_percent=grade_info.incorrect_percent|mul:0.9999 %} | ||
{% with unknown_percent=grade_info.unknown_percent|mul:0.9999 %} | ||
<div class="progress-bar progress-bar-success" | ||
style="width: {{ grade_info.fully_correct_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ fully_correct_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-warning" | ||
style="width: {{ grade_info.partially_correct_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ partially_correct_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-danger" | ||
style="width: {{ grade_info.incorrect_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ incorrect_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-info" | ||
style="width: {{ grade_info.unknown_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ unknown_percent|stringformat:".6f" }}%"></div> | ||
{% endwith %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endwith %} | ||
</div> | ||
{% endif %} | ||
{% if grade_info.optional_total_count %} | ||
|
@@ -89,14 +107,24 @@ <h1>{% trans "Results" %}: {{flow_desc.title}}</h1> | |
{% endif %} | ||
</p> | ||
<div class="progress"> | ||
{# Multiplying by 0.9999 to avoid rounding to larger than 100% #} | ||
{# to avoid breaking percent bar. #} | ||
{% with optional_fully_correct_percent=grade_info.optional_fully_correct_percent|mul:0.9999 %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a template |
||
{% with optional_partially_correct_percent=grade_info.optional_partially_correct_percent|mul:0.9999 %} | ||
{% with optional_incorrect_percent=grade_info.optional_incorrect_percent|mul:0.9999 %} | ||
{% with optional_unknown_percent=grade_info.optional_unknown_percent|mul:0.9999 %} | ||
<div class="progress-bar progress-bar-success" | ||
style="width: {{ grade_info.optional_fully_correct_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ optional_fully_correct_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-warning" | ||
style="width: {{ grade_info.optional_partially_correct_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ optional_partially_correct_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-danger" | ||
style="width: {{ grade_info.optional_incorrect_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ optional_incorrect_percent|stringformat:".6f" }}%"></div> | ||
<div class="progress-bar progress-bar-info" | ||
style="width: {{ grade_info.optional_unknown_percent|stringformat:".8f" }}%"></div> | ||
style="width: {{ optional_unknown_percent|stringformat:".6f" }}%"></div> | ||
{% endwith %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endwith %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a template
{# ... #}
comment on why that's here.