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
Develop wwclientsup7 #657
Conversation
CourseEnvironment::new is often called without a specific courseName and this causes spurious errors when database.con is read. database.conf requires courseName to be defined, although it is not used unless course specific database calls are made. Fake courseName is "foobar_course"
Still don't have the right javaScript for replacing the ToolTips
There were some things, notably the tool tips, which Problem::attemptsResult did but attemptsTable did not.
The {text} output from the renderProblem command and from other commands must be handled differently. For the renderProbelm command this is printed directly (to the screen). For all the other commands the {text} output (which is not usually empty) is included in a JSON hash which is then returned as output. I added an explicit flag that alerts the content() subroutine as to whether it is handling a renderProblem command or one of the other commands.
…_ref}->{problemSeed} $envir->{inputs_ref}->{problemSeed} $envir->{inputs_ref}->{displayMode}
…_ref}->{problemSeed} $envir->{inputs_ref}->{problemSeed} $envir->{inputs_ref}->{displayMode} and other cleanup including changing encodedSource to encoded_source
…_ref}->{problemSeed} $envir->{inputs_ref}->{problemSeed} $envir->{inputs_ref}->{displayMode}
…sup7-debug Conflicts: lib/WeBWorK/ContentGenerator/Problem.pm lib/WebworkClient.pm t/testAttemptsTable.pl
I think this might be corrections for some bad choices of what to keep during an earlier merge.
…and checkProblem.pl
sendXMLRPC.pl only renders .pg files. (it skips .gif files, files with Header in the name, files with -text in the name
…endXMLRPC.pl instead of renderProblem.pl But sendXMLRPC.pl can traverse directory trees itself. check2_problems_in_dir.sh is probably not needed although it does time the tree traversal.
…), other improvements. Improvements to figuring out the correct answer. The options allow additional debugging data to be printed.
Starting at the top the first commits finish the process of separating the presentation of attemptsTables into a separate module. You can use the file webwork2/t/testattemptsTables.pl ot check that it works -- but you still need to make sure it is hooked up right. (We finished most of this in debugging wwclients5) There is good (ok pretty good) POD documentation for attemptsTable. There is a struggle to determine where one should look for displayMode and for problemSeed (also some other problem variables but these two are the worst). Is it envir->{displayMode}, envir->{inputs_ref}->{displayMode} or just $displayMode? Each way of accessing the render (renderViaXMLRPC, instructorXMLRPC, the html files, renderProblem. had a different way of addressing this. Often they defined the value in several variable but then they were not always in sync. After some this takes us up to about commit 9e84b8d The main thing to test is that none of these changes affect the way that problems are evaluated. There will be good testing mechanisms for this in a bit. I think we already accomplished this part. |
@@ -1704,7 +1704,7 @@ sub importSetsFromDef { | |||
|
|||
debug("$set_definition_file: reading set definition file"); | |||
# read data in set definition file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the changes to this file are the result of a bad merge. This removes the work done to make reduced credit dates imported and exported by to set def files (and other various bugs). As far as I can tell they should all be reverted to develop in your pull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't work much, if at all on this file, so merging it back to the develop version shouldn't be too hard. I can do it by hand using the bbedit merge tool -- is there a slicker way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably a result of merge at af84d97 -- it did not go easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are certain that none of these changes were intended you can just open the develop version in a text editor, switch to this branch, and then save it again. But you should double check that nothing here was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I can do it essentially that way but a bit more safely.
Take care,
Mike
On Jan 2, 2016, at 9:00 PM, Geoff Goehle notifications@github.com wrote:
In lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_657-23discussion-5Fr48689396&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=YQx3VYTdqGXCWEMeGOCfFWpNGhh2txXlRuyhdjDNNH0&s=xUke83O2PGK6I6UduPJl0GcMdSdR0bSm8n5cep-TqaM&e=:
@@ -1704,7 +1704,7 @@ sub importSetsFromDef {
debug("$set_definition_file: reading set definition file"); # read data in set definition file
If you are certain that none of these changes were intended you can just open the develop version in a text editor, switch to this branch, and then save it again. But you should double check that nothing here was intentional.
—
Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_657_files-23r48689396&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=YQx3VYTdqGXCWEMeGOCfFWpNGhh2txXlRuyhdjDNNH0&s=OQcdnhawPoZV3bXKQ00R8OX68PK4-kldLE-gbaIAPz0&e=.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file ProblemSetList2.pm has been reverted to the develop version
Next we start building sendXMLRPC. Originally I was just going to enhance renderProblem.pl which takes a file, renders it and returns the output either through less or as HTML through a browser. I eventually figured out that what I was doing for this and for the embedded html iframes and for opaque moodle clients had a lot of overlap. So what has evolved at this point is sendXMLRPC which has problems rendered at a (possibly remote) server and standalonePGrenderer (separate project) which is very similar to sendXMLRPC but ties into PG directly to do it's rendering. standalonePGrenderer works but is not finished so you can ignore it for now if you wish -- but explains some of the design choices for sendXMLRPC. The pod docs for this seem to have been added in wwclient8 -- but they are essentially the same as the readme for standalonePGproblemrenderer https://github.com/mgage/standaloneProblemRenderer |
Next -- there are some additions of some switches that appear on a problem page if you have admin privileges (==20). These allow you to see debugging info for the problem easily -- e.g. answerHash table, the resourceTable constructed by alias, and so forth. These won't doing anything yet until you update PG --that's where the real work is going on. I've pulled the format templates for webwork-in-iframes, sendXMLRPC et. al. into a separate directory WebworkClient/ which makes it easier to add new formats. By the way you need to construction the "credentials" file to use sendXMLRPC it usually has password information so you don't want it in the main source code except for demo sites which you are willing to allow to be spammed. |
|
||
=cut | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't suppose we can just use the PG pretty print? Its not a huge deal either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe, but I’d like to wait on that. My long range hope is that we can get a version of this
that uses only pg and as few other files as possible and can package for CPAN
as an editor for writing PG problems. I’ve spent some time disentangling things
that were included just because they were there and it was easy to grab it from another file.
Often that’s a good thing, but it can also cause problems.
By the way I haven’t yet quite figured out how to refactor this writeRenderLogEntry
function — but it seemed like something that could wait.
On Jan 2, 2016, at 9:14 PM, Geoff Goehle notifications@github.com wrote:
sub writeRenderLogEntry($$$) {
my ($function, $details, $beginEnd) = @_;
$beginEnd = ($beginEnd eq "begin") ? ">" : ($beginEnd eq "end") ? "<" : "-";
WeBWorK::Utils::writeLog($seed_ce, "render_timing", "$ $ ".time." $beginEnd $function [$details]");
}+=item pretty_print_self
+
+=cut
+
+
I don't suppose we can just use the PG pretty print? Its not a huge deal either way.—
Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_657_files-23r48689462&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=1wFplF0Tw2a0ZNsN9kntdYLpomI6h3XCDvuTTQcWoTw&s=dsjUb5mpt34AK5omTEwKdduBwtOk7Hhi-ZvSLbARmcw&e=.
…yed. Turn debug off in the Webwork::Constants file.
|
The problems with the Answer Hash are because the pretty_print is being called outside of the safe compartment -- we'll need to stringify everything and test it. This will probably show up in PGinfo also when we move it to be printed like the others. This needs to be fixed but I'd rather it didn't hold up everything else. The basic delivery of the information is there and we just need to adjust the interaction with mathobjects. I'll have to think about it a bit -- we could just stringify everything in PGcore when it is exported but that might affect the answer processing so we want to look carefully to find the time when it is safe to stiringigy PGcore and its contents. |
".", | ||
"$courseURLs{html}", | ||
"$webworkURLs{htdocs}", | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 1065 and 1070 say # paths to search for applets
. I wouldn't make a fuss but its in defaults.config so it might actually get read by someone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. this is fixed. These are now default paths to search for html files, image files and pdf files
New list of things to do:
|
The lines in the output_hidden_info routine concerning templates should remain. They are used by the WW embedded in HTML calls.
I've reverted the parts of Problem.pm that needed it. |
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
… now probably unnecessary.
Changed references in sendXMLRPC Removed overrides for command HTML and HASH open commands. They were commented out because they weren't yet operational and I'm not sure whether they should be in the credentials file in any case.
make sure options are set.
…nputs" } check to make sure that $rh_inputs->string can be found if $rh_inputs is a MathObject.
Pull this after develop_wwclients5.
You will need develop_clients7 to test the new features in the pg
develop_translator_upd PR. Those features include various debugging checkboxes available to administrators.