diff --git a/NEWS.md b/NEWS.md index 65ff7c7..d106087 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +# Mortimer v0.4.3 + +## Bugfixes + +* Fixed a bug that caused the `web_experiments.experiment()` page to crash as a consequence of a specific experiment startup error. + +## Smaller changes + +* Improved error handling: Subjects will now always receive a neutral error page, if an experiment crashes. Previously, they were redirected to the login page in some cases. +* Small UI improvements + # Mortimer v0.4.2 ## Bugfixes diff --git a/mortimer/__init__.py b/mortimer/__init__.py index b5e7ebe..4bfd8c5 100644 --- a/mortimer/__init__.py +++ b/mortimer/__init__.py @@ -8,9 +8,8 @@ from flask_mail import Mail from flask_dropzone import Dropzone import pymongo -import alfred -__version__ = '0.4.2' +__version__ = '0.4.3' # the EnvironSetter sets enviroment variables for the current session # It is not included in the GitHub repository, because it contains sensitive diff --git a/mortimer/config.py b/mortimer/config.py index d3ac65d..d46dd51 100644 --- a/mortimer/config.py +++ b/mortimer/config.py @@ -65,7 +65,7 @@ class Config: # Flask-Dropzone settings: DROPZONE_ALLOWED_FILE_CUSTOM = True - DROPZONE_ALLOWED_FILE_TYPE = ".pdf, image/*, .txt, .xml, .pem, .mp3, .mp4, .ogg" + DROPZONE_ALLOWED_FILE_TYPE = ".pdf, image/*, .txt, .xml, .pem, .mp3, .mp4, .ogg, .csv" DROPZONE_MAX_FILE_SIZE = 10 DROPZONE_MAX_FILES = 100 DROPZONE_UPLOAD_ON_CLICK = True diff --git a/mortimer/errors/handlers.py b/mortimer/errors/handlers.py index d8dfc07..476894a 100644 --- a/mortimer/errors/handlers.py +++ b/mortimer/errors/handlers.py @@ -6,9 +6,9 @@ errors = Blueprint("erros", __name__) -@errors.app_errorhandler(404) -def error_404(error): - return render_template('errors/404.html'), 404 +@errors.app_errorhandler(400) +def error_400(error): + return render_template("errors/400.html"), 400 @errors.app_errorhandler(403) @@ -16,6 +16,12 @@ def error_403(error): return render_template('errors/403.html'), 403 +@errors.app_errorhandler(404) +def error_404(error): + return render_template('errors/404.html'), 404 + + @errors.app_errorhandler(500) def error_500(error): - return render_template('errors/500.html'), 500 + return render_template('errors/500_alfred.html'), 500 + diff --git a/mortimer/static/style.css b/mortimer/static/style.css index 550a716..c14b77c 100644 --- a/mortimer/static/style.css +++ b/mortimer/static/style.css @@ -34,7 +34,7 @@ #sidebar ul.components { padding: 20px 0; - border-bttom: 1px solid #47748b; + border-bottom: 1px solid #47748b; } #sidebar ul p { @@ -56,8 +56,8 @@ /*background: #343a40;*/ } -#contentNav { - color: #fff; +/* #contentNav { + color: inherit; } #contentNav ul li a{ @@ -66,8 +66,8 @@ } #contentNav ul li a:hover { - color: #343a40; -} + color: #6c757d; +} */ #sidebar ul li.active > a, a[aria-expanded="true"] { color: #fff; diff --git a/mortimer/templates/create_experiment.html b/mortimer/templates/create_experiment.html index f7cf8fa..545c6b4 100644 --- a/mortimer/templates/create_experiment.html +++ b/mortimer/templates/create_experiment.html @@ -8,7 +8,7 @@ Web Experiment (current)
Something went wrong. Please try again later.
+