Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
449a54ba
Commit
449a54ba
authored
Mar 20, 2017
by
Ahsan Ulhaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add eligible_for_financial_aid bit and expose through API
ECOM-7531
parent
616a0f79
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletions
+23
-1
course_discovery/apps/api/serializers.py
+1
-1
course_discovery/apps/api/tests/test_serializers.py
+1
-0
course_discovery/apps/course_metadata/migrations/0049_courserun_eligible_for_financial_aid.py
+20
-0
course_discovery/apps/course_metadata/models.py
+1
-0
No files found.
course_discovery/apps/api/serializers.py
View file @
449a54ba
...
@@ -437,7 +437,7 @@ class CourseRunSerializer(MinimalCourseRunSerializer):
...
@@ -437,7 +437,7 @@ class CourseRunSerializer(MinimalCourseRunSerializer):
fields
=
MinimalCourseRunSerializer
.
Meta
.
fields
+
(
fields
=
MinimalCourseRunSerializer
.
Meta
.
fields
+
(
'course'
,
'full_description'
,
'announcement'
,
'video'
,
'seats'
,
'content_language'
,
'course'
,
'full_description'
,
'announcement'
,
'video'
,
'seats'
,
'content_language'
,
'transcript_languages'
,
'instructors'
,
'staff'
,
'min_effort'
,
'max_effort'
,
'modified'
,
'transcript_languages'
,
'instructors'
,
'staff'
,
'min_effort'
,
'max_effort'
,
'modified'
,
'level_type'
,
'availability'
,
'mobile_available'
,
'hidden'
,
'reporting_type'
,
'level_type'
,
'availability'
,
'mobile_available'
,
'hidden'
,
'reporting_type'
,
'eligible_for_financial_aid'
)
)
def
get_instructors
(
self
,
obj
):
# pylint: disable=unused-argument
def
get_instructors
(
self
,
obj
):
# pylint: disable=unused-argument
...
...
course_discovery/apps/api/tests/test_serializers.py
View file @
449a54ba
...
@@ -342,6 +342,7 @@ class CourseRunSerializerTests(MinimalCourseRunSerializerTests):
...
@@ -342,6 +342,7 @@ class CourseRunSerializerTests(MinimalCourseRunSerializerTests):
'announcement'
:
json_date_format
(
course_run
.
announcement
),
'announcement'
:
json_date_format
(
course_run
.
announcement
),
'video'
:
VideoSerializer
(
course_run
.
video
)
.
data
,
'video'
:
VideoSerializer
(
course_run
.
video
)
.
data
,
'mobile_available'
:
course_run
.
mobile_available
,
'mobile_available'
:
course_run
.
mobile_available
,
'eligible_for_financial_aid'
:
course_run
.
eligible_for_financial_aid
,
'hidden'
:
course_run
.
hidden
,
'hidden'
:
course_run
.
hidden
,
'content_language'
:
course_run
.
language
.
code
,
'content_language'
:
course_run
.
language
.
code
,
'transcript_languages'
:
[],
'transcript_languages'
:
[],
...
...
course_discovery/apps/course_metadata/migrations/0049_courserun_eligible_for_financial_aid.py
0 → 100644
View file @
449a54ba
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-20 11:30
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'course_metadata'
,
'0048_dataloaderconfig'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'courserun'
,
name
=
'eligible_for_financial_aid'
,
field
=
models
.
BooleanField
(
default
=
True
),
),
]
course_discovery/apps/course_metadata/models.py
View file @
449a54ba
...
@@ -385,6 +385,7 @@ class CourseRun(TimeStampedModel):
...
@@ -385,6 +385,7 @@ class CourseRun(TimeStampedModel):
help_text
=
_
(
'Indicates whether the course relation has been manually overridden.'
)
help_text
=
_
(
'Indicates whether the course relation has been manually overridden.'
)
)
)
reporting_type
=
models
.
CharField
(
max_length
=
255
,
choices
=
ReportingType
.
choices
,
default
=
ReportingType
.
mooc
)
reporting_type
=
models
.
CharField
(
max_length
=
255
,
choices
=
ReportingType
.
choices
,
default
=
ReportingType
.
mooc
)
eligible_for_financial_aid
=
models
.
BooleanField
(
default
=
True
)
tags
=
TaggableManager
(
tags
=
TaggableManager
(
blank
=
True
,
blank
=
True
,
...
...
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