Skip to content

Commit

Permalink
Fix Score Status & pep8 openedx#697
Browse files Browse the repository at this point in the history
  • Loading branch information
y-suk committed Apr 1, 2016
1 parent 996e79a commit ab3beac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def test_none_user_profile_and_user_standing_contract_disabled_update_biz_score_

for score_order_dict in score_list:
self.assertEqual(SCORE_STORE_FIELD_STUDENT_STATUS_DISABLED,
score_order_dict[SCORE_STORE_FIELD_STUDENT_STATUS])
score_order_dict[SCORE_STORE_FIELD_STUDENT_STATUS])
break

@override_settings(BIZ_SET_SCORE_COMMAND_OUTPUT=command_output_file.name)
Expand Down
16 changes: 14 additions & 2 deletions biz/djangoapps/ga_achievement/score_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,26 @@ def create_list_for_w2ui(cls, items):
'field': _(SCORE_STORE_FIELD_STUDENT_STATUS),
'caption': _(SCORE_STORE_FIELD_STUDENT_STATUS),
'type': 'list',
'options': {'items': [_('Enrolled'), _('Unenrolled'), _('Disabled')]},
'options': {
'items': [
_(SCORE_STORE_FIELD_STUDENT_STATUS_NOT_ENROLLED),
_(SCORE_STORE_FIELD_STUDENT_STATUS_ENROLLED),
_(SCORE_STORE_FIELD_STUDENT_STATUS_UNENROLLED),
_(SCORE_STORE_FIELD_STUDENT_STATUS_DISABLED)
]
},
})
elif field == _(SCORE_STORE_FIELD_CERTIFICATE_STATUS):
searches.append({
'field': _(SCORE_STORE_FIELD_CERTIFICATE_STATUS),
'caption': _(SCORE_STORE_FIELD_CERTIFICATE_STATUS),
'type': 'list',
'options': {'items': [_('Downloadable'), _('Unpublished')]},
'options': {
'items': [
_(SCORE_STORE_FIELD_CERTIFICATE_STATUS_DOWNLOADABLE),
_(SCORE_STORE_FIELD_CERTIFICATE_STATUS_UNPUBLISHED)
]
},
})
else:
searches.append({'field': _(field), 'caption': _(field), 'type': 'text'})
Expand Down

0 comments on commit ab3beac

Please sign in to comment.