Difference between revisions of "Client Editor"
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
my $use_site; |
my $use_site; |
||
$use_site = 'test_webwork'; # select rendering site <code>test.webwork.maa.org</code> |
$use_site = 'test_webwork'; # select rendering site <code>test.webwork.maa.org</code> |
||
− | #$use_site = 'local'; # select rendering site <code> |
+ | #$use_site = 'local'; # select rendering site <code>localhost</code> |
#$use_site = 'rochester_test'; # select rendering site <code>128.151.231.2</code> (at Rochester) |
#$use_site = 'rochester_test'; # select rendering site <code>128.151.231.2</code> (at Rochester) |
||
Revision as of 07:49, 4 November 2010
Contents
External Client Editor
It can often be convenient to use an external editor to write new WeBWorK questions rather than to compose them using the web browser interface. To do this your local
editor calls the script renderProblem.pl
which sends the current contents of the editor off to a WeBWorK server for processing and then displays the resulting
rendered problem in a browser. The question is "live" so you can enter responses and see whether they are graded correctly. The text of the new question remains on your desktop or laptop.
How to use it
Configuring renderProblem.pl
The configuration section for the client is at the top of the renderProblem.pl file.
- A valid local path MUST be entered for the TEMPOUTPUTFILE.
- A valid command line string should be entered for the DISPLAY_COMMAND.
- Choose a server site to render the questions for display.
############################################################ # configure the local output file and display command. ############################################################
# Path to a temporary file for storing the output of renderProblem.pl use constant TEMPOUTPUTFILE => '/Users/gage/Desktop/renderProblemOutput.html'; # Command line for displaying the temporary file in a browser. use constant DISPLAY_COMMAND => 'open -a firefox '; #browser opens tempoutputfile above # use constant DISPLAY_COMMAND => "open -a 'Google Chrome' ";
############################################################ my $use_site; $use_site = 'test_webwork'; # select rendering sitetest.webwork.maa.org
#$use_site = 'local'; # select rendering sitelocalhost
#$use_site = 'rochester_test'; # select rendering site128.151.231.2
(at Rochester) ############################################################