Skip to content

Commit

Permalink
Merge pull request #1295 from Amsterdam-Music-Lab/hotfix/thk
Browse files Browse the repository at this point in the history
ToontjeHoger Kids hotfix
  • Loading branch information
BeritJanssen authored Oct 1, 2024
2 parents 661cd73 + 0c30993 commit c176b8b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 9 additions & 5 deletions backend/experiment/rules/toontjehoger_1_mozart.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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 result.utils import prepare_result

Expand Down Expand Up @@ -118,8 +117,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}
Expand Down Expand Up @@ -177,8 +179,10 @@ def get_image_trial(self, session, section_group, image_url, question, expected_

image_trial = Trial(
html=HTML(
body='<img src="{}" style="height:calc(100% - 260px);max-height:326px;max-width: 100%;"/>'.format(
image_url)),
body='<img src="{}" style="max-height:326px;max-width: 100%;"/>'.format(
image_url
)
),
feedback_form=form,
title=self.TITLE,
)
Expand Down
6 changes: 4 additions & 2 deletions backend/experiment/rules/toontjehoger_2_preverbal.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ def get_round1(self, session):

image_trial = Trial(
html=HTML(
body='<img src="{}" style="height:calc(100% - 260px);max-height:326px;max-width: 100%;"/>'.format(
"/images/experiments/toontjehoger/preverbal_1.webp")),
body='<img src="{}" style="max-height:326px;max-width: 100%;"/>'.format(
"/images/experiments/toontjehoger/preverbal_1.webp"
)
),
feedback_form=form,
title=self.TITLE,
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit c176b8b

Please sign in to comment.