Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prosemirror question type #1131

Merged
merged 12 commits into from
Oct 17, 2024
4 changes: 4 additions & 0 deletions course/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,10 @@ def instantiate_flow_page(
) -> PageBase:
class_ = get_flow_page_class(repo, page_desc.type, commit_sha)

from course.page.base import PageBase
if not issubclass(class_, PageBase):
raise ClassNotFoundError(f"'{page_desc.type}' is not a PageBase subclass")

return class_(None, location, page_desc)

# }}}
Expand Down
2 changes: 2 additions & 0 deletions course/page/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from course.page.inline import InlineMultiQuestion
from course.page.static import Page
from course.page.text import (
HumanGradedRichTextQuestion,
HumanGradedTextQuestion,
SurveyTextQuestion,
TextQuestion,
Expand All @@ -55,6 +56,7 @@
"AnswerFeedback",
"ChoiceQuestion",
"FileUploadQuestion",
"HumanGradedRichTextQuestion",
"HumanGradedTextQuestion",
"InlineMultiQuestion",
"InvalidPageData",
Expand Down
Loading