Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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: 2 additions & 1 deletion lib/cadet/assessments/question_types/programming_question.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ defmodule Cadet.Assessments.QuestionTypes.ProgrammingQuestion do
field(:template, :string)
field(:postpend, :string, default: "")
field(:solution, :string)
field(:llm_grading_prompt, :string, default: "")
embeds_many(:public, Testcase)
embeds_many(:opaque, Testcase)
embeds_many(:secret, Testcase)
end

@required_fields ~w(content template)a
@optional_fields ~w(solution prepend postpend)a
@optional_fields ~w(solution prepend postpend llm_grading_prompt)a

def changeset(question, params \\ %{}) do
question
Expand Down
3 changes: 2 additions & 1 deletion lib/cadet/jobs/xml_parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ defmodule Cadet.Updater.XMLParser do
prepend: ~x"./SNIPPET/PREPEND/text()" |> transform_by(&process_charlist/1),
template: ~x"./SNIPPET/TEMPLATE/text()" |> transform_by(&process_charlist/1),
postpend: ~x"./SNIPPET/POSTPEND/text()" |> transform_by(&process_charlist/1),
solution: ~x"./SNIPPET/SOLUTION/text()" |> transform_by(&process_charlist/1)
solution: ~x"./SNIPPET/SOLUTION/text()" |> transform_by(&process_charlist/1),
llm_grading_prompt: ~x"./LLM_GRADING_PROMPT/text()" |> transform_by(&process_charlist/1)
),
entity
|> xmap(
Expand Down