[virtualcommons-developer] commit/vcweb: alllee: fixing session_id check in Experiment.participant_
Status: Beta
Brought to you by:
alllee
|
From: <com...@bi...> - 2013-03-20 07:32:31
|
1 new commit in vcweb: https://bitbucket.org/virtualcommons/vcweb/commits/6c842fff9424/ changeset: 6c842fff9424 user: alllee date: 2013-03-20 08:32:16 summary: fixing session_id check in Experiment.participant_group_relationships and no longer creating data value parameters for non-data rounds affected #: 2 files diff -r d542e23263d13375508d2d69e904e4e3739acb96 -r 6c842fff9424c02add62faa19bc4b98921086628 vcweb/boundaries/models.py --- a/vcweb/boundaries/models.py +++ b/vcweb/boundaries/models.py @@ -99,10 +99,11 @@ round_configuration = experiment.current_round logger.debug("setting up round %s", round_configuration) # initialize group and participant data values - experiment.initialize_data_values( - group_parameters=(get_regrowth_parameter(), get_group_harvest_parameter(), get_resource_level_parameter()), - participant_parameters=[get_harvest_decision_parameter(), get_storage_parameter(), get_player_status_parameter()] - ) + if round_configuration.is_playable_round: + experiment.initialize_data_values( + group_parameters=(get_regrowth_parameter(), get_group_harvest_parameter(), get_resource_level_parameter()), + participant_parameters=[get_harvest_decision_parameter(), get_storage_parameter(), get_player_status_parameter()] + ) ''' during a practice or regular round, set up resource levels and participant harvest decision parameters diff -r d542e23263d13375508d2d69e904e4e3739acb96 -r 6c842fff9424c02add62faa19bc4b98921086628 vcweb/core/models.py --- a/vcweb/core/models.py +++ b/vcweb/core/models.py @@ -366,7 +366,7 @@ Generator function for all participant group relationships in this experiment ''' session_id = self.current_round.session_id - if session_id is not None: + if session_id: groups = self.group_set.filter(session_id=session_id) else: groups = self.group_set.all() @@ -759,6 +759,7 @@ round_data, created = self.round_data_set.get_or_create(round_configuration=self.current_round) if self.experiment_configuration.is_experimenter_driven: # create participant ready data values for every round in experimenter driven experiments + logger.debug("creating participant ready participant round data values") for pgr in self.participant_group_relationships: ParticipantRoundDataValue.objects.create(participant_group_relationship=pgr, boolean_value=False, parameter=get_participant_ready_parameter(), round_data=round_data) Repository URL: https://bitbucket.org/virtualcommons/vcweb/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |