NAME

WeBWorK::Utils::Rendering - utilities for rendering problems.

constructPGOptions

This method requires a course environment, user, set, problem, psvn, form fields, and translation options. It constructs the options to pass to the WeBWorK::PG constructor in the new format. The options are roughly in correspondence to the PG translator environment variables.

getTranslatorDebuggingOptions

This method requires an $authz and a $userName, and converts permissions into the corresponding PG debugging environment variable.

renderPG

This method requires a course environment, user, set, problem, psvn, form fields, and translation options. These are passed to the WeBWorK::PG constructor inside of a subprocess. The created object is then parsed into a hash that containing all of the data webwork2 needs for rendering and processing the problem. Note that this hash can not contain any blessed references. Those will all be lost in the return value from the process.

The return value of the method is a Mojo::Promise that will resolve to the above hash when awaited.