Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 0a8c16e

Browse files
committed
Merge branch 'master' of github.com:RunestoneInteractive/RunestoneComponents
2 parents d7f7740 + 5d22380 commit 0a8c16e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

runestone/fitb/fitb.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,9 @@ def depart_fitb_html(self, node):
9797
node_with_document = node
9898
while not node_with_document.document:
9999
node_with_document = node_with_document.parent
100-
# Supply client-side grading info if we're not grading on the server.
101-
node["runestone_options"]["json"] = (
102-
"false"
103-
if node_with_document.document.settings.env.config.runestone_server_side_grading
104-
else json_feedback
105-
)
100+
# Supply grading info (the ``json_feedback``) to the client if we're not grading on the server.
101+
ssg = node_with_document.document.settings.env.config.runestone_server_side_grading
102+
node["runestone_options"]["json"] = "false" if ssg else json_feedback
106103
res = node["template_end"] % node["runestone_options"]
107104
self.body.append(res)
108105

@@ -111,7 +108,8 @@ def depart_fitb_html(self, node):
111108
node["runestone_options"]["divid"],
112109
node["runestone_options"]["basecourse"],
113110
"".join(self.body[self.body.index(node["delimiter"]) + 1 :]),
114-
json_feedback,
111+
# Either provide grading info to enable server-side grading or pass ``None`` to select client-side grading.
112+
json_feedback if ssg else None,
115113
)
116114

117115
self.body.remove(node["delimiter"])

0 commit comments

Comments
 (0)