diff --git a/.ci/run-safety.sh b/.ci/run-safety.sh index 207f1ec97..0634eb362 100644 --- a/.ci/run-safety.sh +++ b/.ci/run-safety.sh @@ -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 \ @@ -28,4 +29,5 @@ poetry run safety check \ -i 51499 \ -i 51457 \ -i 65213 \ + -i 67599 \ --full-report diff --git a/course/models.py b/course/models.py index a6a639ef9..8ba7057fb 100644 --- a/course/models.py +++ b/course/models.py @@ -1844,7 +1844,7 @@ def stringify_state(self): result += " (/%d)" % len(self.valid_percentages) return result else: - return "- ∅ -" + return "∅" else: return _("(other state)") diff --git a/course/page/upload.py b/course/page/upload.py index 69786786f..d1f6588a8 100644 --- a/course/page/upload.py +++ b/course/page/upload.py @@ -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")) diff --git a/course/templates/course/gradebook-by-opp.html b/course/templates/course/gradebook-by-opp.html index eed8b156e..ef7b91634 100644 --- a/course/templates/course/gradebook-by-opp.html +++ b/course/templates/course/gradebook-by-opp.html @@ -170,7 +170,7 @@

{% trans "Modify many sessions at once" %}

{% if grade != None and grade.percentage != None %} {{ grade.percentage|floatformat:"-2" }}% {% else %} - - ∅ - + ∅ {% endif %} {% endif %} diff --git a/doc/page-types.rst b/doc/page-types.rst index ef8899866..f3c8ca34b 100644 --- a/doc/page-types.rst +++ b/doc/page-types.rst @@ -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