Skip to content

Commit

Permalink
add section info to SongSync results
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Oct 31, 2023
1 parent 1ee7da2 commit b0a0a07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend/experiment/actions/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def song_sync(session, section, title, response_time=15):
recognize = Trial(
feedback_form=Form([BooleanQuestion(
key='recognize',
result_id=prepare_result('recognize', session, scoring_rule='SONG_SYNC_RECOGNITION'),
result_id=prepare_result('recognize', session, section=section, scoring_rule='SONG_SYNC_RECOGNITION'),
submits=True
)]),
playback=Playback([section], 'AUTOPLAY', play_config={
Expand Down Expand Up @@ -86,6 +86,7 @@ def song_sync(session, section, title, response_time=15):
submits=True,
result_id=prepare_result('correct_place',
session,
section=section,
scoring_rule='SONG_SYNC_CONTINUATION',
expected_response='yes' if continuation_correctness else 'no')
)]),
Expand Down
1 change: 0 additions & 1 deletion backend/session/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def last_song(self):
"""Return artist and name of previous song,
or return empty string if no scores are set
"""

section = self.previous_section()
if section:
return "{} - {}".format(section.song.artist, section.song.name)
Expand Down

0 comments on commit b0a0a07

Please sign in to comment.