Filters: Spectra Filter (Chemdoodle)

filter_chemdoodle
Maintained by Picture of Carl LeBlondCarl LeBlond
A Moodle text filter that convert links to JCAMP-DX files (*.jdx) to interactive Chemdoodle Web Component Spectra Canvas's.
13 sites
3 downloads
Current versions available: 1

Overview

This software is no longer maintained and has been superseded by the OpenOChem LTI Assessment System.

This is a text filter which convert links to JCAMP-DX files (*.jdx) to interactive Chemdoodle Webcomponent Spectra Canvas's.

Usage

There are three possible spectra configurations possible;

  1. Perspective Canvas - With a ChemDoodle Perspective canvas you can zoom in and adjust the scale of the spectrum. This is the default setting.
  2. Seeker canvas - The Seeker canvas allows the user to obtain or see the coordinates of points on the spectrum. To use the Seeker canvas add ?c=2 at the end of the URL when you create the link or by editing the link.
  3. Linked Perspective and Seeker Canvas - This option provides two linked spectrum. To use both Perspective and Seeker, add ?c=3 to the link url.

Title control

You can also control the title. Adding ?c=2&title=none to the end of the link URL will setup a Seeker canvas with a blank title. This is useful when including spectrum in quiz questions. Adding ?title=NEW TITLE will override the existing title found in the jdx file. The default is to use the title from the jdx file.

Flipping the X-axis

Adding ?c=1&flipaxis=false to the end of the link URL will create a perspective canvas without a flipped axis (i.e. the scale will increase from left to right). The default setting is true (i.e. the x-axis is flipped)

x-axis max and min

Adding ?minx=4&maxx=6 will adjust the initial x-axis max and min scale of the spectrum.

Integration Line

The integration line can be turned off by adding &int=off at end of URL. By default the integration is turned on.

The following is an examples illustrate the three possible ChemDoodle canvas options.  With a ChemDoodle Perspective canvas you can zoom in and adjust the scale of the spectra.

License

This plugin adopts the same license that Moodle does.  The ChemDoodle Web Components are included in this package which are under a GPLv3 license.

Authors

This plugin was developed at the Indiana University of Pennsylvania (IUP).  Neither IUP or Carl LeBlond are affiliated with ChemDoodle.

Sets

This plugin is part of set EasyOChem.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Picture of Carl LeBlond
Carl LeBlond (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Sun, Apr 20, 2014, 2:02 PM
    Carl - Many thanks for sharing this plugin with the Moodle community.

    I noticed that the example files have an All Rights Reserved statement that is incompatible with GPL. My suggestion would be to remove them from the plugin file. You could create an index file with the URLs on where they can be found. That way it is up to the user to get the files.

    I installed the filter; however, when I tried to test it I could see the zoom in, etc. but not the image. I am not sure why it was not working.

    I tried to run the code checker - even excluding the jdx files. I suspect it is probably the js files.

    For now, I am going to mark this plugin as needing more work. Peace - Anthony

  • Picture of Carl LeBlond
    Mon, Apr 21, 2014, 10:58 PM
    Thats odd. What moodle version/operating system/browser did you use? Did you create a link to a .jdx file?

    Thanks Carl
  • Picture of David Mudrák
    Thu, Sep 4, 2014, 6:22 PM
    Thanks Carl for providing the new version with raised issues fixed. I was able to test the functionality of the filter successfully.

    One thing I would suggest is to rename the file_get_contents() JS function that you create in the global scope. It is preferred to use correct namespaces for JS provided by plugins. In your case, it could be something like M.filter_chemdoodle.file_get_contents(). See other plugins form the M object (namespace) usage.

    Also, using global variables like $chemdoodlehasbeeninitialized is not a sign of good code design. Please try to avoid global variables if possible. If you really really need them (and in most cases, plugins have other ways to achieve the same functionality), their names should be upper-case and having the FILTER_CHEMDOODLE_* prefix.

    I am going to approve this filter now. Good luck with maintaining it. You are cleared to land, welcome to the Plugins directory.
Please login to post comments