Skip to content

Conversation

@stvstnfrd
Copy link
Contributor

This revives the work started in https://github.com/edx/edx-platform/pull/7180 .

These endpoints (edit_circuit and save_circuit) had already been
commented out of urls.py, so these views were disabled.

During manual testing of the previous PR, it was found that the wiki integration had been broken for months. At this point, it's probably been broken and unused for at least a year.

@openedx-webhooks
Copy link

Thanks for the pull request, @stvstnfrd! I've created OSPR-898 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

Feel free to add as much of the following information to the ticket:

  • supporting documentation
  • edx-code email threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U needs triage labels Oct 23, 2015
Copy link
Contributor Author

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/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These (global!) variables are are only used in the removed code from common/static/js/vendor/CodeMirror/addons/edx_markdown.js.

@stvstnfrd
Copy link
Contributor Author

CC from #7180: @sarina @pmitros @adampalay

@stvstnfrd
Copy link
Contributor Author

Something to consider..

The wiki schematic creation is broken and should be removed as no one plans to work on it.
I can't confirm the behavior of viewing an already existing wiki schematic, since I can't create one, nor are we using this feature anywhere in production at Stanford. Can someone at edX determine if/how you're using this?

If you are, I suspect we'll want to back out part of the second commit.

@sarina
Copy link
Contributor

sarina commented Oct 26, 2015

@stvstnfrd I think the failing lettuce test was due to some code that's since been reverted. Can you rebase?

@sarina
Copy link
Contributor

sarina commented Oct 26, 2015

@adampalay In the last PR you said

EDIT: it looks like the wiki feature has been used as recently as December

Could you let me know where it's been used? I can take that data and test how this PR affects it.

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Oct 26, 2015
These endpoints (`edit_circuit` and `save_circuit`) had already been
commented out of `urls.py`, so these views were disabled.
@stvstnfrd
Copy link
Contributor Author

@sarina Rebase complete.

@sarina
Copy link
Contributor

sarina commented Oct 27, 2015

@stvstnfrd This has been approved from a product perspective, and the code looks good to me, but before merging I'd like to get some more info from Adam and try testing things out.

@openedx-webhooks openedx-webhooks added awaiting prioritization and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Oct 27, 2015
@stvstnfrd
Copy link
Contributor Author

Sounds good @sarina , give a holler when you need me.

@adampalay
Copy link
Contributor

@sarina , I found that information by running the following query:

select * from wiki_articlerevision
where content LIKE "%circuit-schematic%"

@sarina
Copy link
Contributor

sarina commented Oct 27, 2015

@adampalay - who can I ask to run that query for me? I don't have permissions to do so. I would like to find courses where I could find examples (better yet, urls to the wiki posts, otherwise I'm not sure how I would find the instances)

@adampalay
Copy link
Contributor

@sarina , I didn't realize you didn't have permissions. I'm able to run that query, but I don't know how to get urls to the wiki posts from it.

However, since the query that I ran gives examples of how to write up a circuit schematic in the wiki, I can forward you an example from the DB. You can also probably peruse old runs of 6.002x. Let me know what would be most useful.

@sarina
Copy link
Contributor

sarina commented Oct 27, 2015

An example from the DB would probably work - I can see how it renders on
the current release branch, then compare that to how it renders on this
branch.

On Tue, Oct 27, 2015 at 10:12 AM, Adam notifications@github.com wrote:

@sarina https://github.com/sarina , I didn't realize you didn't have
permissions. I'm able to run that query, but I don't know how to get urls
to the wiki posts from it.

However, since the query that I ran gives examples of how to write up a
circuit schematic in the wiki, I can forward you an example from the DB.
You can also probably peruse old runs of 6.002x. Let me know what would be
most useful.


Reply to this email directly or view it on GitHub
https://github.com/edx/edx-platform/pull/10324#issuecomment-151508548.

@adampalay
Copy link
Contributor

sent an example in a PM

@pmitros
Copy link
Contributor

pmitros commented Oct 27, 2015

I have not read the PR, but if we do end up removing this, please do make sure it doesn't migrate old data away from the database.

@sarina
Copy link
Contributor

sarina commented Oct 27, 2015

@pmitros can you let us know what data is at risk, so we can verify?

@pmitros
Copy link
Contributor

pmitros commented Oct 27, 2015

@sarina Any circuits in the database. We are removing lms/djangoapps/circuit/models.py. I don't know whether that table contains data, and if so, whether this might migrate the data away.

@stvstnfrd
Copy link
Contributor Author

You should confirm on your end, but per @adampalay in the previous PR..

The circuit_servercircuit table is empty in our db.

@sarina
Copy link
Contributor

sarina commented Oct 28, 2015

@stvstnfrd So, my testing shows the wiki circuit integration works on master. Here's a schematic example to try out: https://gist.github.com/sarina/e7b5f37e3c6f3b3adbc4

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed awaiting prioritization labels Oct 28, 2015
@sarina
Copy link
Contributor

sarina commented Oct 28, 2015

So, it seems to make sense to remove code that's been commented out forever, but the wiki integration is still working and apparently at least some of our users are making use of it. This PR (obviously) breaks the integration:

Master
screen shot 2015-10-28 at 9 52 45 am

This pr
screen shot 2015-10-28 at 9 51 20 am

@pmitros
Copy link
Contributor

pmitros commented Oct 28, 2015

If it is working, I would definitely not remove. It is a high-value feature in circuits courses, and provides a framework for embedding other types of rich content into the wiki. The implementation and user experience was very elegant at the time it was built (although my impression is it has slipped a fair bit).

@sarina
Copy link
Contributor

sarina commented Oct 28, 2015

I'm actually going to talk with this with Leslie. This circuit simulator has been embedded in a total of 8 wiki pages, with the last bit of use being October 2013.

We have a ton of code to support and keep working. This untested, rarely utilized code does not seem to be broadly useful. It may be better to continue to support adding in embedded images, and people can add screenshots of the LMS circuit tool if they have questions.

@stvstnfrd I will discuss this with Leslie next week; no action needed from you just now.

@openedx-webhooks openedx-webhooks added product review PR requires product review before merging and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Oct 28, 2015
@pmitros
Copy link
Contributor

pmitros commented Oct 28, 2015

@explorerleslie It's up to Leslie. However, this does a lot more than allow embedded images. You can make things resembling an interactive textbook, with in-line simulations. It's not a lot of code, it's pretty independent code, and it doesn't cause a lot of problems. I remember figuring out how to do this took a lot of time. An alternative might be to remove it when and if it causes problems, or to expand it if we ever get back to doing this kind of innovation in teaching-and-learning.

@explorerleslie
Copy link

@pmitros it is actually actively broken. See @stvstnfrd 's first comment on the PR. I've been involved in the product review of this OSPR, and I agree with the change -- it would be different if it wasn't broken, but it is, and I don't have resources to fix it.

@sarina
Copy link
Contributor

sarina commented Oct 28, 2015

@explorerleslie From my testing (see screenshots in my comment above), the wiki integration does actually work. However, it's been used to embed about 15 circuits in about 8 individual pages, with the last editing being in October 2013.

Additionally, we clearly can't support this feature well. It WAS actually broken a few months ago, and apparently something changed to make it work again, and we don't know what broke or fix it.

If you could make a decision taking this additional information under consideration, I'd appreciate it.

@explorerleslie
Copy link

@sarina thanks for the additional context. if the last time any course used it was October 2013, and we don't have time or effort to support it, then I still think it should be removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this file won't cause data issues, because the endpoints that would allow someone to create circuits & save them have never been enabled.

sarina added a commit that referenced this pull request Oct 29, 2015
Remove circuit djangoapp from LMS
@sarina sarina merged commit 2206b8a into openedx:master Oct 29, 2015
@stvstnfrd
Copy link
Contributor Author

Thanks for all the follow-up work to see this through @sarina @explorerleslie !

@stvstnfrd stvstnfrd deleted the debt/circuit branch October 29, 2015 22:14
kdmccormick added a commit to kdmccormick/edx-platform that referenced this pull request Jul 17, 2023
`module-js` and `module-descriptor-js` are old JavaScript group
indicators, left over from when we managed XModule assets via Django
Pipeline. We would like to get rid of them in order to make it easier to
build XModule JS without using Python.

There is one single usage of `module-js` in the entire platform (the
rest have been replaced with Webpack references, which is the
less-outdated way of managing XModule assets :). The lone `module-js`
reference was added in 2013 [1] so that circuit diagrams would display
in the course wiki. However, the ability to render circuits in the wiki
was removed in 2015 [2], so it is safe to remove the reference.

There is also one single usage of `module-descriptor-js`. It's in the
legacy bulk email editor, which hackily cribs from the old HtmlBlock
editor. Fortunately, we are able to simply replace the Django Pipeline
reference with the equivalent XModule JS Webpack bundle. (Note: The old
email editor is currently still supported, but is currently being
replaced by frontend-app-communications, so this hack will be gone
eventually).

Finally, this commit also sneaks in one styling fix: it adds the
HtmlBlockEditor CSS back to the aforementioned legacy bulk email page.
The missing CSS was causing a read-only 1-line codemirror editor to
appear below the HTML editor [3]. This bug was introduced during the
original XModule SCSS decoupling [4], which removed builtin block CSS
from the LMS-wide bundle, thus removing the HTML editor CSS from the
bulk email page. We imagine that nobody noticed because the bug only
exists in master (not Palm) and frontend-app-communications seems to be
globally enabled on edx.org. As a simple fix, we add the new CSS link to
the legacy bulk email page, and it renders fine again [5].

References:

1. openedx@3fc59b3
2. openedx#10324
3. Before fix: https://github.com/openedx/edx-platform/assets/3628148/25fc41b2-403d-4339-8c49-0b04664dfa02
4. openedx#32018
5. After fix: https://github.com/openedx/edx-platform/assets/3628148/9a5d74f1-cc83-4ebe-8f0c-ee270f7721b8

Part of: openedx#32481
kdmccormick added a commit that referenced this pull request Jul 18, 2023
`module-js` and `module-descriptor-js` are old JavaScript group
indicators, left over from when we managed XModule assets via Django
Pipeline. We would like to get rid of them in order to make it easier to
build XModule JS without using Python.

There is one single usage of `module-js` in the entire platform (the
rest have been replaced with Webpack references, which is the
less-outdated way of managing XModule assets :). The lone `module-js`
reference was added in 2013 [1] so that circuit diagrams would display
in the course wiki. However, the ability to render circuits in the wiki
was removed in 2015 [2], so it is safe to remove the reference.

There is also one single usage of `module-descriptor-js`. It's in the
legacy bulk email editor, which hackily cribs from the old HtmlBlock
editor. Fortunately, we are able to simply replace the Django Pipeline
reference with the equivalent XModule JS Webpack bundle. (Note: The old
email editor is currently still supported, but is currently being
replaced by frontend-app-communications, so this hack will be gone
eventually).

Finally, this commit also sneaks in one styling fix: it adds the
HtmlBlockEditor CSS back to the aforementioned legacy bulk email page.
The missing CSS was causing a read-only 1-line codemirror editor to
appear below the HTML editor [3]. This bug was introduced during the
original XModule SCSS decoupling [4], which removed builtin block CSS
from the LMS-wide bundle, thus removing the HTML editor CSS from the
bulk email page. We imagine that nobody noticed because the bug only
exists in master (not Palm) and frontend-app-communications seems to be
globally enabled on edx.org. As a simple fix, we add the new CSS link to
the legacy bulk email page, and it renders fine again [5].

References:

1. 3fc59b3
2. #10324
3. Before fix: https://github.com/openedx/edx-platform/assets/3628148/25fc41b2-403d-4339-8c49-0b04664dfa02
4. #32018
5. After fix: https://github.com/openedx/edx-platform/assets/3628148/9a5d74f1-cc83-4ebe-8f0c-ee270f7721b8

Part of: #32481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants