[ENHANCEMENT] [MER-5288] Migrate jmol applet#293
Merged
Conversation
rgachuhi
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This migrates the JMOL applet used in biochemistry course to view and manipulate models of molecules. Legacy implemented this by translating at runtime through theme and script into an iframe running the jsmolframe.html from the superactivity repository which loads the jsmol javascript implementation of the jmol functionality. This has the migration tool effect the same translation. Note this does not translate to an OliEmbeddedActivity or a torus custom activity, just an ordinary iframe with parameters encoded in the URL.
One issue which had to be dealt with: in legacy file loads were same-origin (from webcontent), but in torus they will come out as cross-origin, and jsmol by default will call into a backend php script for these, which torus is not running. However, jsmol allows inclusion of a marker parameter in the URL to get direct loads anyway, so migrated URL always includes this.
This can be tested by converting the content from https://svn.oli.cmu.edu/svn/content/biology/biochemistry/branches/v_3_4
which has jsmol on pages very early in the course material. A webcontent bundle for this course's webcontent has already been uploaded to our S3 space with bundle name
biochem. But note it is not required for JSMOL to work to use a webcontent bundle: the root script loads from the superactivity repository and other loads, normally one pdb (protein data base) file, use absolute URLs.Command button messages to the iframe require torus changes so are not implemented. (They seem broken in legacy too: see https://oli.cmu.edu/jcourse/workbook/activity/page?context=9d4919ee0a0001dc513ba861492728d9 )
This includes a couple of incidental fixes arising from that content: to include the instructions on a composite activity, and to deal with commented-out DOCTYPE lines.