Fix CodeTailor Java support and Parsons block granularity - #1349
Open
aspadiyath wants to merge 1 commit into
Open
Fix CodeTailor Java support and Parsons block granularity#1349aspadiyath wants to merge 1 commit into
aspadiyath wants to merge 1 commit into
Conversation
- extract_parsons_code: scope HTML parsing to <pre class="parsonsblocks"> to exclude question prompt text from draggable blocks - evaluate_fixed_code: switch Java test runner from main()-based to JUnitCore, matching livecode.js convention; add compileargs for student filename - generate_parsons_blocks: one statement per block in split_java_code_into_blocks; preserve per-line ordering when flushing same-indent block stacks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
extract_parsons_codenow extracts only the code inside<pre class="parsonsblocks">, excluding the sibling<div class="parsons_question">prompt text.{test_class}.main(args)on JUnit test classes (extending CodeTestHelper, @Test-annotated) that have nomain(), so every Java run failed to compile. Now runs tests viaJUnitCore.runClasses(...), matching the convention already used by the regular (non-CodeTailor) Java activecode runner.super("ClassName")), so javac never compiled it, causing a runtimeClassNotFoundException. Now explicitly passed viacompileargs.inject_pass_fail_prints) that assumed the old, incorrectmain()-based test convention.split_java_code_into_blocks) and the "Partial"/distractor puzzle path (aggregate_code_to_Parsons_block_with_distractor).