diff --git a/lib/cadet/assessments/question_types/programming_question.ex b/lib/cadet/assessments/question_types/programming_question.ex index a39625de3..510c58c22 100644 --- a/lib/cadet/assessments/question_types/programming_question.ex +++ b/lib/cadet/assessments/question_types/programming_question.ex @@ -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 diff --git a/lib/cadet/jobs/xml_parser.ex b/lib/cadet/jobs/xml_parser.ex index fb1742571..caa52538a 100644 --- a/lib/cadet/jobs/xml_parser.ex +++ b/lib/cadet/jobs/xml_parser.ex @@ -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(