Skip to content

Conversation

@xRahul
Copy link
Owner

@xRahul xRahul commented Jan 27, 2026

Fixed the "BUGGY CODE INPUT FIELD" issue in quiz_system_git/admin.php. The issue was caused by missing loadmode.js script and incorrect usage of CodeMirror.autoLoadMode with MIME types instead of mode names.

Changes:

  1. Added <script src="codemirror/addon/mode/loadmode.js"></script> to admin.php.
  2. Set CodeMirror.modeURL to point to the correct location of mode scripts.
  3. Refactored change_editor JavaScript function to:
    • Map dropdown values (e.g., "cpp", "python") to corresponding CodeMirror mode names (e.g., "clike", "python") and MIME types.
    • Dynamically load the required mode script using CodeMirror.autoLoadMode.
    • Set the editor mode using the correct MIME type.
    • Handle cases where modes might be missing or require specific mappings (e.g., Delphi -> Pascal).

PR created automatically by Jules for task 12450991813249208175 started by @xRahul

- Included codemirror/addon/mode/loadmode.js script.
- Configured CodeMirror.modeURL.
- Updated change_editor function to correctly map dropdown selections to CodeMirror mode names and load them dynamically.
- Handled missing modes gracefully.

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

2 participants