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
62a2290b
Commit
62a2290b
authored
Jun 06, 2017
by
sanfordstudent
Committed by
GitHub
Jun 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15244 from edx/sstudent/educator-373
Add batch size setting to instructor task
parents
c03cd599
c288ee7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
lms/djangoapps/instructor_task/admin.py
+3
-0
lms/djangoapps/instructor_task/config/__init__.py
+0
-0
lms/djangoapps/instructor_task/config/models.py
+14
-0
lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py
+31
-0
No files found.
lms/djangoapps/instructor_task/admin.py
View file @
62a2290b
...
...
@@ -5,8 +5,10 @@ This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from
config_models.admin
import
ConfigurationModelAdmin
from
django.contrib
import
admin
from
.models
import
InstructorTask
from
.config.models
import
GradeReportSetting
class
InstructorTaskAdmin
(
admin
.
ModelAdmin
):
...
...
@@ -34,3 +36,4 @@ class InstructorTaskAdmin(admin.ModelAdmin):
email
.
admin_order_field
=
'requester__username'
admin
.
site
.
register
(
InstructorTask
,
InstructorTaskAdmin
)
admin
.
site
.
register
(
GradeReportSetting
,
ConfigurationModelAdmin
)
lms/djangoapps/instructor_task/config/__init__.py
0 → 100644
View file @
62a2290b
lms/djangoapps/instructor_task/config/models.py
0 → 100644
View file @
62a2290b
"""
Models for configuration of settings relevant
to instructor tasks.
"""
from
config_models.models
import
ConfigurationModel
from
django.db.models
import
IntegerField
class
GradeReportSetting
(
ConfigurationModel
):
"""
Sets the batch size used when running grade reports
with multiple celery workers.
"""
batch_size
=
IntegerField
(
default
=
100
)
lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py
0 → 100644
View file @
62a2290b
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
from
django.conf
import
settings
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'instructor_task'
,
'0001_initial'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'GradeReportSetting'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'change_date'
,
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'Change date'
)),
(
'enabled'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Enabled'
)),
(
'batch_size'
,
models
.
IntegerField
(
default
=
100
)),
(
'changed_by'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
PROTECT
,
editable
=
False
,
to
=
settings
.
AUTH_USER_MODEL
,
null
=
True
,
verbose_name
=
'Changed by'
)),
],
options
=
{
'ordering'
:
(
'-change_date'
,),
'abstract'
:
False
,
},
),
]
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