Remove obsolete context-type attribute for submissions
The value and function is no longer used.
This commit is contained in:

committed by
Sebastian Serth

parent
6d62dfc3de
commit
bf0e6149da
@ -537,10 +537,6 @@ var CodeOceanEditor = {
|
|||||||
return this.isActiveFileRunnable() && this.running;
|
return this.isActiveFileRunnable() && this.running;
|
||||||
},
|
},
|
||||||
|
|
||||||
isActiveFileSubmission: function () {
|
|
||||||
return ['Submission'].includes(this.active_frame.data('contextType'));
|
|
||||||
},
|
|
||||||
|
|
||||||
isActiveFileTestable: function () {
|
isActiveFileTestable: function () {
|
||||||
return this.isActiveFileExecutable() && ['teacher_defined_test', 'user_defined_test', 'teacher_defined_linter'].includes(this.active_frame.data('role'));
|
return this.isActiveFileExecutable() && ['teacher_defined_test', 'user_defined_test', 'teacher_defined_linter'].includes(this.active_frame.data('role'));
|
||||||
},
|
},
|
||||||
|
@ -53,11 +53,6 @@ CodeOceanEditorSubmissions = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
createSubmissionCallback: function(submission){
|
createSubmissionCallback: function(submission){
|
||||||
// set all frames context types to submission
|
|
||||||
$('.frame').each(function(index, element) {
|
|
||||||
$(element).data('context-type', 'Submission');
|
|
||||||
});
|
|
||||||
|
|
||||||
// update the ids of the editors and reload the annotations
|
// update the ids of the editors and reload the annotations
|
||||||
for (const editor of this.editors) {
|
for (const editor of this.editors) {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
div class=(defined?(own_solution) ? "own-frame" : "frame") data-executable=file.file_type.executable? data-filename=file.filepath data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-context-type=file.context_type data-read-only=file.read_only
|
div class=(defined?(own_solution) ? "own-frame" : "frame") data-executable=file.file_type.executable? data-filename=file.filepath data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-read-only=file.read_only
|
||||||
- if file.file_type.binary?
|
- if file.file_type.binary?
|
||||||
- file_path = protected_upload_path(id: file.id, filename: file.filepath)
|
- file_path = protected_upload_path(id: file.id, filename: file.filepath)
|
||||||
.binary-file data-file-id=file.ancestor_id
|
.binary-file data-file-id=file.ancestor_id
|
||||||
|
Reference in New Issue
Block a user