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
ccf34471
Unverified
Commit
ccf34471
authored
Dec 04, 2017
by
sanfordstudent
Committed by
GitHub
Dec 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16763 from edx/sstudent/remove_broken_admin
remove broken subsection grade override admin
parents
d9058998
174d0393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
45 deletions
+0
-45
lms/djangoapps/grades/admin.py
+0
-45
No files found.
lms/djangoapps/grades/admin.py
View file @
ccf34471
...
...
@@ -3,14 +3,12 @@ Django admin page for grades models
"""
from
config_models.admin
import
ConfigurationModelAdmin
,
KeyedConfigurationModelAdmin
from
django.contrib
import
admin
from
django.utils.translation
import
ugettext_lazy
as
_
from
lms.djangoapps.grades.config.forms
import
CoursePersistentGradesAdminForm
from
lms.djangoapps.grades.config.models
import
(
ComputeGradesSetting
,
CoursePersistentGradesFlag
,
PersistentGradesEnabledFlag
)
from
lms.djangoapps.grades.models
import
PersistentSubsectionGradeOverride
,
PersistentSubsectionGrade
class
CoursePersistentGradesAdmin
(
KeyedConfigurationModelAdmin
):
...
...
@@ -27,49 +25,6 @@ class CoursePersistentGradesAdmin(KeyedConfigurationModelAdmin):
}),
)
class
PersistentSubsectionGradeOverrideAdmin
(
admin
.
ModelAdmin
):
fieldsets
=
(
(
None
,
{
'fields'
:
(
'grade'
,
'earned_all_override'
,
'earned_graded_override'
,
'possible_all_override'
,
'possible_graded_override'
,
),
'description'
:
'Enter the ID of the subsection grade you want to override. You will probably need to '
'find this in the read replica in the grades_persistentsubsectiongrade table.'
}),
)
list_display
=
[
'get_course_id'
,
'get_usage_key'
,
'get_user_id'
,
'earned_all_override'
,
'earned_graded_override'
,
'created'
,
'modified'
,
]
list_filter
=
(
'grade__course_id'
,
'grade__user_id'
,)
raw_id_fields
=
(
'grade'
,)
search_fields
=
[
'grade__course_id'
,
'grade__user_id'
,
'grade__usage_key'
]
def
get_course_id
(
self
,
persistent_grade
):
return
persistent_grade
.
grade
.
course_id
def
get_usage_key
(
self
,
persistent_grade
):
return
persistent_grade
.
grade
.
usage_key
def
get_user_id
(
self
,
persistent_grade
):
return
persistent_grade
.
grade
.
user_id
get_course_id
.
short_description
=
_
(
'Course Id'
)
get_usage_key
.
short_description
=
_
(
'Usage Key'
)
get_user_id
.
short_description
=
_
(
'User Id'
)
admin
.
site
.
register
(
CoursePersistentGradesFlag
,
CoursePersistentGradesAdmin
)
admin
.
site
.
register
(
PersistentGradesEnabledFlag
,
ConfigurationModelAdmin
)
admin
.
site
.
register
(
ComputeGradesSetting
,
ConfigurationModelAdmin
)
admin
.
site
.
register
(
PersistentSubsectionGradeOverride
,
PersistentSubsectionGradeOverrideAdmin
)
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