From 8bf8de940860ef25a4015c77c07003a5395bcb03 Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Tue, 1 Oct 2024 09:31:53 +0200 Subject: [PATCH 1/4] fix: remove non-breaking spaces when showing composer / ensemble / piece --- backend/experiment/rules/toontjehoger_1_mozart.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/experiment/rules/toontjehoger_1_mozart.py b/backend/experiment/rules/toontjehoger_1_mozart.py index d525cd429..ec3a983d1 100644 --- a/backend/experiment/rules/toontjehoger_1_mozart.py +++ b/backend/experiment/rules/toontjehoger_1_mozart.py @@ -7,7 +7,7 @@ from experiment.actions.playback import Autoplay from experiment.actions.styles import STYLE_TOONTJEHOGER from .base import Base -from experiment.utils import non_breaking_spaces +from experiment.actions.utils import get_current_experiment_url from result.utils import prepare_result @@ -118,8 +118,11 @@ def get_score(self, session): # Feedback message last_result = session.last_result() section = last_result.section - feedback = "Je hoorde {} van {}.".format( - section.song.name, non_breaking_spaces(section.song.artist)) if section else "" + feedback = ( + "Je hoorde {} van {}.".format(section.song.name, section.song.artist) + if section + else "" + ) # Return score view config = {'show_total_score': True} @@ -177,8 +180,10 @@ def get_image_trial(self, session, section_group, image_url, question, expected_ image_trial = Trial( html=HTML( - body=''.format( - image_url)), + body=''.format( + image_url + ) + ), feedback_form=form, title=self.TITLE, ) From 83ae6e265ff47a6d5b2e440b6296771660a1305c Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Tue, 1 Oct 2024 09:31:13 +0200 Subject: [PATCH 2/4] fix: adjust scaling of image in th_preverbal --- backend/experiment/rules/toontjehoger_2_preverbal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/experiment/rules/toontjehoger_2_preverbal.py b/backend/experiment/rules/toontjehoger_2_preverbal.py index c71c912eb..5977a7df2 100644 --- a/backend/experiment/rules/toontjehoger_2_preverbal.py +++ b/backend/experiment/rules/toontjehoger_2_preverbal.py @@ -162,8 +162,10 @@ def get_round1(self, session): image_trial = Trial( html=HTML( - body=''.format( - "/images/experiments/toontjehoger/preverbal_1.webp")), + body=''.format( + "/images/experiments/toontjehoger/preverbal_1.webp" + ) + ), feedback_form=form, title=self.TITLE, ) From 5598077c41d75c24a79e87078e6d80d4ff8608bb Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Tue, 1 Oct 2024 10:32:25 +0200 Subject: [PATCH 3/4] chore: update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d110350b6..12507d9c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muscle", - "version": "2.2.5", + "version": "2.2.6", "private": false, "description": "The MUSCLE platform is an application that provides an easy way to implement and run online listening experiments for music research.", "license": "MIT", From 0c309939dcc966b88d39a92c9a8733487b989dcf Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Tue, 1 Oct 2024 10:33:12 +0200 Subject: [PATCH 4/4] chore: remove unused import --- backend/experiment/rules/toontjehoger_1_mozart.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/experiment/rules/toontjehoger_1_mozart.py b/backend/experiment/rules/toontjehoger_1_mozart.py index ec3a983d1..53694c886 100644 --- a/backend/experiment/rules/toontjehoger_1_mozart.py +++ b/backend/experiment/rules/toontjehoger_1_mozart.py @@ -7,7 +7,6 @@ from experiment.actions.playback import Autoplay from experiment.actions.styles import STYLE_TOONTJEHOGER from .base import Base -from experiment.actions.utils import get_current_experiment_url from result.utils import prepare_result