diff --git a/directives/abstract_exercise.py b/directives/abstract_exercise.py index 2e1bd34..4565d58 100644 --- a/directives/abstract_exercise.py +++ b/directives/abstract_exercise.py @@ -76,6 +76,8 @@ class ConfigurableExercise(AbstractExercise): 'category': directives.unchanged, 'no-configure': directives.flag, 'no-override': directives.flag, + 'min-group-size': directives.nonnegative_int, + 'max-group-size': directives.nonnegative_int, } def apply_override(self, data, category=None): diff --git a/directives/questionnaire.py b/directives/questionnaire.py index 1be552a..b3f2c44 100644 --- a/directives/questionnaire.py +++ b/directives/questionnaire.py @@ -117,8 +117,8 @@ def run(self): 'category': category, 'difficulty': difficulty or '', 'max_submissions': self.options.get('submissions', 0 if is_feedback else env.config.questionnaire_default_submissions), - 'min_group_size': 1 if is_feedback else env.config.default_min_group_size, - 'max_group_size': 1 if is_feedback else env.config.default_max_group_size, + 'min_group_size': self.options.get('min-group-size', 1 if is_feedback else env.config.default_min_group_size), + 'max_group_size': self.options.get('max-group-size', 1 if is_feedback else env.config.default_max_group_size), 'points_to_pass': self.options.get('points-to-pass', 0), 'feedback': is_feedback, 'view_type': 'access.types.stdsync.createForm', diff --git a/directives/submit.py b/directives/submit.py index d7388ce..c794403 100644 --- a/directives/submit.py +++ b/directives/submit.py @@ -104,8 +104,8 @@ def run(self): 'scale_points': points, 'difficulty': difficulty or '', 'max_submissions': self.options.get('submissions', data.get('max_submissions', env.config.program_default_submissions)), - 'min_group_size': data.get('min_group_size', env.config.default_min_group_size), - 'max_group_size': data.get('max_group_size', env.config.default_max_group_size), + 'min_group_size': self.options.get('min-group-size', data.get('min_group_size', env.config.default_min_group_size)), + 'max_group_size': self.options.get('max-group-size', data.get('max_group_size', env.config.default_max_group_size)), 'points_to_pass': self.options.get('points-to-pass', data.get('points_to_pass', 0)), # The RST source file path is needed for fixing relative URLs # in the exercise description.