diff --git a/CHANGELOG.md b/CHANGELOG.md
index adba7e1..db890ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Mortimer v0.8.12 (Released 2021-10-28)
+
+### Added
+
+- Added support for alfred3's new test mode
+- Added "sid" prefix for session ids
+- Added quickstart options for alfred3's test mode and debug mode
+- Added a warning that will appear upon codebook download if element
+ labels in *the two newest* datasets are unequal.
+
## Mortimer v0.8.11 (Released 2021-10-14)
### Changed
diff --git a/src/mortimer/_version.py b/src/mortimer/_version.py
index 27ad00e..0c5e4de 100644
--- a/src/mortimer/_version.py
+++ b/src/mortimer/_version.py
@@ -4,4 +4,5 @@
# 3) we can import it into your module module
-__version__ = "0.8.11"
+
+__version__ = "0.8.12"
diff --git a/src/mortimer/templates/experiment.html b/src/mortimer/templates/experiment.html
index d0bfedc..d2d9852 100644
--- a/src/mortimer/templates/experiment.html
+++ b/src/mortimer/templates/experiment.html
@@ -30,18 +30,34 @@
{{ experiment.title }}
-
-
-
You can use the field and button below to start your experiment with url parameters, for example: param1=value1¶m2=value2
-
+
+
+
+
+
You can use the field and button below to start your experiment with url
+ parameters, for example: param1=value1¶m2=value2
+
+
@@ -67,6 +83,36 @@
{{ experiment.title }}
+
+
+
+
+
You can use the field and button below to start your experiment with url
+ parameters, for example: param1=value1¶m2=value2
+
+
+
+
{% endif %}
@@ -341,14 +387,16 @@ Upload script.py
{% endblock %}
\ No newline at end of file
diff --git a/src/mortimer/web_experiments/alfredo.py b/src/mortimer/web_experiments/alfredo.py
index e61bdff..a73a8f5 100644
--- a/src/mortimer/web_experiments/alfredo.py
+++ b/src/mortimer/web_experiments/alfredo.py
@@ -162,7 +162,7 @@ def start(expid):
experiment = WebExperiment.objects.get_or_404(id=ObjectId(expid))
# create session id
- sid = str(uuid4())
+ sid = "sid-" + str(uuid4())
config = experiment.parse_exp_config(sid)
secrets = experiment.parse_exp_secrets()
@@ -178,7 +178,10 @@ def start(expid):
% exp_url
)
- if not experiment.active:
+ args = request.args.to_dict()
+ test_mode = args.get("test") in ["true", "True", "TRUE"]
+ debug_mode = args.get("debug") in ["true", "True", "TRUE"] or config.getboolean("general", "debug")
+ if not experiment.active and not test_mode and not debug_mode:
return render_template("exp_inactive.html")
session["sid"] = sid
diff --git a/src/mortimer/web_experiments/routes.py b/src/mortimer/web_experiments/routes.py
index 8376c65..f646a4b 100644
--- a/src/mortimer/web_experiments/routes.py
+++ b/src/mortimer/web_experiments/routes.py
@@ -780,7 +780,26 @@ def export_codebook_data(username, experiment_title, delim: str, version: str):
# combine them to a single dictionary, overwriting old values
# with newer ones
data = {}
- for entry in cbdata_collection:
+ n = len(cbdata_collection)
+ for i, entry in enumerate(cbdata_collection):
+
+ # check if all labels in the last two data sets match
+ if i == n-1 and data:
+ for name, cb in entry.items():
+ for lab in ["label_top", "label_left", "label_right", "label_bottom", "placeholder"]:
+ old = data.get(name, "")
+ oldlab = old.get(lab, "") if old else ""
+ newlab = cb.get(lab, "")
+ if not oldlab == newlab:
+ flash(
+ (
+ f"Codebook: {lab} of '{name}' has changed from '{oldlab}' to '{newlab}'. "
+ "This introduces inconsistencies into the codebook. "
+ "Do you have dynamic labels that do not match their elements' names? "
+ "To change a label, increase the experiment version."
+ ),
+ "warning"
+ )
data.update(entry)
fieldnames = data_manager.DataManager.extract_fieldnames(data.values())