-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Remove circuit djangoapp from LMS #10324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ CodeMirror.defineMode("edx_markdown", function(cmCfg, modeCfg) { | |
| , olRE = /^[0-9]+\.\s+/ | ||
| , headerRE = /^(?:\={3,}|-{3,})$/ | ||
| , textRE = /^[^\[*_\\<>`]+/ | ||
| , circuitRE = /^circuit-schematic:(.*)$/; | ||
| ; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One less regex to match. |
||
|
|
||
| function switchInline(stream, state, f) { | ||
| state.f = state.inline = f; | ||
|
|
@@ -55,43 +55,9 @@ CodeMirror.defineMode("edx_markdown", function(cmCfg, modeCfg) { | |
| .replace(/'/g, "'"); | ||
| } | ||
|
|
||
| var circuit_formatter = { | ||
| creator: function(text) { | ||
| var circuit_value = text.match(circuitRE)[1] | ||
|
|
||
| circuit_value = escapeHtml(circuit_value); | ||
|
|
||
| var html = "<div style='display:block;line-height:0;' class='schematic_container'><a href='#circuit_editor_modal' data-toggle='modal' class='schematic_open' style='display:inline-block;'>" + | ||
| "<input type='hidden' parts='' value='" + circuit_value + "' width='" + schematic_width + "' height='" + schematic_height + "' analyses='' class='schematic ctrls'/></a></div>"; | ||
|
|
||
| return html; | ||
| }, | ||
| size: function(text) { | ||
| return {width: schematic_width + styling_width_delta, height:schematic_height + styling_height_delta}; | ||
| }, | ||
| callback: function(node, line) { | ||
| try { | ||
| update_schematics(); | ||
| var schmInput = node.firstChild.firstChild; | ||
| schmInput.codeMirrorLine = line; | ||
| if (schmInput.schematic) { //This is undefined if there was an error making the schematic | ||
| schmInput.schematic.canvas.style.display = "block"; //Otherwise, it gets line height and is a weird size | ||
| schmInput.schematic.always_draw_grid = true; | ||
| schmInput.schematic.redraw_background(); | ||
| } | ||
| } catch (err) { | ||
| console.log("Error in edx_markdown callback: " + err); | ||
| } | ||
|
|
||
| } | ||
| }; | ||
|
|
||
| function blockNormal(stream, state) { | ||
| var match; | ||
| if (stream.sol() && stream.match(circuitRE)) { | ||
| stream.skipToEnd(); | ||
| return circuit_formatter; | ||
| } else if (state.indentationDiff >= 4) { | ||
| if (state.indentationDiff >= 4) { | ||
| state.indentation -= state.indentationDiff; | ||
| stream.skipToEnd(); | ||
| return code; | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1819,7 +1819,6 @@ | |
| 'openedx.core.djangoapps.theming', | ||
|
|
||
| # Our courseware | ||
| 'circuit', | ||
| 'courseware', | ||
| 'student', | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,15 +18,6 @@ $ -> | |
| if $('body').hasClass('courseware') | ||
| Courseware.start() | ||
|
|
||
| # Preserved for backward compatibility | ||
| window.submit_circuit = (circuit_id) -> | ||
| $("input.schematic").each (index, el) -> | ||
| el.schematic.update_value() | ||
|
|
||
| schematic_value $("#schematic_#{circuit_id}").attr("value") | ||
| $.postWithPrefix "/save_circuit/#{circuit_id}", schematic: schematic_value, (data) -> | ||
| alert('Saved') if data.results == 'success' | ||
|
|
||
| window.postJSON = (url, data, callback) -> | ||
| $.postWithPrefix url, data, callback | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is one of a half dozen or so global variables removed in this PR. |
||
|
|
||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only references to this function are in the two wiki templates, removed in this commit.
grep -r 'add_schematic_handler' /edx/app/edxapp/edx-platform/