Skip to content

Commit

Permalink
feat: Add course type field to advanced settings and course info index (
Browse files Browse the repository at this point in the history
#7)

(cherry picked from commit f5cb217)
  • Loading branch information
johanseto authored Jan 26, 2024
1 parent 9a61827 commit c4e4c8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions cms/djangoapps/contentstore/courseware_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ class CourseAboutSearchIndexer(CoursewareSearchIndexer):
AboutInfo("language", AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),
AboutInfo("invitation_only", AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),
AboutInfo("catalog_visibility", AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),
AboutInfo("course_type", AboutInfo.ANALYSE | AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),
]

@classmethod
Expand Down
9 changes: 9 additions & 0 deletions xmodule/course_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,15 @@ class CourseFields: # lint-amnesty, pylint: disable=missing-class-docstring
scope=Scope.settings
)

course_type = String(
display_name=_("Course Type"),
help=_(
"Content type that helps the student to filter courses which are more interesting for them."
),
default=None,
scope=Scope.settings,
)


class CourseBlock(
CourseFields,
Expand Down

0 comments on commit c4e4c8a

Please sign in to comment.