Skip to content

Exercises without explicit m/n are dropped #775

Description

@rtibbles

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

An ExerciseNode with no m/n fails validation and is left out of the channel. This covers the constructor default, {"mastery_model": M_OF_N} alone, and CSV exercises with blank M/N columns. The defaults that v0.7.3 filled in are applied only after validation has already failed. m=None crashes the run.

Complexity: Low
Target branch: main

Context

The Change

m/n should be defaulted, as in v0.7.3, before validation checks them. Values that can't be converted to an integer should fail the node, not the run.

How to Get There

Build ExerciseNode(source_id="e", title="E", license=licenses.CC_BY, questions=[q]) with no exercise_data and call process_files().

Acceptance Criteria

  • csv_channel_with_exercises uploads all 5 exercises.
  • An exercise with no exercise_data uploads with m = n = min(5, questions), minimum 1.
  • An exercise with only m uploads with n = m, and the reverse.
  • m=None or a non-numeric m fails that node, and the run continues.

AI usage

I directed the regression hunt and decided which behaviour changes were intended; Claude Code compared v0.7.3 against main, reproduced each regression with scripts, and drafted this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions