Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
28d4e2e8
Commit
28d4e2e8
authored
May 11, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated credit admin
ECOM-4379
parent
f347e30b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletions
+23
-1
openedx/core/djangoapps/credit/admin.py
+3
-0
openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py
+18
-0
openedx/core/djangoapps/credit/models.py
+2
-1
No files found.
openedx/core/djangoapps/credit/admin.py
View file @
28d4e2e8
...
...
@@ -52,6 +52,8 @@ class CreditRequestAdmin(admin.ModelAdmin):
class
CreditRequirementAdmin
(
admin
.
ModelAdmin
):
""" Admin for CreditRequirement. """
list_display
=
(
'course'
,
'namespace'
,
'name'
,
'display_name'
,
'active'
,)
list_filter
=
(
'active'
,
'namespace'
,)
search_fields
=
(
'course__course_key'
,
'namespace'
,
'name'
,)
class
Meta
(
object
):
model
=
CreditRequirement
...
...
@@ -60,6 +62,7 @@ class CreditRequirementAdmin(admin.ModelAdmin):
class
CreditRequirementStatusAdmin
(
admin
.
ModelAdmin
):
""" Admin for CreditRequirementStatus. """
list_display
=
(
'username'
,
'requirement'
,
'status'
,)
search_fields
=
(
'username'
,
'requirement__course__course_key'
,)
class
Meta
(
object
):
model
=
CreditRequirementStatus
...
...
openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py
0 → 100644
View file @
28d4e2e8
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'credit'
,
'0002_creditconfig'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'creditrequirementstatus'
,
options
=
{
'verbose_name_plural'
:
'Credit requirement statuses'
},
),
]
openedx/core/djangoapps/credit/models.py
View file @
28d4e2e8
...
...
@@ -295,7 +295,7 @@ class CreditRequirement(TimeStampedModel):
ordering
=
[
"order"
]
def
__unicode__
(
self
):
return
self
.
display_name
return
'{course_id} - {name}'
.
format
(
course_id
=
self
.
course
.
course_key
,
name
=
self
.
display_name
)
@classmethod
def
add_or_update_course_requirement
(
cls
,
credit_course
,
requirement
,
order
):
...
...
@@ -430,6 +430,7 @@ class CreditRequirementStatus(TimeStampedModel):
class
Meta
(
object
):
unique_together
=
(
'username'
,
'requirement'
)
verbose_name_plural
=
_
(
'Credit requirement statuses'
)
@classmethod
def
get_statuses
(
cls
,
requirements
,
username
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment