Selaa lähdekoodia

fix issue with cached_result in pythoncode qtype

resolves #63
pull/67/head
adam j hartz 1 kuukausi sitten
vanhempi
commit
e1947273fc
2 muutettua tiedostoa jossa 11 lisäystä ja 2 poistoa
  1. +2
    -0
      CHANGELOG.md
  2. +9
    -2
      catsoop/__QTYPES__/pythoncode/pythoncode.py

+ 2
- 0
CHANGELOG.md Näytä tiedosto

@@ -17,6 +17,8 @@ _Work toward next release. Currently under development._

* Show an error message when two questions would have the same name (#53)

* Fixed an issue with using cached results in the `pythoncode` question type (#63)

**SECURITY:**

**DOCUMENTATION:**


+ 9
- 2
catsoop/__QTYPES__/pythoncode/pythoncode.py Näytä tiedosto

@@ -285,8 +285,15 @@ def handle_submission(submissions, **info):
)
out, err, log = info["sandbox_run_test"](info, code, test)
if "cached_result" in test:
log_s = repr(test["cached_result"])
err_s = "Loaded cached result"
log_s = {
"result": test["cached_result"],
"complete": True,
"duration": 0.0,
"opcode_count": 0,
"opcode_limit_reached": False,
}
err_s = ""
out_s = ""
else:
out_s, err_s, log_s = info["sandbox_run_test"](info, info["csq_soln"], test)
if count != 1:


Ladataan…
Peruuta
Tallenna