@@ -46,55 +46,53 @@ use JSON;
4646#################################################
4747 instructorXMLHandler -- a front end for the Webservice that accepts HTML forms
4848
49- receives WeBWorK problems presented as HTML forms, usually created with js xmlhttprequests,
50- packages the form variables into an XML_RPC request
49+ receives WeBWorK problems presented as HTML forms, usually created with js xmlhttprequests,
50+ packages the form variables into an XML_RPC request
5151 suitable for all of the webservices in WebworkWebservices
5252 returns xml resutls
5353#################################################
5454
5555=cut
5656
5757# To configure the target webwork server two URLs are required
58- # 1. http://test.webwork.maa.org/mod_xmlrpc
58+ # 1. http://test.webwork.maa.org/mod_xmlrpc
5959# points to the Webservice.pm and Webservice/RenderProblem modules
6060# Is used by the client to send the original XML request to the webservice
61- # Note: This not the same as the webworkClient->url which should NOT have
62- # the mod_xmlrpc segment.
63- # 2. $FORM_ACTION_URL http:http://test.webwork.maa.org/webwork2/html2xml
64- # points to the renderViaXMLRPC.pm module.
61+ # Note: This NOT the same as the webworkClient->url which does NOT have
62+ # the mod_xmlrpc segment attached. webworkClient->url would be http://test.webwork.maa.org
63+ # The mod_xmlrpc segment is added by WebworkClient.pm when issuing the webservice call
64+ # using the constant REQUEST_URI within the subroutine xmlrpcCall
65+ # 2. $FORM_ACTION_URL http:http://test.webwork.maa.org/webwork2/instructorXMLHandler
66+ # points to the instructorXMLHandler.pm module.
6567#
6668# This url is placed as form action url when the rendered HTML from the original
6769# request is returned to the client from Webservice/RenderProblem. The client
6870# reorganizes the XML it receives into an HTML page (with a WeBWorK form) and
6971# pipes it through a local browser.
7072#
7173# The browser uses this url to resubmit the problem (with answers) via the standard
72- # HTML webform used by WeBWorK to the renderViaXMLRPC .pm handler.
74+ # HTML webform used by WeBWorK to the instructorXMLHandler .pm handler.
7375#
74- # This renderViaXMLRPC .pm handler acts as an intermediary between the browser
76+ # This instructorXMLHandler .pm handler acts as an intermediary between the browser
7577# and the webservice. It interprets the HTML form sent by the browser,
7678# rewrites the form data in XML format, submits it to the WebworkWebservice.pm
7779# which processes it and sends the the resulting HTML back to renderViaXMLRPC.pm
7880# which in turn passes it back to the browser.
79- # 3. The second time a problem is submitted renderViaXMLRPC .pm receives the WeBWorK form
81+ # 3. The second time a problem is submitted instructorXMLHandler .pm receives the WeBWorK form
8082# submitted directly by the browser.
81- # The renderViaXMLRPC .pm translates the WeBWorK form, has it processes by the webservice
83+ # The instructorXMLHandler .pm translates the WeBWorK form, has it processed by the webservice
8284# and returns the result to the browser.
8385# The The client renderProblem.pl script is no longer involved.
84- # 4. Summary: renderProblem.pl is only involved in the first round trip
85- # of the submitted problem. After that the communication is between the browser and
86- # renderViaXMLRPC using HTML forms and between renderViaXMLRPC and the WebworkWebservice.pm
87- # module using XML_RPC.
8886
8987
9088# Determine the root directory for webwork on this machine (e.g. /opt/webwork/webwork2 )
9189# this is set in webwork.apache2-config
9290# it specifies the address of the webwork root directory
9391
94- # my $webwork_dir = $ENV{WEBWORK_ROOT};
92+
9593my $webwork_dir = $WeBWorK::Constants::WEBWORK_DIRECTORY ;
9694unless ($webwork_dir ) {
97- die " renderViaXMLRPC .pm requires that the top WeBWorK directory be set in " .
95+ die " instructorXMLHandler .pm requires that the top WeBWorK directory be set in " .
9896 " \$ WeBWorK::Constants::WEBWORK_DIRECTORY by webwork.apache-config or webwork.apache2-config\n " ;
9997}
10098
0 commit comments