Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop wwclientsup7 #657

Merged
merged 69 commits into from
Jan 24, 2016
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
12f4398
Fix conflict in WebworkClient
mgage Oct 20, 2015
b5e8f03
Make sure that courseName is always defined in CourseEnvironment
mgage Oct 21, 2015
6df229e
Add accessor (a mutator) for the "summary" item contained in Attempt…
mgage Oct 21, 2015
c999dd6
Make the test script for AttemptsTable prettier.
mgage Oct 21, 2015
5cf154b
Add "grab_course_environment" support script for testing scripts in t…
mgage Oct 21, 2015
cde9172
Updates to testAttemptsTable script
mgage Oct 21, 2015
3c2c575
Add capabilities to the AttemptsTable object
mgage Oct 21, 2015
14c45de
Modify webwork2/lib/WeBWorK/ContentGenerator/Problem.pm to use Atte…
mgage Oct 21, 2015
5ad0dd3
Add POD documentation to attemptsTable.pm
mgage Oct 26, 2015
242b5b1
Additional documentation
mgage Oct 29, 2015
8bcfe66
Fixed bug in instructorXMLHandler
mgage Oct 31, 2015
0d3c622
Replace "encodedSource" by encoded_source
mgage Nov 1, 2015
58aec49
Have displayMode and problemSeed defined in one place $envir->{inputs…
mgage Nov 1, 2015
78187b8
Have displayMode and problemSeed defined in one place $envir->{inputs…
mgage Nov 1, 2015
dce04fc
Have displayMode and problemSeed defined in one place $envir->{inputs…
mgage Nov 1, 2015
0cf9edc
Cleanup
mgage Nov 1, 2015
ee4e1e4
Cleanup -- don't want problemSeed =0
mgage Nov 1, 2015
df30ce6
Define displayMode in the hash inputs_ref
mgage Nov 4, 2015
ba002df
some debug adjustments
mgage Nov 4, 2015
aec006d
Merge branch 'release-2.11' into wwclientsup7-debug
mgage Nov 12, 2015
5a51c08
Merge commit '14c45de16b61188457f37135cb016815f18ce8a1' into wwclient…
mgage Nov 12, 2015
662ffc9
Merge branch 'develop_attemptTables_update3' into wwclientsup7-debug
mgage Nov 12, 2015
9e84b8d
Updates for using attemptsTables
mgage Nov 17, 2015
719c836
sendXMLRPC.pl replaces renderProblem.pl, renderProblem_raw_output.p…
mgage Nov 17, 2015
b3ca897
Rename inputs.txt to input.pg so that it will work with sendXMLRPC.pl
mgage Nov 19, 2015
6aec5cb
check2_problems_in_dir.sh duplicates check_problems_in_dir.sh using …
mgage Nov 19, 2015
eada3ce
Add options, allow a directory as input (as well as a string of files…
mgage Nov 19, 2015
2a9f191
Add additional debugging options (via checkboxes) to Problem.pm
mgage Nov 19, 2015
5eaf268
Improve error message when the session key has timed out.
mgage Nov 19, 2015
47aaef7
Remove warning messages and warnings from undefined quantities
mgage Nov 19, 2015
eda4cc1
Initialize variable properly
mgage Nov 19, 2015
3f213f6
Catch errors so that the process doesn't stop if we hit a bad file
mgage Nov 21, 2015
fd725d4
Add showResource checkbox. Improve sendXMLRPC handling of directorie…
mgage Nov 21, 2015
70110a6
Add defaults.config support for embedSVG and embedPDF
mgage Nov 29, 2015
9d6dbf5
Fix typo in cut/past operation.
mgage Nov 29, 2015
ca4a910
More support for embedSVG and embedPDF
mgage Nov 29, 2015
4c3b42f
Improve methods of scraping the correct answers from the response
mgage Dec 6, 2015
e5e7dff
prevent undefined error. Remove warning used during testing
mgage Dec 6, 2015
7fd4d81
Cosmetic changes
mgage Dec 6, 2015
c02efed
Remove displayMode and problemSeed from the inputs_ref hash (these c…
mgage Dec 6, 2015
af84d97
Merge branch 'release-2.11' into develop_wwclientsup7
mgage Dec 6, 2015
9aeea42
Fix bungled merge
mgage Dec 6, 2015
919c634
Add helpful error message if someone uses the key word password inste…
mgage Dec 6, 2015
b935ef7
Cosmetic
mgage Dec 7, 2015
31739f0
Replacing password by course_password.
mgage Dec 7, 2015
92a6ca4
Removing languageMode (a synonym for displayMode) which I don't belie…
mgage Dec 7, 2015
f026d11
Correct the fact that the ShowResources checkbox was not "sticky".
mgage Dec 7, 2015
4f67fa4
Add ability to process a list of pg questions from a file specified b…
mgage Dec 9, 2015
ebf1316
Replace WWgrade with WWcorrectAns
mgage Dec 10, 2015
17abf5e
Allow data in credentials file to override the displayMode for the WW…
mgage Dec 10, 2015
24e7868
Update instructorXMLRPC to correspond to changes in WebworkWebservice.
mgage Dec 14, 2015
6b06fa0
Merge branch 'develop' into develop_wwclientsup7
mgage Dec 20, 2015
f25f5ec
Add support for choosing alternate templates using parameters passed …
mgage Dec 22, 2015
8755a99
Add ability to edit source file (-e switch)
mgage Dec 26, 2015
6f9fc08
Some question as to whether I've made the right choices in Problelem.…
mgage Dec 27, 2015
05b3906
Merge branch 'develop' into develop_wwclientsup7a
mgage Jan 3, 2016
b9de8a3
Fixed a missed conflict from the last merge of the new develop with w…
mgage Jan 3, 2016
8b6bee8
Revert ProblemSetList2.pm to the develop version.
mgage Jan 3, 2016
d659eeb
Fix typos in defaults.config -- specifically about the editors displ…
mgage Jan 3, 2016
ed68d60
Fix spelling of browsernojs
mgage Jan 3, 2016
7861dc2
Change $self->{ce} to $self->ce
mgage Jan 4, 2016
416efdb
Update comments about search paths for html files, image files and pd…
mgage Jan 18, 2016
f13c229
Reverting a bad merge for output_comments subroutine.
mgage Jan 22, 2016
5186f9d
Remove hardcoding of perl location. Add warning that this .sh file i…
mgage Jan 23, 2016
0dad7f3
Make ww_credentials a .dist file
mgage Jan 23, 2016
fea5bbd
Finish updating ww_credentials.dist
mgage Jan 23, 2016
a55f9e5
Remove hardcoding of perl from check2_problems.
mgage Jan 23, 2016
3920f8c
Fix check in for $rh undefined in web service.
mgage Jan 23, 2016
4ba78e1
Remove the if ($debugXmlCode) { } clause from around the eval{ "$rh…
mgage Jan 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
16 changes: 16 additions & 0 deletions clients/check2_problems_in_dir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#usage
# check_problems_in_dir.s directory_name

echo "Checking problems in directory $1"
echo '' > "$WEBWORK_ROOT/DATA/bad_problems.txt"
echo "Results sent to"
echo "$WEBWORK_ROOT/DATA/bad_problems.txt"
time find $1 -name "*.pg" -exec /Volumes/WW_test/opt/local/bin/perl $WEBWORK_ROOT/clients/sendXMLRPC.pl -C -B {} ';' #tail -f /Volumes/WW_test/opt/webwork/webwork2/DATA/bad_problems.txt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hard coded path to perl and should probably just rely on the path or a config variable.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok -- although this .sh file becomes redundant once the new sendXMLRPC is stable. It's functionality is embedded in the new sendXMLRPC.

echo "start search"
#tail -f "$WEBWORK_ROOT/DATA/bad_problems.txt"
echo "Time for $1";
echo ""
echo ""
exit

12 changes: 8 additions & 4 deletions clients/checkProblem.pl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ BEGIN
" with permissions 777 " unless -w LOG_FILE();

### set display mode
use constant DISPLAYMODE => 'images';
use constant DISPLAYMODE => 'MathJax';
use constant PROBLEMSEED => '32145';


### select a rendering site
Expand Down Expand Up @@ -279,12 +280,13 @@ =head2 URLs
our $xmlrpc_client = new WebworkClient (
url => $XML_URL,
form_action_url => $FORM_ACTION_URL,
displayMode => DISPLAYMODE(),
# displayMode => DISPLAYMODE(),
site_password => $XML_PASSWORD//'',
courseID => $credentials{courseID},
userID => $credentials{userID},
session_key => $credentials{session_key}//'',
sourceFilePath => $fileName,
inputs_ref => {displayMode => DISPLAYMODE(), problemSeed => PROBLEMSEED(),},
);

$xmlrpc_client->encodeSource($source);
Expand All @@ -301,8 +303,10 @@ =head2 URLs
sourceFilePath => $fileName
),
};


$input->{envir}->{inputs_ref} = { displayMode => DISPLAYMODE(),
problemSeed => PROBLEMSEED(),
};

$xmlrpc_client->{sourceFilePath} = $fileName;

############################################
Expand Down
3 changes: 2 additions & 1 deletion clients/input.txt → clients/input.pg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ loadMacros(
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGinfo.pl",
"PGauxiliaryFunctions.pl"
);

Expand All @@ -20,7 +21,7 @@ $d = random(1,11,1);

BEGIN_TEXT
$PAR
displayMode is $displayMode $BR
displayMode is $displayMode problem seed is $problemSeed $BR
$PAR
This problem demonstrates how you enter numerical answers into WeBWorK. $PAR
Evaluate the expression \(3($a )($b -$c -2($d ))\):
Expand Down
29 changes: 29 additions & 0 deletions clients/labels.pg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##DESCRIPTION
## A very simple first problem
##ENDDESCRIPTION
##KEYWORDS('algebra')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGmatrixmacros.pl",
);
Context("Vector");

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;
$a = random(-10,-1,1);
$b = random(1,11,1);
$c = random(1,11,1);
$d = random(1,11,1);
$two = Real("2");
BEGIN_TEXT
$PAR
Enter 1 \{ANS(num_cmp(1)), ans_rule(30)\}$BR
Enter 2 \{ANS($two->cmp), ans_rule(30) \}$BR
Enter \(x^2-1\) \{ANS(Compute("x^2-1")->cmp); ans_rule(30)\}$BR
Enter \(x^2-1\) \{ANS(Compute("x^2-1")->cmp); ans_box(2,30)\}$BR
Enter \(< 4, 6, 7>\)\{ANS(Compute("<4,6,7>")->cmp), ans_rule( 30)\} $BR
END_TEXT
ENDDOCUMENT(); # This should be the last executable line in the problem.
53 changes: 53 additions & 0 deletions clients/matrixtest4.pg
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserMultiAnswer.pl",
"MatrixCheckers.pl",
"PGmatrixmacros.pl",
"PGinfo.pl",
"PGcourse.pl",
);

Context("Matrix");

TEXT(beginproblem());
TEXT($BEGIN_ONE_COLUMN);
$showPartialCorrectAnswers = 1;


BEGIN_TEXT
MathObject matrices
$PAR
\{display_matrix([[1,4,7],[3,1,7]]) \}

END_TEXT

$M = Matrix(" [[4,5,6],[3,2,1]]" );
$M2 = Matrix("[[1,2],[3,4]]");
$M3 = Matrix("[[3,1],[4,1]]");
$input = $inputs_ref->{AnSwEr0001}//'[0]';
$N = Matrix($input);
$N2 = Matrix($inputs_ref->{mymatrix}//'[0]');
Context()->texStrings;
BEGIN_TEXT
Enter a matrix here [[4,5,6],[3,2,1]] \{ANS($M->cmp), ans_box( 4,80) \} $BR
and the entered matrix is
\[$N\]
$BR
Enter a matrix here [[1,2],[3,4]] \{NAMED_ANS_BOX('mymatrix', 4,80) \} $BR
\[$N2\]
$BR
Enter a final matrix [[3,1],[4,1]] here $PAR
\{ANS($M3->cmp),$M3->ans_array(3) \} $PAR
END_TEXT
Context()->normalStrings;


LABELED_ANS('mymatrix', $M2->cmp);


#listVariables();

ENDDOCUMENT();
14 changes: 9 additions & 5 deletions clients/renderProblem.pl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ BEGIN

### set display mode
use constant DISPLAYMODE => 'MathJax';
use constant PROBLEMSEED => '32145';


### select a rendering site
Expand Down Expand Up @@ -279,14 +280,15 @@ =head2 URLs
our $xmlrpc_client = new WebworkClient (
url => $XML_URL,
form_action_url => $FORM_ACTION_URL,
displayMode => DISPLAYMODE(),
# displayMode => DISPLAYMODE(),
site_password => $XML_PASSWORD//'',
courseID => $credentials{courseID},
userID => $credentials{userID},
session_key => $credentials{session_key}//'',
sourceFilePath => $fileName,
inputs_ref => {displayMode => DISPLAYMODE(), problemSeed => PROBLEMSEED(),},
);

$xmlrpc_client->encodeSource($source);

my $input = {
Expand All @@ -301,8 +303,10 @@ =head2 URLs
sourceFilePath => $fileName
),
};


$input->{envir}->{inputs_ref} = { displayMode => DISPLAYMODE(),
problemSeed => PROBLEMSEED(),
};

$xmlrpc_client->{sourceFilePath} = $fileName;

############################################
Expand Down Expand Up @@ -358,7 +362,7 @@ sub pretty_print_rh {
}
return $out." " unless defined($rh);

if ( ref($rh) =~/HASH/ or "$rh" =~/HASH/ ) {
if ( ref($rh) =~/HASH/ ) {
$out .= "{\n";
$indent++;
foreach my $key (sort keys %{$rh}) {
Expand Down
12 changes: 8 additions & 4 deletions clients/renderProblem_rawoutput.pl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ BEGIN

### set display mode
use constant DISPLAYMODE => 'MathJax';
use constant PROBLEMSEED => '32145';


### select a rendering site
Expand Down Expand Up @@ -279,12 +280,13 @@ =head2 URLs
our $xmlrpc_client = new WebworkClient (
url => $XML_URL,
form_action_url => $FORM_ACTION_URL,
displayMode => DISPLAYMODE(),
# displayMode => DISPLAYMODE(),
site_password => $XML_PASSWORD//'',
courseID => $credentials{courseID},
userID => $credentials{userID},
session_key => $credentials{session_key}//'',
sourceFilePath => $fileName,
inputs_ref => {displayMode => DISPLAYMODE(), problemSeed => PROBLEMSEED(),},
);

$xmlrpc_client->encodeSource($source);
Expand All @@ -301,8 +303,10 @@ =head2 URLs
sourceFilePath => $fileName
),
};


$input->{envir}->{inputs_ref} = { displayMode => DISPLAYMODE(),
problemSeed => PROBLEMSEED(),
};

$xmlrpc_client->{sourceFilePath} = $fileName;

############################################
Expand Down Expand Up @@ -359,7 +363,7 @@ sub pretty_print_rh {
}
return $out." " unless defined($rh);

if ( ref($rh) =~/HASH/ or "$rh" =~/HASH/ ) {
if ( ref($rh) =~/HASH/ ) {
$out .= "{\n";
$indent++;
foreach my $key (sort keys %{$rh}) {
Expand Down