Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/editor/assignment_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const ASSIGNMENT_SETTINGS = [
["hideMiddlePanel", "hide_middle_panel", false, "bool", "If checked, then the console and feedback areas is hidden."],
["hideAll", "hide_all", false, "bool", "INCOMPLETE: If checked, then the entire interface is hidden."],
["hideEvaluate", "hide_evaluate", false, "bool", "If checked, then the Evaluate button is not shown on the console."],
["hideUploadButton", "hide_upload_button", false, "bool", "If checked, then the Upload button is not shown."],
["hideImportDatasetsButton", "hide_import_datasets_button", false, "bool", "If checked, then students cannot see the import datasets button."],
// TODO: Fix this one to be settable
["hideImportStatements", "hide_import_statements", false, "bool", "INCOMPLETE: If checked, certain kinds of import statements (matplotlib, turtle, datasets) are not shown in the block interface."],
Expand Down
4 changes: 3 additions & 1 deletion src/editor/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const PYTHON_EDITOR_HTML = `
</div>
<!-- /ko -->

<div class="btn-group mr-2" data-bind="hidden: ui.smallLayout">
<!-- ko if: !assignment.settings.hideUploadButton() && !ui.smallLayout()-->
<div class="btn-group mr-2">
<label class="btn btn-outline-secondary">
<span class="fas fa-file-upload"></span> Upload
<input class="blockpy-toolbar-upload" type="file"
Expand All @@ -85,6 +86,7 @@ export const PYTHON_EDITOR_HTML = `
</a>
</div>
</div>
<!-- /ko -->

<div class="btn-group mr-2" role="group" aria-label="History Group" data-bind="hidden: ui.smallLayout">
<button type="button" class="btn btn-outline-secondary"
Expand Down