Skip to content

[ENHANCEMENT] [MER-5288] Migrate jmol applet#293

Merged
rgachuhi merged 6 commits intomasterfrom
MER-5288-migrate-jmol-applet
Feb 17, 2026
Merged

[ENHANCEMENT] [MER-5288] Migrate jmol applet#293
rgachuhi merged 6 commits intomasterfrom
MER-5288-migrate-jmol-applet

Conversation

@andersweinstein
Copy link
Contributor

@andersweinstein andersweinstein commented Feb 16, 2026

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.

@rgachuhi rgachuhi merged commit cbc6e42 into master Feb 17, 2026
2 checks passed
@rgachuhi rgachuhi deleted the MER-5288-migrate-jmol-applet branch February 17, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants