Skip to content

feat: code task required for lesson completion (P0.4) - #11

Merged
gon7187 merged 3 commits into
mainfrom
feat/require-code
Jul 28, 2026
Merged

feat: code task required for lesson completion (P0.4)#11
gon7187 merged 3 commits into
mainfrom
feat/require-code

Conversation

@gon7187

@gon7187 gon7187 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Что

  • Урок засчитывается только если код-задание решено верно И суммарно >=2/3 (код + хотя бы ещё один вопрос).
  • Экзамены не затронуты.
  • API submit_lesson: новое поле code_correct; при 2/3 без верного кода сообщение «Для зачёта нужно решить задачу на код».
  • Код-задания в контенте переведены на stdout-формат (if/for/while).
  • Тесты: test_lesson_requires_correct_code_for_completion (2/3 без кода → fail; код+1 → pass; только код → fail).

Проверка

uv run pytest -q → 10 passed.

Kanban: t_f43de556

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3648f6f436

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_api.py
client.post("/api/reset")


def test_lesson_requires_correct_code_for_completion() -> None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the extended-course test's body

Defining the new test here prematurely ends test_extended_course_unlocks_after_foundation, leaving that test with only a reset while its original assertions are now appended to the code-completion test. Consequently, running the extended-course test by node ID reports success without checking that the extended curriculum unlocks; keep those assertions in their original test and end the new test after its own scenarios.

Useful? React with 👍 / 👎.

@gon7187
gon7187 merged commit 009b1ad into main Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant