Skip to content

Commit

Permalink
Merge pull request #169 from eduNEXT/MJG/course_overview_getter
Browse files Browse the repository at this point in the history
feat: add course overview function getter
  • Loading branch information
mariajgrimaldi committed Aug 6, 2021
2 parents 1858f1e + ccb721d commit 219575a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Unreleased
Changed
~~~~~~~
* Wrap course edxapp imports with try-except block.
Added
~~~~~~~
* Course overview -edxapp model- function getter.

[4.14.0] - 2021-07-20
---------------------
Expand Down
7 changes: 7 additions & 0 deletions eox_core/edxapp_wrapper/backends/courses_h_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ def get_first_course_key():
else:
return ''
return course_location.course_key


def get_course_overview():
"""
Gets course overview model from edxapp.
"""
return CourseOverview
9 changes: 9 additions & 0 deletions eox_core/edxapp_wrapper/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ def get_first_course_key():
backend = import_module(backend_function)

return backend.get_first_course_key()


def get_course_overview():
""" Gets the course overview model from edxapp. """

backend_function = settings.EOX_CORE_COURSES_BACKEND
backend = import_module(backend_function)

return backend.get_course_overview()

0 comments on commit 219575a

Please sign in to comment.