Commit fbf921e401e2bb72d3695106e3983a943f44049f

Authored by Miguel Barão
1 parent a08b82c9
Exists in master and in 1 other branch dev

- changed sessions to 'file' and added a 'sessions' folder to contain the session files.

Showing 3 changed files with 4 additions and 1 deletions   Show diff stats
questions.py
... ... @@ -461,6 +461,7 @@ class QuestionTextArea(Question):
461 461 stdin=self['answer'],
462 462 timeout=self['timeout']
463 463 )
  464 +
464 465 if type(out) in (int, float):
465 466 self['grade'] = float(out)
466 467  
... ...
serve.py
... ... @@ -358,7 +358,7 @@ if __name__ == '__main__':
358 358 '/': {
359 359 'tools.sessions.on': True,
360 360 'tools.sessions.timeout': 240, # sessions last 4 hours
361   - 'tools.sessions.storage_type': 'ram', # or 'file'
  361 + 'tools.sessions.storage_type': 'file', # 'ram' or 'file'
362 362 'tools.sessions.storage_path': 'sessions', # if storage_type='file'
363 363 # tools.sessions.secure = True
364 364 # tools.sessions.httponly = True
... ...
sessions/.gitignore 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +*
  2 +!.gitignore
... ...