Release notes for WeBWorK 2.18

From WeBWorK_wiki
Revision as of 11:31, 15 May 2023 by Pstaabp (talk | contribs)
Jump to navigation Jump to search
Construction.png This article is under construction. Use the information herein with caution until this message is removed.

Note that WeBWorK 2.18 has not yet been released. Currently this page is a work in progress.

New WeBWorK Features

  • UI Changes for WeBWorK
    • The overall layout of WeBWorK has changed a bit with the sidebar navigation menu scrolling independently of the main content.
    • The page Help (which was a ? icon in the navigation list) has been moved to a ? next to the page title. The page help for each page has been improved.
    • The instructor Tools is more clearly a separate page rather than a Header for other tools.
    • The Set Assigner page/tool is not separate it could only be accessed via the Instructor Tools Page.
    • The Student Progress page has a new option to show 'Time remaining' for tests.
    • The Stats page has been rewritten for layout and clarity.
    • The PG problem editor improvements
      • The layout of the page is updated to include a source editor and viewer in a side-by-side manner.
      • There is a new Generate Hardcopy tab from which you can generate a PDF displaying only the problem being edited. This makes it much easier to test hardcopy generation for problems.
      • The update/new version tab options are now called Save/Save As...
      • There are options to save backups for pg problems. (documentation?)
    • The date/time widget (flatpicker) now includes a "Now" and "Today" button to set the date/time to now or adjust the date only respectively.
  • A new LTI version 1.3 authentication module has been added that utilizes some of the LTI Advantage tool set. The LTI version 1.1 authentication module is still available.
  • A new status called "observer" has been added. This can be used for TAs and professors or others to ensure that they don't show up in scoring, statistics and student progress views.
  • Gateway quizzes are now called Tests.
  • Hardcopy generation has been revamped. It now uses the exam class from latex. (Update documentation for hardcopy?)
  • The ability to save/retrieve data within pg problems on a user-set level has been added. (Needs documentation)
  • Essay answers
    • There is now a button to insert math via Mathquill (similar in nature to the MathView button that does the same).
    • The same is try for manual graders.
  • When using the problem grader, there is now an option for using points (default), percent or both. This is a new option in the Problem Display/Answer Checking tab of the Course Configuration.
  • The Wiris Math Editor has been removed. It was never functional and input is better handled by MathQuill.

New PG Features

  • New Macros:
    • plotly3D (documentation)
    • random names with pronouns (documentation)
    • MathObject checkboxes (Need a LINK)
    • parserRadioMultiAnswer--this allows for a mixture of radio buttons and within each, other inputs. (Need a LINK)
    • Non-decimal base context (documentation)
    • Linear Relation context for lines and linear inequalities (documentation)
  • Updates to existing macros
    • niceTables.pl has been completely overhauled.
      • New features:...
      • Changes?
    • Labels for checkbox/radio answers (documentation)
    • The graphtool now has a number line mode (documentation)
    • DropDown option to Popup macro. (documentation)
  • Changes to Units:
    • degrees (celsius, Fahrenheit, Kelvin) and mathquill
    • new units: angstroms, microsecond, nanosecond, picometre, femtometre, tera electron-volt, Megawatt, milliwatt, milliCoulomb, microCoulomb, nanoCoulomb, milli-ampere, milli-tesla, Becquerel.
  • Note: the AnswerFormatHelp macro has been deprecated. Instead, the built-in helpLink should be used instead. (LINKS!!)
  • Mathquill changes
  • AnswerHelpFormat macro has been deprecated. Authors should now use helpLink function instead.
  • unionInclude macro has been deprecated. This was used for random problems. The built-in XXX should be used instead.

Security/Advanced Features

The backend of WeBWorK has been relying on apache and mod_perl for nearly two decades. However, mod_perl has not been updated since 2011 and many linux distros are no longer supporting mod_perl in an easy way. The server part of WeBWorK is now functioning with Mojolicious, which includes a standalone web server (hypnotoad) written completely in perl.

Mojolicious has some nice modern route handling features...

(Include some security features?)

Upgrade Instructions

  • It is recommended to back up your current webwork2 configuration files before proceeding. Do this with
    > cp -r /opt/webwork/webwork2/conf /opt/webwork/webwork2/conf.bak
  • Now update the webwork2 and pg code. For this run
    > cd /opt/webwork/webwork2
    > git fetch origin
    > git checkout main
    > git pull
    > cd /opt/webwork/pg
    > git fetch origin
    > git checkout main
    > git pull
    Note: Until the actual release replace "main" above with "WeBWorK-2.18" for the webwork2 code, and "PG-2.18" for the pg code to obtain the code for the release candidate.
  • Update the javascript and css assets for webwork2 and pg with
    > cd /opt/webwork/webwork2/htdocs
    > npm ci
    > cd /opt/webwork/pg/htdocs
    > npm ci
  • The following perl packages will need to be installed (run bin/check_modules.pl to ensure you have all programs/modules)
    • Mojolicious (on Ubuntu 22.04 install the package libmojolicious-perl, on earlier versions of Ubuntu install from cpan)
    • Future::AsyncAwait (on Ubuntu 22.04 install the package libfuture-asyncawait-perl, on earlier versions of Ubuntu install from cpan)
    • SVG (on Ubuntu install libsvg-perl)
    • Data::Structure::Util (on Ubuntu install libdata-structure-util-perl)
    • Crypt::JWT (on Ubuntu install libcrypt-jwt-perl)
    • Crypt::PK::RSA (on Ubuntu install libcryptx-perl)
    • Math::Random::Secure (on Ubuntu install libmath-random-secure-perl)
    • Mojolicious::Plugin::NotYAMLConfig (this is included in libmojolicious-perl on Ubuntu 22.04, on earlier versions of Ubuntu install from cpan)
    • Minion (on Ubuntu install libminion-perl)
    • Minion::Backend::SQLite (on Ubuntu install libminion-backend-sqlite-perl)
  • Delete the old apache2 configuration file /opt/webwork/webwork2/conf/webwork.apache2.4-config and the link to it in /etc/apache2/conf-enabled with
    > rm /opt/webwork/webwork2/conf/webwork.apache2.4-config
    > sudo rm /etc/apache2/conf-enabled/webwork.conf
  • Compare your site.conf file to site.conf.dist, and your localOverrides.conf file to localOverrides.conf.dist and update as needed.
  • Enable new apache2 modules that are needed with
    >sudo a2enmod proxy_http headers
  • Switch from mpm_prefork to mpm_event. This step is optional but recommended. The only reason we have been using mpm_prefork is because it is required for mod_perl2. The mpm_event module is a threaded module that is better with memory management and high server loads. Another option that may be better in some cases is the mpm_worker module. In general it is not recommended to use the mpm_prefork module anymore. There are no advantages, only disadvantages.
    • Disable the apache2 mpm_prefork module and enable mpm_event with
    >sudo a2dismod mpm_prefork
    >sudo a2enmod mpm_event
  • Next set up the new apache2 configuration.
    > cp /opt/webwork/webwork2/conf/webwork2.apache2.4.dist.conf /opt/webwork/webwork2/conf/webwork2.apache2.4.conf
    > sudo ln -s /opt/webwork/webwork2/conf/webwork2.apache2.4.conf /etc/apache2/conf-enabled/webwork2.conf
  • Restart apache2 to make all of the apache2 changes take effect with
    > sudo systemctl restart apache2
  • Note that at this point webwork2 is not running, and you will not be able to access the usual pages. The webwork2 service now needs to be set up for this to work. Start by copying the systemd service .dist file for webwork2.
    > cp /opt/webwork/webwork2/conf/webwork2.dist.service /opt/webwork/webwork2/webwork2.service
  • Now enable and start the service with
    > sudo systemctl enable /opt/webwork/webwork2/conf/webwork2.service
    > sudo systemctl start webwork2
  • You should now be able to visit http://your.server.edu/webwork2 (the usual url for your server) and see webwork2 in action.
  • Note that anytime prior to this upgrade that you would have restarted apache2 to make changes to code or configuration take effect, you will instead now run sudo systemctl restart webwork2. You will rarely need to restart apache2.
  • Make sure to upgrade courses from the admin course to relegate changes to the database.
  • This final step is optional. Some long running processes are not directly run by the webwork2 app. Particularly mass grade updates via LTI and sending of instructor emails. Instead these tasks are executed via the webwork2 Minion job queue. If the users of your system will be utilizing either of those features, then you will need to set up the webwork2 job queue. If those features will not be utilized by the users of your system, then you can skip this step. See Installation Manual for 2.18 on Ubuntu#Set Up the Webwork2 Job Queue for instructions on how to set up the job queue.