Skip to content

Add hideUploadButton assignment setting flag#157

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/add-assignment-setting-upload-button
Draft

Add hideUploadButton assignment setting flag#157
Copilot wants to merge 1 commit intomasterfrom
copilot/add-assignment-setting-upload-button

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

Adds a new boolean assignment setting to control upload button visibility. Defaults to false (upload enabled), matching the behavior of similar hide flags like hideImportDatasetsButton.

Changes

  • src/editor/assignment_settings.js — Adds hideUploadButton / hide_upload_button (bool, default false) to ASSIGNMENT_SETTINGS. Automatically surfaces as a checkbox in the assignment settings panel via the existing boolean component generator.

  • src/editor/python.js — Wraps the upload button group in a ko if guard:

    <!-- ko if: !assignment.settings.hideUploadButton() && !ui.smallLayout()-->
    ...upload/download button group...
    <!-- /ko -->

    Replaces the previous data-bind="hidden: ui.smallLayout" approach so the element is fully removed from the DOM when hidden, consistent with how other toolbar buttons are conditionally rendered.

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