Log Message:
-----------
showPartialCorrectAnswers support.
Modified Files:
--------------
ww_question_server/bin/setup:
setup.pl
ww_question_server/lib:
ProblemServer.pm
ww_question_server/lib/ProblemServer:
ProblemResponse.pm
Revision Data
-------------
Index: setup.pl
===================================================================
RCS file: /webwork/cvs/system/ww_question_server/bin/setup/setup.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lbin/setup/setup.pl -Lbin/setup/setup.pl -u -r1.6 -r1.7
--- bin/setup/setup.pl
+++ bin/setup/setup.pl
@@ -266,19 +266,40 @@
system('mv WSDL.wsdl ' . $root . '/htdocs/WSDL.wsdl');
}
-print "Setting Directory Permissions\n";
-system("chmod -R 777 $root/tmp");
-system("chmod -R 777 $root/htdocs/tmp");
-print "Done\n";
+
+$dirPerm = promptUser('Do you want me to set directory permissions(requires sudo) (y,n)','y');
+if($dirPerm eq 'y') {
+ print "Setting Directory Permissions\n";
+ system("sudo chmod -R 777 $root/tmp");
+ system("sudo chmod -R 777 $root/htdocs/tmp");
+ print "Done\n";
+}
print "********************************\n";
print "Your WSDL path: '" . $hostname . $files . '/'.$wsdlfilename."'\n";
print "********************************\n";
print "POST INSTALL\n";
-print "1) Append the following line to your apache configuration file:\n";
+$i = 1;
+if($copyFiles eq 'n') {
+ print "$i) Copy the following files to their respective destinations\n";
+ print "global.conf" . ' => ' . $root . "/conf/global.conf\n";
+ print "problemserver.apache-config" . ' => ' .$root . "/conf/problemserver.apache-config\n";
+ print "WSDL.wsdl" . ' => ' . $root . "/htdocs/WSDL.wsdl\n\n";
+ $i++;
+}
+
+if($dirPerm eq 'n') {
+ print "$i) Set the permissions on the following directories so they are read/write accessible by your webserver\n";
+ print "$root/tmp\n";
+ print "$root/htdocs/tmp\n\n";
+ $i++;
+}
+
+print "$i) Append the following line to your apache configuration file:\n";
print "Include $root/conf/problemserver.apache-config\n\n";
+$i++;
-print "2) Restart Apache\n";
+print "$i) Restart Apache\n";
print "Your done, Enjoy!\n";
Index: ProblemServer.pm
===================================================================
RCS file: /webwork/cvs/system/ww_question_server/lib/ProblemServer.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -Llib/ProblemServer.pm -Llib/ProblemServer.pm -u -r1.12 -r1.13
--- lib/ProblemServer.pm
+++ lib/ProblemServer.pm
@@ -59,6 +59,8 @@
#Keep the Default Problem Environment
$self->{problemEnviron} = ($self->{serverEnviron}{problemEnviron});
+ $self->{safe} = new Safe;
+
bless $self;
return $self;
}
@@ -166,7 +168,7 @@
#PRE-LOAD MACRO FILES
eval{$self->{translator}->pre_load_macro_files(
- new Safe,
+ $self->{safe},
$self->{serverEnviron}->{pg}->{directories}->{macros},
'PG.pl', 'dangerousMacros.pl','IO.pl','PGbasicmacros.pl','PGanswermacros.pl'
)};
@@ -298,6 +300,7 @@
$response->{warnings} = $self->{warnings};
$response->{output} = encode_base64(${$self->{translator}->r_text});
$response->{seed} = $self->{translator}->{envir}{problemSeed};
+ $response->{grading} = $self->{translator}->rh_flags->{showPartialCorrectAnswers};
return $response;
}
sub clean {
Index: ProblemResponse.pm
===================================================================
RCS file: /webwork/cvs/system/ww_question_server/lib/ProblemServer/ProblemResponse.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -Llib/ProblemServer/ProblemResponse.pm -Llib/ProblemServer/ProblemResponse.pm -u -r1.3 -r1.4
--- lib/ProblemServer/ProblemResponse.pm
+++ lib/ProblemServer/ProblemResponse.pm
@@ -6,6 +6,7 @@
_ATTR warnings $string Any warnings from translation
_ATTR errors $string Any errors from translation
_ATTR seed $string The seed of the question.
+ _ATTR grading $string The grading option for the question.
=end WSDL
=cut
sub new {
@@ -16,6 +17,7 @@
$self->{warnings} = "";
$self->{errors} = "";
$self->{seed} = "";
+ $self->{grading} = "";
bless $self;
return $self;
}
|