diff --git a/backend/experiment/management/commands/templates/experiment.py b/backend/experiment/management/commands/templates/experiment.py index 34a9f562b..b0eeb4af1 100644 --- a/backend/experiment/management/commands/templates/experiment.py +++ b/backend/experiment/management/commands/templates/experiment.py @@ -69,7 +69,7 @@ def get_trial(self, session): # define a key, by which responses to this trial can be found in the database key = 'test_trial' # get a random section - section = session.section_from_any_song() + section = session.playlist.get_section() question = BooleanQuestion( question=_( "Do you like this song?"), diff --git a/backend/experiment/rules/toontjehoger_2_preverbal.py b/backend/experiment/rules/toontjehoger_2_preverbal.py index 176fd09a1..1ff5f6da0 100644 --- a/backend/experiment/rules/toontjehoger_2_preverbal.py +++ b/backend/experiment/rules/toontjehoger_2_preverbal.py @@ -176,19 +176,19 @@ def get_round_2_question(self): def get_round1_playback(self, session): # Get sections - sectionA = session.section_from_any_song( + sectionA = session.playlist.get_section( filter_by={'tag': 'a', 'group': '1'}) if not sectionA: raise Exception( "Error: could not find section A for round 1") - sectionB = session.section_from_any_song( + sectionB = session.playlist.get_section( filter_by={'tag': 'b', 'group': '1'}) if not sectionB: raise Exception( "Error: could not find section B for round 1") - sectionC = session.section_from_any_song( + sectionC = session.playlist.get_section( filter_by={'tag': 'c', 'group': '1'}) if not sectionB: raise Exception( @@ -215,13 +215,13 @@ def get_round2(self, round, session): # Get sections # French - sectionA = session.section_from_any_song( + sectionA = session.playlist.get_section( filter_by={'tag': 'a', 'group': '2'}) if not sectionA: raise Exception( "Error: could not find section A for round 2") # German - sectionB = session.section_from_any_song( + sectionB = session.playlist.get_section( filter_by={'tag': 'b', 'group': '2'}) if not sectionB: raise Exception(