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

OctaveCodeQuestion: Octave/MATLAB support in RELATE #633

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ git-roots

/.idea
/.env

my_todo
password
7 changes: 4 additions & 3 deletions bin/relate
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def expand_yaml(yml_file, repo_root):
def test_code_question(page_desc, repo_root):
if page_desc.type not in [
"PythonCodeQuestion",
"PythonCodeQuestionWithHumanTextFeedback"]:
"PythonCodeQuestionWithHumanTextFeedback",
"OctaveCodeQuestion"]:
return

print(75*"-")
Expand All @@ -64,11 +65,11 @@ def test_code_question(page_desc, repo_root):

correct_code = getattr(page_desc, "correct_code", "")

from course.page.code_runpy_backend import \
from course.page.code_run_backend import \
substitute_correct_code_into_test_code
test_code = substitute_correct_code_into_test_code(test_code, correct_code)

from course.page.code_runpy_backend import run_code, package_exception
from course.page.code_run_backend import run_code, package_exception

data_files = {}

Expand Down
2 changes: 2 additions & 0 deletions course/page/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
ChoiceQuestion, MultipleChoiceQuestion, SurveyChoiceQuestion)
from course.page.code import (
PythonCodeQuestion, PythonCodeQuestionWithHumanTextFeedback)
from course.page.code import (
OctaveCodeQuestion)
from course.page.upload import FileUploadQuestion

__all__ = (
Expand Down
6 changes: 6 additions & 0 deletions course/page/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,12 @@ def __init__(self, vctx, location, page_desc):
if title is None:
try:
md_body = self.markup_body_for_title()
except AttributeError:
#TODO XXX
from warnings import warn
warn(_("PageBaseWithTitle subclass '%s' does not implement "
"markup_body_for_title()")
% type(self).__name__)
except NotImplementedError:
from warnings import warn
warn(_("PageBaseWithTitle subclass '%s' does not implement "
Expand Down
Loading