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

Various fixes from spring 24 #1060

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/run-safety.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# 51457: not calling py in a safety-related manner
# 65213: nonsense according to
# https://github.com/pyca/pyopenssl/issues/1300
# 67599: pip issue, utter nonsense
poetry run safety check \
-i 38678 \
-i 39253 \
Expand All @@ -28,4 +29,5 @@ poetry run safety check \
-i 51499 \
-i 51457 \
-i 65213 \
-i 67599 \
--full-report
2 changes: 1 addition & 1 deletion course/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ def stringify_state(self):
result += " (/%d)" % len(self.valid_percentages)
return result
else:
return "- ∅ -"
return ""
else:
return _("(other state)")

Expand Down
4 changes: 3 additions & 1 deletion course/page/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ def __init__(self, vctx, location, page_desc):
% {"value": str(page_desc.maximum_megabytes)}))

if vctx is not None:
if not hasattr(page_desc, "value"):
if (
not hasattr(page_desc, "value")
and not getattr(page_desc, "is_optional_page", True)):
vctx.add_warning(location, _("upload question does not have "
"assigned point value"))

Expand Down
2 changes: 1 addition & 1 deletion course/templates/course/gradebook-by-opp.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h3 class="start-well-title">{% trans "Modify many sessions at once" %}</h3>
{% if grade != None and grade.percentage != None %}
{{ grade.percentage|floatformat:"-2" }}%
{% else %}
- &#8709; -
&empty;
{% endif %}
</a>
{% endif %}
Expand Down
6 changes: 4 additions & 2 deletions doc/page-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ The following page types are predefined:
.. |is-optional-page-attr| replace::

Optional. A Boolean value indicating whether the page is an optional page
which does not require answer for full completion of the flow. If
``true``, the attribute *value* should not present. Defaults to ``false``
which does not require answer for full completion of the flow.
This also affects grading: Grades will not be computed for flows
with non-optional pages, even if those pages have no point value.
If ``true``, the attribute *value* should not be present. Defaults to ``false``
if not present. Note that ``is_optional_page: true`` differs from ``value:
0`` in that finishing flows with unanswered page(s) with the latter will be
warned of "unanswered question(s)", while with the former won't. When using
Expand Down
Loading