Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
d0914ef4
Commit
d0914ef4
authored
5 years ago
by
Dave St.Germain
Browse files
Options
Downloads
Patches
Plain Diff
Added 'show calculator' to courseware metadata
parent
abc43a93
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openedx/core/djangoapps/content/course_overviews/models.py
+7
-0
7 additions, 0 deletions
openedx/core/djangoapps/content/course_overviews/models.py
openedx/core/djangoapps/courseware_api/serializers.py
+1
-0
1 addition, 0 deletions
openedx/core/djangoapps/courseware_api/serializers.py
with
8 additions
and
0 deletions
openedx/core/djangoapps/content/course_overviews/models.py
+
7
−
0
View file @
d0914ef4
...
...
@@ -828,6 +828,13 @@ class CourseOverview(TimeStampedModel):
"""
return
self
.
_original_course
.
teams_enabled
@property
def
show_calculator
(
self
):
"""
TODO: move this to the model.
"""
return
self
.
_original_course
.
show_calculator
def
__str__
(
self
):
"""
Represent ourselves with the course key.
"""
return
six
.
text_type
(
self
.
id
)
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/courseware_api/serializers.py
+
1
−
0
View file @
d0914ef4
...
...
@@ -87,6 +87,7 @@ class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract-
user_has_staff_access
=
serializers
.
BooleanField
()
tabs
=
serializers
.
SerializerMethodField
()
verified_mode
=
serializers
.
SerializerMethodField
()
show_calculator
=
serializers
.
BooleanField
()
def
__init__
(
self
,
*
args
,
**
kwargs
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment