123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <div class='blockpy-content container-fluid' style='height:100%;'>
- <div class='blockpy-popup modal' style='display:none'>
- <div class='modal-dialog' style='width:750px'>
- <div class='modal-content' id='modal-message'>
- <div class='modal-header'>
- <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button>
- <h4 class='modal-title'>Dynamic Content</h4>
- </div>
- <div class='modal-body' style='width:100%; height:400px; white-space:pre-wrap'>
- </div>
- <div class='modal-footer'>
- <button type='button' class='btn btn-white' data-dismiss='modal'>Close</button>
- </div>
- </div>
- </div>
- </div>
- <canvas id='capture-canvas' style='display:none'></canvas>
- <div class="row" style="padding: 10px 0; height: 100%;">
- <div class="col-lg-8 col-md-7 col-sm-7" style="height: 100%;">
- <div class="row blockpy-toolbar-row" style='padding-bottom: 10px;'>
- <div class='col-md-12 col-sm-12 blockpy-toolbar btn-toolbar' role='toolbar' style="padding:0;">
- <button type='button' class='btn btn-default blockpy-toolbar-reset' data-bind="visible: !assignment.upload()">
- <span class='glyphicon glyphicon-refresh'></span> Reset
- </button>
- <div class="btn-group">
- <label class="btn btn-default btn-file">
- <span class="glyphicon glyphicon-upload"></span>Import <input class="blockpy-toolbar-upload" type="file"
- style="display: none;">
- </label>
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span class="caret"></span><span class="sr-only">Toggle Dropdown</span>
- </button>
- <ul class="dropdown-menu" style="cursor:pointer">
- <li><a id="download-btn" class="blockpy-toolbar-download"><span
- class="glyphicon glyphicon-download"></span> Export Python Code</a></li>
- </ul>
- </div>
- <button type='button' class='btn btn-primary blockpy-toolbar-load-sample'>
- <span class='glyphicon glyphicon-import'></span> Load Sample Code
- </button>
- <b class='blockpy-toolbar-feedback text-muted pull-right'
- style='z-index:100; margin-top:10px; right:0px; position:absolute; display: none; color: red'>New feedback
- ↑</b>
- <div data-bind="visible: settings.instructor()" style='clear:both'>
- </div>
- </div>
- </div>
- <div class='row blockpy-content-bottom' style='padding-bottom: 10px; height: calc(100% - 50px);'>
- <div class='blockpy-editor col-md-12 col-sm-12' style="padding:0;">
- <div class='blockpy-blocks blockpy-editor-menu' style='height:100%;padding:0;'>
- <div class='blockly-div' style='height:100%; width: 100%'></div>
- </div>
- <div class='blockpy-instructor-popup modal' style='display:none' role='dialog'>
- <div class='modal-dialog' role='document'>
- <div class='modal-content' id='modal-message'>
- <div class='modal-header'>
- <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button>
- <h4 class='modal-title'>Assignment Settings</h4>
- </div>
- <div class='modal-body form-inline' style='width:100%'>
- <!-- Name -->
- <form class="form-inline" style='display:inline-block'>
- <label>Name:</label>
- <input type='text' class='blockpy-presentation-name-editor form-control'
- data-bind='textInput: assignment.name'>
- </form><br>
- <!-- Introduction -->
- <label>Introduction:</label>
- <div class='blockpy-presentation-body-editor'>
- </div>
- <!-- Initial mode -->
- <label class='blockpy-presentation-text-first'>
- Initial View:
- <select data-bind="value: assignment.initial_view">
- <option value="Blocks" selected>Blocks</option>
- <option value="Text">Text</option>
- <option value="Split">Split</option>
- <option value="Instructor">Instructor</option>
- <option value="Upload">Upload</option>
- </select>
- </label>
- <br>
- <!-- Parsons -->
- <label class='blockpy-presentation-parsons-check'>
- Parsons:
- <input type='checkbox' class='form-control' data-bind="checked:assignment.parsons">
- </label>
- <br>
- <!-- Importable Datasets -->
- <label class='blockpy-presentation-importable-check'>
- Able to import datasets:
- <input type='checkbox' class='form-control' data-bind="checked:assignment.importable">
- </label>
- <br>
- <!-- Importable Datasets -->
- <label class='blockpy-presentation-timeoutable-check'>
- Disable Timeouts:
- <input type='checkbox' class='form-control' data-bind="checked:assignment.disable_timeout">
- </label>
- <br>
- <!-- Filesystem -->
- <label class='blockpy-presentation-filesystem-controls'>
- Filesystem:
- </label>
- <!--<label class="btn btn-sm btn-default btn-file">
- Upload <input class="blockpy-presentation-upload" type="file" style="display: none;">
- </label>-->
- <button type='button' class='btn btn-default' data-bind="click: addFile">
- <span class='glyphicon glyphicon-file'></span> Add
- </button>
- <ul data-bind="foreach: assignment.files">
- <li>
- <a href="#" target="_blank" data-bind="click: $parent.viewFile, text: $data"><span
- class='glyphicon glyphicon-new-window'></span></a>
- <button class='btn btn-sm btn-danger' data-bind="click: $parent.removeFile">
- <span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
- </li>
- </ul>
- <label>Available Modules</lable>
- <select class='blockpy-available-modules' multiple='multiple'
- data-bind="selectedOptions: assignment.modules">
- <option>Variables</option>
- <option>Decisions</option>
- <option>Iteration</option>
- <option>Functions</option>
- <option>Calculation</option>
- <option>Output</option>
- <option>Turtles</option>
- <option>Python</option>
- <option>Values</option>
- <option>Lists</option>
- <option>Dictionaries</option>
- <option>Data - Parking</option>
- </select>
- </div>
- <div class='modal-footer'>
- <button type='button' class='btn btn-white' data-dismiss='modal'>Close</button>
- </div>
- </div>
- </div>
- </div>
- <!--<div class='blockpy-editor-menu form-inline'>
- </div>-->
- <div class='blockpy-upload blockpy-editor-menu'>
- </div>
- </div>
- </div>
- </div>
- <div class='col-lg-4 col-md-5 col-sm-5' style="height: 100%;">
- <div id="py-editor" class="blockpy-editor">
- <h4>Python Source Code</h4>
- <div class='blockpy-text blockpy-editor-menu' style='padding:0;'>
- <div class='blockpy-text-sidebar' style='width:150px; height: 100%; float:left; background-color: #ddd'>
- </div>
- <textarea class='codemirror-div language-python' style='height:100%'></textarea>
- </div>
- </div>
- <div class='blockpy-content-left row' style="height: 52%;">
- <h4>Output</h4>
- <div class='blockpy-printer blockpy-printer-default' style="resize: none; height: 90%;"">
- </div>
- </div>
- <div class=" blockpy-toolbar btn-toolbar row" style="padding-top: 5px;">
- <button type='button' class='btn blockpy-run' style='float:left' , data-bind='css: execution.status() == "running" ? "btn-info" :
- execution.status() == "error" ? "btn-danger" : "btn-success",
- visible: settings.instructor() || !assignment.upload()'>
- <span class='glyphicon glyphicon-play'></span> Run
- </button>
- </div>
- </div>
- </div>
- </div>
|