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

Commit 00a6e76

Browse files
committed
Merge branch 'peer_support' into bookserver
2 parents d72a99d + 36133a1 commit 00a6e76

33 files changed

Lines changed: 2188 additions & 1061 deletions

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3333
extensions = [
3434
"sphinx.ext.mathjax",
35-
"recommonmark",
35+
"myst_parser",
3636
"sphinx.ext.intersphinx",
3737
] + runestone_extensions()
3838

@@ -322,7 +322,7 @@
322322
# It True, sets js files from Sphinx & Runestone to be loaded with defer attr
323323
# substantially speeding up page rendering. May cause issues with books that
324324
# have custom directives or raw html that assume jquery or another library
325-
# is loaded before body is parsed.
325+
# is loaded before body is parsed.
326326
html_defer_js = True
327327

328328
# Output file base name for HTML help builder.

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"author": "",
1919
"license": "ISC",
2020
"devDependencies": {
21-
"css-minimizer-webpack-plugin": "^3.0.0",
2221
"copy-webpack-plugin": "^8.0.0",
2322
"css-loader": "^5.0.0",
23+
"css-minimizer-webpack-plugin": "^3.0.0",
2424
"eslint": "^7.0.0",
2525
"html-loader": "^2.0.0",
2626
"html-webpack-plugin": "^5.0.0",
@@ -37,6 +37,7 @@
3737
"handsontable": "7.2.2",
3838
"jexcel": "^3.9.1",
3939
"jquery-ui": "1.10.4",
40+
"select2": "^4.1.0-rc.0",
4041
"sql.js": "1.5.0",
4142
"vega-embed": "3.14.0",
4243
"wavedrom": "^2.0.0"

requirements-dev.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ selenium>=2.53.6
88
pyvirtualdisplay
99
pytest
1010
pylint
11-
readme-renderer>24
11+
readme-renderer>24
12+
myst_parser

requirements-dev.txt

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.9
2+
# This file is autogenerated by pip-compile
33
# To update, run:
44
#
55
# pip-compile --output-file=requirements-dev.txt requirements-dev.in requirements.in
@@ -8,8 +8,12 @@ alabaster==0.7.12
88
# via sphinx
99
astroid==2.6.5
1010
# via pylint
11-
attrs==21.2.0
11+
atomicwrites==1.4.0
1212
# via pytest
13+
attrs==21.2.0
14+
# via
15+
# markdown-it-py
16+
# pytest
1317
babel==2.9.1
1418
# via sphinx
1519
bleach==3.3.1
@@ -18,7 +22,7 @@ certifi==2021.5.30
1822
# via requests
1923
charset-normalizer==2.0.3
2024
# via requests
21-
click<8.0
25+
click==7.1.2
2226
# via
2327
# -r requirements.in
2428
# pip-tools
@@ -27,10 +31,16 @@ codechat==1.8.8
2731
cogapp==3.0.0
2832
# via -r requirements.in
2933
colorama==0.4.4
30-
# via twine
34+
# via
35+
# pylint
36+
# pytest
37+
# sphinx
38+
# tqdm
39+
# twine
3140
docutils==0.16
3241
# via
3342
# codechat
43+
# myst-parser
3444
# readme-renderer
3545
# sphinx
3646
easyprocess==0.3
@@ -50,17 +60,27 @@ iniconfig==1.1.1
5060
isort==5.9.3
5161
# via pylint
5262
jinja2==3.0.1
53-
# via sphinx
63+
# via
64+
# myst-parser
65+
# sphinx
5466
keyring==23.0.1
5567
# via twine
5668
lazy-object-proxy==1.6.0
5769
# via astroid
5870
lxml==4.6.3
5971
# via codechat
72+
markdown-it-py==1.1.0
73+
# via
74+
# mdit-py-plugins
75+
# myst-parser
6076
markupsafe==2.0.1
6177
# via jinja2
6278
mccabe==0.6.1
6379
# via pylint
80+
mdit-py-plugins==0.2.8
81+
# via myst-parser
82+
myst-parser==0.15.1
83+
# via -r requirements-dev.in
6484
packaging==21.0
6585
# via
6686
# bleach
@@ -95,17 +115,21 @@ pytz==2021.1
95115
# via babel
96116
pyvirtualdisplay==2.2
97117
# via -r requirements-dev.in
118+
pywin32-ctypes==0.2.0
119+
# via keyring
120+
pyyaml==5.4.1
121+
# via myst-parser
98122
readme-renderer==29.0
99123
# via
100124
# -r requirements-dev.in
101125
# twine
126+
requests-toolbelt==0.9.1
127+
# via twine
102128
requests==2.26.0
103129
# via
104130
# requests-toolbelt
105131
# sphinx
106132
# twine
107-
requests-toolbelt==0.9.1
108-
# via twine
109133
rfc3986==1.5.0
110134
# via twine
111135
selenium==3.141.0
@@ -121,6 +145,7 @@ snowballstemmer==2.1.0
121145
sphinx==3.5.4
122146
# via
123147
# -r requirements.in
148+
# myst-parser
124149
# sphinxcontrib-paverutils
125150
sphinxcontrib-applehelp==1.0.2
126151
# via sphinx

runestone/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@
55

66
from .activecode import ActiveCode
77
from .animation import Animation
8-
from .mchoice import MChoice, QuestionNumber
98
from .blockly import Blockly
10-
from .quizly import Quizly
11-
from .khanex import Khanex
129
from .codelens import Codelens
1310
from .clickableArea import ClickableArea
1411
from .datafile import DataFile
1512
from .disqus import DisqusDirective
1613
from .dragndrop import DragNDrop
1714
from .fitb import FillInTheBlank
15+
from .groupsub import GroupSubmission
16+
from .khanex import Khanex
1817
from .selectquestion import SelectQuestion
1918
from .matrixeq import MatrixEq
19+
from .mchoice import MChoice, QuestionNumber
2020
from .meta import Meta
2121
from .parsons import ParsonsProblem
2222
from .poll import Poll
23+
from .quizly import Quizly
2324
from .reveal import RevealDirective
2425
from .shortanswer import JournalDirective
2526
from .showeval import ShowEval
@@ -146,8 +147,8 @@ def setup(app):
146147
try:
147148
for c in setup.custom_js_files:
148149
if isinstance(c, dict):
149-
#peel off filename, pass rest of key/values on as kwargs
150-
filename = c.pop("file")
150+
# peel off filename, pass rest of key/values on as kwargs
151+
filename = c.pop("file")
151152
app.add_autoversioned_javascript(filename, **c)
152153
else:
153154
app.add_autoversioned_javascript(c)
@@ -244,6 +245,7 @@ def build(options):
244245
"datafile": DataFile,
245246
"disqus": DisqusDirective,
246247
"dragndrop": DragNDrop,
248+
"groupsub": GroupSubmission,
247249
"parsonsprob": ParsonsProblem,
248250
"poll": Poll,
249251
"quizly": Quizly,

runestone/activecode/js/activecode.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,8 +1194,9 @@ Yet another is that there is an internal error. The internal error message is:
11941194
}
11951195
}
11961196

1197-
logCurrentAnswer() {
1198-
this.logRunEvent({
1197+
// the sid parameter is optional and is used for group submissions
1198+
async logCurrentAnswer(sid) {
1199+
let data = {
11991200
div_id: this.divid,
12001201
code: this.editor.getValue(),
12011202
language: this.language,
@@ -1204,14 +1205,22 @@ Yet another is that there is an internal error. The internal error message is:
12041205
prefix: this.pretext,
12051206
suffix: this.suffix,
12061207
partner: this.partner,
1207-
}); // Log the run event
1208+
}; // Log the run event
1209+
if (typeof sid !== "undefined") {
1210+
data.sid = sid;
1211+
}
1212+
await this.logRunEvent(data);
12081213
// If unit tests were run there will be a unit_results
12091214
if (this.unit_results) {
1210-
this.logBookEvent({
1215+
let unitData = {
12111216
act: this.unit_results,
12121217
div_id: this.divid,
12131218
event: "unittest",
1214-
});
1219+
};
1220+
if (typeof sid !== "undefined") {
1221+
unitData.sid = sid;
1222+
}
1223+
await this.logBookEvent(unitData)
12151224
}
12161225
}
12171226

runestone/activecode/js/activecode_sql.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ export default class SQLActiveCode extends ActiveCode {
233233
return Promise.resolve("done");
234234
}
235235

236-
logCurrentAnswer() {
237-
this.logRunEvent({
236+
async logCurrentAnswer(sid) {
237+
let data = {
238238
div_id: this.divid,
239239
code: this.editor.getValue(),
240240
language: this.language,
@@ -243,15 +243,23 @@ export default class SQLActiveCode extends ActiveCode {
243243
prefix: this.pretext,
244244
suffix: this.suffix,
245245
partner: this.partner,
246-
}); // Log the run event
246+
}; // Log the run event
247+
if (typeof sid !== "undefined") {
248+
data.sid = sid;
249+
}
250+
await this.logRunEvent(data);
247251

248252
if (this.unit_results) {
249-
this.logBookEvent({
253+
let unitData = {
250254
event: "unittest",
251255
div_id: this.divid,
252256
course: eBookConfig.course,
253257
act: this.unit_results,
254-
});
258+
};
259+
if (typeof sid !== "undefined") {
260+
unitData.sid = sid;
261+
}
262+
await this.logBookEvent(unitData);
255263
}
256264
}
257265

0 commit comments

Comments
 (0)