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
71ce4d07
Commit
71ce4d07
authored
Jul 09, 2015
by
zubair-arbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 'provider_description' field for CreditProvider model
ECOM-1842
parent
8a65167d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
openedx/core/djangoapps/credit/api/provider.py
+2
-0
openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py
+0
-0
openedx/core/djangoapps/credit/models.py
+7
-0
openedx/core/djangoapps/credit/tests/test_api.py
+3
-0
No files found.
openedx/core/djangoapps/credit/api/provider.py
View file @
71ce4d07
...
...
@@ -65,6 +65,7 @@ def get_credit_provider_info(provider_id):
"display_name": "Hogwarts School of Witchcraft and Wizardry",
"provider_url": "https://credit.example.com/",
"provider_status_url": "https://credit.example.com/status/",
"provider_description: "A new model for the Witchcraft and Wizardry School System.",
"enable_integration": False,
"fulfillment_instructions": "
<p>In order to fulfill credit, Hogwarts School of Witchcraft and Wizardry requires learners to:</p>
...
...
@@ -83,6 +84,7 @@ def get_credit_provider_info(provider_id):
"display_name"
:
credit_provider
.
display_name
,
"provider_url"
:
credit_provider
.
provider_url
,
"provider_status_url"
:
credit_provider
.
provider_status_url
,
"provider_description"
:
credit_provider
.
provider_description
,
"enable_integration"
:
credit_provider
.
enable_integration
,
"fulfillment_instructions"
:
credit_provider
.
fulfillment_instructions
}
...
...
openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py
0 → 100644
View file @
71ce4d07
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/credit/models.py
View file @
71ce4d07
...
...
@@ -94,6 +94,13 @@ class CreditProvider(TimeStampedModel):
)
)
provider_description
=
models
.
TextField
(
default
=
""
,
help_text
=
ugettext_lazy
(
"Description for the credit provider displayed to users."
)
)
fulfillment_instructions
=
models
.
TextField
(
null
=
True
,
blank
=
True
,
...
...
openedx/core/djangoapps/credit/tests/test_api.py
View file @
71ce4d07
...
...
@@ -48,6 +48,7 @@ class CreditApiTestBase(TestCase):
PROVIDER_NAME
=
"Hogwarts School of Witchcraft and Wizardry"
PROVIDER_URL
=
"https://credit.example.com/request"
PROVIDER_STATUS_URL
=
"https://credit.example.com/status"
PROVIDER_DESCRIPTION
=
"A new model for the Witchcraft and Wizardry School System."
ENABLE_INTEGRATION
=
True
FULFILLMENT_INSTRUCTIONS
=
"Sample fulfillment instruction for credit completion."
...
...
@@ -64,6 +65,7 @@ class CreditApiTestBase(TestCase):
display_name
=
self
.
PROVIDER_NAME
,
provider_url
=
self
.
PROVIDER_URL
,
provider_status_url
=
self
.
PROVIDER_STATUS_URL
,
provider_description
=
self
.
PROVIDER_DESCRIPTION
,
enable_integration
=
self
.
ENABLE_INTEGRATION
,
fulfillment_instructions
=
self
.
FULFILLMENT_INSTRUCTIONS
)
...
...
@@ -459,6 +461,7 @@ class CreditProviderIntegrationApiTests(CreditApiTestBase):
"display_name"
:
self
.
PROVIDER_NAME
,
"provider_url"
:
self
.
PROVIDER_URL
,
"provider_status_url"
:
self
.
PROVIDER_STATUS_URL
,
"provider_description"
:
self
.
PROVIDER_DESCRIPTION
,
"enable_integration"
:
self
.
ENABLE_INTEGRATION
,
"fulfillment_instructions"
:
self
.
FULFILLMENT_INSTRUCTIONS
}
...
...
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