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
0158ebca
Commit
0158ebca
authored
Jul 07, 2015
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8810 from edx/cherrypick-hotfix-2015-07-07-to-rc
Cherrypick hotfix-2015-07-07 into release candidate
parents
bd5c0451
407e7f43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
common/djangoapps/student/tests/test_credit.py
+2
-0
common/djangoapps/student/views.py
+4
-0
openedx/core/djangoapps/credit/tests/test_api.py
+1
-0
No files found.
common/djangoapps/student/tests/test_credit.py
View file @
0158ebca
...
@@ -5,6 +5,7 @@ import unittest
...
@@ -5,6 +5,7 @@ import unittest
import
datetime
import
datetime
import
pytz
import
pytz
from
mock
import
patch
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
...
@@ -26,6 +27,7 @@ TEST_CREDIT_PROVIDER_SECRET_KEY = "931433d583c84ca7ba41784bad3232e6"
...
@@ -26,6 +27,7 @@ TEST_CREDIT_PROVIDER_SECRET_KEY = "931433d583c84ca7ba41784bad3232e6"
@override_settings
(
CREDIT_PROVIDER_SECRET_KEYS
=
{
@override_settings
(
CREDIT_PROVIDER_SECRET_KEYS
=
{
"hogwarts"
:
TEST_CREDIT_PROVIDER_SECRET_KEY
,
"hogwarts"
:
TEST_CREDIT_PROVIDER_SECRET_KEY
,
})
})
@patch.dict
(
settings
.
FEATURES
,
{
"ENABLE_CREDIT_ELIGIBILITY"
:
True
})
class
CreditCourseDashboardTest
(
ModuleStoreTestCase
):
class
CreditCourseDashboardTest
(
ModuleStoreTestCase
):
"""
"""
Tests for credit courses on the student dashboard.
Tests for credit courses on the student dashboard.
...
...
common/djangoapps/student/views.py
View file @
0158ebca
...
@@ -799,6 +799,10 @@ def _credit_statuses(user, course_enrollment_pairs):
...
@@ -799,6 +799,10 @@ def _credit_statuses(user, course_enrollment_pairs):
"""
"""
from
openedx.core.djangoapps.credit
import
api
as
credit_api
from
openedx.core.djangoapps.credit
import
api
as
credit_api
# Feature flag off
if
not
settings
.
FEATURES
.
get
(
"ENABLE_CREDIT_ELIGIBILITY"
):
return
{}
request_status_by_course
=
{
request_status_by_course
=
{
request
[
"course_key"
]:
request
[
"status"
]
request
[
"course_key"
]:
request
[
"status"
]
for
request
in
credit_api
.
get_credit_requests_for_user
(
user
.
username
)
for
request
in
credit_api
.
get_credit_requests_for_user
(
user
.
username
)
...
...
openedx/core/djangoapps/credit/tests/test_api.py
View file @
0158ebca
...
@@ -4,6 +4,7 @@ Tests for the API functions in the credit app.
...
@@ -4,6 +4,7 @@ Tests for the API functions in the credit app.
import
datetime
import
datetime
import
ddt
import
ddt
import
pytz
import
pytz
from
django.test
import
TestCase
from
django.test
import
TestCase
from
django.test.utils
import
override_settings
from
django.test.utils
import
override_settings
from
django.db
import
connection
,
transaction
from
django.db
import
connection
,
transaction
...
...
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