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 wwclientsup8 #672

Merged
merged 34 commits into from Mar 2, 2016
Merged

Conversation

mgage
Copy link
Sponsor Member

@mgage mgage commented Jan 1, 2016

Replaces the client "renderProblem.pl" and various derivatives with a single script "sendXMLRPC.pl".

Using switches this script has all the capabilities of the previous collection of clients.

It should also be compared to the script "standalonePGproblemRenderer.pl" in the github.com/mgage/standaloneProblemRenderer repo. That script behaves in exactly the same way but instead of sending the problem via xmlrpc to be rendered remotely it connects directly to a local pg repo and renderers it that way. standaloneProblemRenderer is currently more experimental. It is faster, but it also reveals a memory leak in PG, so having it process 100's of files in a directory will probably cause the process to exceed RAM memory bounds

Command line commands connect the clients to browsers and to editors. Some adjustments may need
to be made at the top of the file to switch the commands from Mac specific commands for BBEdit and Chrome to unix commands for other browsers and editors.

After setting up a credentials file the beginning tests
(the tests for standaloneProblemRenderer are essentially the same.)

sendXMLRPC.pl -bB input.pg --- displays problem in the browser, then answers the questions and displays again

sendXMLRPC.pl -C input.pg -- enters an entry in the log file webwork2/DATA/bad_problems.txt -- indicates whether the problem would accept its own correct answers.

sendXMLRPC.pl -C /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary/Utah
will check all of the files in the Utah section of the OPL.

sendXMLRPC.pl --help will print a copy of the POD documentation describing the switches.
(Check that these two bits of documentation remain in sync and that they give adequate instructions.)

sendXMLRPC.pl -v input.pg ----- gives more verbose output useful for debugging


NAME
webwork2/clients/sendXMLRPC.pl

DESCRIPTION
This module provides functions for rendering html from files outside the
normal context of providing a webwork homework set user an existing
problem set.

It can be used to create a live version of a single problem, one that is
not part of any set, and can facilitate editing these problems outside
of the context of WeBWorK2.

This script will take a list of files or directories and send it to a
WeBWorK daemon webservice to have it rendered. For directories each .pg
file under that directory is rendered.

The results can be displayed in a browser (use -b or -B switches) as was
done with renderProblem.pl, on the command line (Use -h or -H switches)
as was done with renderProblem_rawoutput.pl or summary information about
whether the problem was correctly rendered can be sent to a log file
(use -c or C switches).

The capital letter switches, -B, -H, and -C render the question twice.
The first time returns an answer hash which contains the correct
answers. The question is then resubmitted to the renderer with the
correct answers filled in and displayed.

IMPORTANT: Remember to configure the local output file and display
command near the top of this script. !!!!!!!!

IMPORTANT: Create a valid credentials file.

SYNOPSIS
sendXMLRPC -vcCbB input.pg

DETAILS
credentials file
These locations are searched, in order, for the credentials file.
("$ENV{HOME}/.ww_credentials", "$ENV{HOME}/ww_session_credentials", 'ww_credentials')

    Place a credential file containing the following information at one of the locations above 
    or create a file with this information and specify it with the --credentials option.

        %credentials = (
                        userID                 => "my login name for the webwork course",
                        course_password        => "my password ",
                        courseID               => "the name of the webwork course",
                site_url                   => "url of rendering site
                site_password          => "site password" # preliminary access to site
              form_action_url          =>  'http://localhost:80/webwork2/html2xml'; #action url for form
              WWdisplayMode            =>  'MathJax', # optional 
                                          # --  'MathJax' and 'images' are the possible values           
              HTMLdisplayCommand       =>  "open -a 'Google Chrome' "  # optional
                                                      # for Mac: have Chrome read html output file
                                                      # modify this for other platforms or browsers  
        );

Options
-a
Displays the answer hashes returned by the question on the command line.

-A
            Same as -a but renders the question with the correct answers submitted.

-b
            Display the rendered question in a browser (specified by the DISPLAY_HTML_COMMAND variable).

-B
            Same as -b but renders the question with the correct answers submitted. 
            The evaluation of the answer submitted is displayed as well as the correct
            answer.

-h
            Prints to the command line the entire object returned by 
        the webwork_client xmlrpc request.
        This includes the answer information displayed by -a and -A and much more.

-H
            Same as -h but renders the question with the correct answers submitted

-c
            "check" -- Record success or failure of rendering the question to a log file.

-C
            Same as -c but the question is rendered with the correct answers submitted. 
        This succeeds only if the correct answers, as determined from the answer hash, all succeed.

f=s
            Specify the format used by the browser in displaying the question. 
             Choices for s are
             standard
             sticky
             debug 
             simple

-v
            Verbose output. Used mostly for debugging. 
        In particular it displays explicitly the correct answers 
        which are (will be)  submitted to the question.

-e Open the source file in an editor.

            The single letter options can be "bundled" e.g.  -vcCbB

--list pg_list Read and process a list of .pg files contained in the
file "pg_list". "pg_list" consists of a sequence of lines each of which
contains the full path to a pg file that should be processed. (For
example this might be the output from an earlier run of sendXMLRPC using
the -c flag. )
--pg
            Triggers the printing of the all of the variables available to the PG question. 
        The table appears within the question content. Use in conjunction with -b or -B.

--anshash
            Prints the answer hash for each answer in the PG_debug output which appears below
        the question content. Use in conjunction with -b or -B. 
        Similar to -a or -A but the output appears in the browser and 
        not on the command line.

--ansgrp
            Prints the PGanswergroup for each answer evaluator. The information appears in 
        the PG_debug output which follows the question content.  Use in conjunction with -b or -B.
        This contains more information than printing the answer hash. (perhaps too much).

--credentials=s
            Specifies a file s where the  credential information can be found.

--help
           Prints help information.

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 3, 2016

This set of commits should look a lot shorter once wwclientsup7 is pulled.

This pull should finish the job of making it possible to check all problems in a given directory.

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 3, 2016

At that point you can do more massive checking of the webwork2 part of this change.

The PG part of this change seems more straightforward but it changes some basic structure of PG and it will take a while to make sure that subtle gremlins haven't been created. The automatic tester helps with this.

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 3, 2016

Check the merge at 6f9fc08. Make sure that the choices I made with respect to essay questions in Problem.pm are correct. (I didn't work on those files and it wasn't always clear which was the desired code in the conflict.)

@goehle
Copy link
Member

goehle commented Jan 3, 2016

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage notifications@github.com
wrote:

Check the merge at 6f9fc08
6f9fc08.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
#672 (comment).

@goehle
Copy link
Member

goehle commented Jan 3, 2016

What is going on with that commit. It has an awful lot of jitar changes
that should have been in place a while ago.

On Sun, Jan 3, 2016 at 11:13 AM, goehle@gmail.com goehle@gmail.com wrote:

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage notifications@github.com
wrote:

Check the merge at 6f9fc08
6f9fc08.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
#672 (comment)
.

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 4, 2016

What I was worried about came from the merge. I expect I had built on an earlier version of your
handling of essay questions and in the merge with develop I couldn’t tell for sure which was the
code you intended. I did do basic checks with essays and didn’t run into problems.
But I’m not super familiar with them yet.

On Jan 3, 2016, at 11:13 AM, Geoff Goehle notifications@github.com wrote:

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage notifications@github.com
wrote:

Check the merge at 6f9fc08
6f9fc08.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
#672 (comment).


Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672-23issuecomment-2D168513003&d=BQMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=CtfAFU2Df87egMGE9f6fvm7uOVSdp4qc3GAyD-JMNQ8&s=7BHCpYY2F-ymzWe4VksXpRAThIcvnf0OYoiBuIUCSYM&e=.

@goehle
Copy link
Member

goehle commented Jan 4, 2016

I still dont know what code your talking about. But essay answers havent
changed in a long time so I suspect its OK.

On Sun, Jan 3, 2016 at 8:53 PM, Michael Gage notifications@github.com
wrote:

What I was worried about came from the merge. I expect I had built on an
earlier version of your
handling of essay questions and in the merge with develop I couldn’t tell
for sure which was the
code you intended. I did do basic checks with essays and didn’t run into
problems.
But I’m not super familiar with them yet.

On Jan 3, 2016, at 11:13 AM, Geoff Goehle notifications@github.com
wrote:

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage notifications@github.com
wrote:

Check the merge at 6f9fc08
<
6f9fc08
.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't
always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
<
https://github.com/openwebwork/webwork2/pull/672#issuecomment-168501968>.


Reply to this email directly or view it on GitHub <
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672-23issuecomment-2D168513003&d=BQMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=CtfAFU2Df87egMGE9f6fvm7uOVSdp4qc3GAyD-JMNQ8&s=7BHCpYY2F-ymzWe4VksXpRAThIcvnf0OYoiBuIUCSYM&e=
.


Reply to this email directly or view it on GitHub
#672 (comment).

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 4, 2016

It’s referencing devel from a long time ago at the moment. I was expecting
many of those commit to disappear once wwclients5 is pulled.

On Jan 3, 2016, at 11:15 AM, Geoff Goehle notifications@github.com wrote:

What is going on with that commit. It has an awful lot of jitar changes
that should have been in place a while ago.

On Sun, Jan 3, 2016 at 11:13 AM, goehle@gmail.com goehle@gmail.com wrote:

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage notifications@github.com
wrote:

Check the merge at 6f9fc08
6f9fc08.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
#672 (comment)
.


Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672-23issuecomment-2D168513701&d=BQMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=fbIoRkVgkrbritY-TNmyvrBTMlPnAwGvaeIyHUUWtbM&s=Kkl4bxkg2M93HYBZB0FL3ABiiKz5-OQP1wJ6P_1_0CE&e=.

@goehle
Copy link
Member

goehle commented Jan 4, 2016

I did pull wwclient 5

On Sun, Jan 3, 2016 at 8:55 PM, Michael Gage notifications@github.com
wrote:

It’s referencing devel from a long time ago at the moment. I was expecting
many of those commit to disappear once wwclients5 is pulled.

On Jan 3, 2016, at 11:15 AM, Geoff Goehle notifications@github.com
wrote:

What is going on with that commit. It has an awful lot of jitar changes
that should have been in place a while ago.

On Sun, Jan 3, 2016 at 11:13 AM, goehle@gmail.com goehle@gmail.com
wrote:

I dont see any changes in Problem.pm that impact essay questions. What
lines are you talking about? Did you test the changes?

On Sun, Jan 3, 2016 at 9:40 AM, Michael Gage <notifications@github.com

wrote:

Check the merge at 6f9fc08
<
6f9fc08
.
Make sure that the choices I made with respect to essay questions in
Problem.pm are correct. (I didn't work on those files and it wasn't
always
clear which was the desired code in the conflict.)


Reply to this email directly or view it on GitHub
<
https://github.com/openwebwork/webwork2/pull/672#issuecomment-168501968>
.


Reply to this email directly or view it on GitHub <
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672-23issuecomment-2D168513701&d=BQMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=fbIoRkVgkrbritY-TNmyvrBTMlPnAwGvaeIyHUUWtbM&s=Kkl4bxkg2M93HYBZB0FL3ABiiKz5-OQP1wJ6P_1_0CE&e=
.


Reply to this email directly or view it on GitHub
#672 (comment).

@goehle
Copy link
Member

goehle commented Jan 23, 2016

Here is a list of things from wwclients7 that were pushed forward:

  • Using "Show Auxiliary Resources" creates a knowls link in the warning, but the link opens up way at the bottom of the page below all of the other debugging info.
  • The PGinfo option is a little strange in that it requires you to manually add a macro and prints out the info in a different place than the other options.
  • There are some server specific configuration settings (e.g. the command to open a webpage) that should be moved out of the files in clients.conf to either a config file or ww_credentials. Basically we want to limit the amount of stuff that has to be configured for a specific server but is also managed by git.
  • The utilities (like renderProblem_rawoutput ) that open up less should just print to stdout. Users can then pipe to less if they want.

# Conflicts:
#	lib/WeBWorK/ContentGenerator/instructorXMLHandler.pm
@@ -0,0 +1,4 @@
#!/usr/bin/perl -w
Copy link
Member

Choose a reason for hiding this comment

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

This whole tool is too mac specific. It has hardcoded paths and is centered around BB edit. I would just keep this on your computer as a personal tool, or find some way to make it configurable to work on linux with emacs/vim/nano/whatever.

Copy link
Member

Choose a reason for hiding this comment

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

P.S. A good place for this (and other scripts you find useful) would be http://webwork.maa.org/wiki/Contributed_Admin_Scripts_(Large_Installations)#.VqVM3N9vGEI

I think it would be great if this page could be cleaned up and brought into the light a little bit more. We need a place for tools which sys admins may find useful but which are not polished enough, or are too specific, for git.

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.

What I was envisioning was having a number of tools like this -- one for each OS. The tool is so small it's hardly worth configuring. Which editor do you use? Could you write a matching tool for that? It's convenient to write in your favorite editor and then just hit a button to see what you have rendered so far.

It could go in admin scripts (it has the same flavor in that it almost demands being customized to the users environment) but it's really more of an author tool -- as are the various flavors of clients. Maybe when we polish up the admin page we can add one for author tools.

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.

I'd really like to see some versions of this file for emacs, or vim or nano or sublime, etc. Then authors will have some models to start with to build connecting links that suit their own work flow.

Copy link
Member

Choose a reason for hiding this comment

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

I think having multiple versions is the wrong way to go. IMO it should be a single tool configurable by things like environment variables, config files, etc... For example most linux distributions have an EDITOR environment variable that people will set (https://en.wikibooks.org/wiki/Guide_to_Unix/Environment_Variables). If you used that you could probably get rid of the BB edit specific stuff.

More generally, I'm not a fan of having files that you need to configure to use be managed by git. It really interferes with the git workflow since those files are tracked and your changes will have a tendency to revert, get overwritten, or cause conflicts.

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.

It wouldn't work for BBedit -- this file is an extension of BBedit and needs to be moved to a specific directory in order to work. It's like writing a small extension for emacs.

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.

By the way — its ok if the bbedit connection file is stored somewhere else as long as it is highly visible to people who want to use it as a model to
write their own connecting tool.

On Jan 24, 2016, at 7:42 PM, Geoff Goehle notifications@github.com wrote:

In clients/sendxmlrpc_bbedit.pl https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672-23discussion-5Fr50646605&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=ks-sV4IwC-I5SHSObvclCpZW-Xt8uu3XYG1iJsbHRcM&s=ftySQNCO85ZZ5w2V0Js9_iB_zBj0UIF-frmKy-GfIqc&e=:

@@ -0,0 +1,4 @@
+#!/usr/bin/perl -w
I think having multiple versions is the wrong way to go. IMO it should be a single tool configurable by things like environment variables, config files, etc... For example most linux distributions have an EDITOR environment variable that people will set (https://en.wikibooks.org/wiki/Guide_to_Unix/Environment_Variables https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikibooks.org_wiki_Guide-5Fto-5FUnix_Environment-5FVariables&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=ks-sV4IwC-I5SHSObvclCpZW-Xt8uu3XYG1iJsbHRcM&s=GswFzmTp4Rj1NWw078NB7RgtxFrE5P2Px_ZHc-kGMFs&e=). If you used that you could probably get rid of the BB edit specific stuff.

More generally, I'm not a fan of having files that you need to configure to use be managed by git. It really interferes with the git workflow since those files are tracked and your changes will have a tendency to revert, get overwritten, or cause conflicts.


Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_webwork2_pull_672_files-23r50646605&d=BQMCaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=ks-sV4IwC-I5SHSObvclCpZW-Xt8uu3XYG1iJsbHRcM&s=kM4ZPkOKTuytsixKoRHS6ugL733oXczk_02vF_UAWWI&e=.

@goehle
Copy link
Member

goehle commented Jan 24, 2016

Is it possible there were merge issues when you fixed conflicts with develop? There are only 4 changed files, two basically trivial ones and two new additions. The newly added files are FormatRenderedProblem.pm and system2.template, however I can't find any references to either of these two files being used in develop or this branch.

@mgage
Copy link
Sponsor Member Author

mgage commented Jan 26, 2016

I've removed system2.templates --- it was an earlier version of simple.templates. I've also changed the templateName() method in Problem.pm, ProblemSet.pm and ProblemSets.pm so that those pages can access other templates. (I also removed a restriction that the template had to be named system, simple or gateway as being overly cautious). There are files in webwork2/t for testing these templates:
simpleTemplateTest.html.dist and alternate_templates.html.dist. I've added the .dist extension since they will probably require some modification to test a local webwork site. At the moment they are pointed at hosted2 which is running wwclients8.

@goehle
Copy link
Member

goehle commented Feb 2, 2016

Should the the 2 test .pg problems be in pg/t and not webwork2/t ?

@goehle
Copy link
Member

goehle commented Feb 2, 2016

I'll make a list of things below to check up on:

  • The "Show:" text on a Problem page shows up even if there aren't any options to show. Try viewing a problem as a student while the set is still open.
  • Move test .pg files to the pg repo? In any case the test problems in commandline_test_problems as well as the test problems in clients should all be consolidated, I think.
  • In TestWW.html if I use .dist version I get
    Error in alias: PGalias.pm: unrecognizable displayMode = at [PG]/lib/PGalias.pm line 276
    as an error when trying to render the first problem. Adding displayMode=MathJax makes the error go away. I think this means that the "default" display mode is not getting set properly. It could be a "defined or" being used where a regular or should be used.
  • In alternate_templates.html you have some templates being set as templateName=plain and I think it should be templateName=simple. In addition the last to iframes point to the same place. Do you mean for there to be a /Demo in the very last url?
  • The HTML_DISPLAY_COMMAND stuff should probably all be moved out of sendXMLRPC to either the credentials file or to environment variables. Right now changing that variable away from its MacOS default value will get reset every time I change branches. In addition it would maybe be better if the -h command just printed to STDOUT and not less. If people want to view it with less then an use a pipe. But with the additional flexibility they can pipe it to any tool.
  • Bad problems is a misleading name for the log file now that it records so much more information. Maybe sendXMLRPC.log or something similar? This is another situation where it would be better if the name of this file could be overridden by credentials or an environment variable.

You were going to look at redoing a couple things with the detail problem debugging info. The two that I remember are

  • Fix the resource object knowls (probably by adding <p>'s) so that when you open a resource knowls it doesn't open at the very bottom of the warn area.
  • Maybe change how PGInfo works so you don't have to add the macro file to your problems to use the PGInfo checkbox.

@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

alternate_templates.html has been cleaned up and points to hosted2. Check that two templates work acceptably when viewing a problem (Problem.pm), a homework set homepage (ProblemSet.pm) or a course homepage (ProblemSets.pm). The links on the homework set homepage and course homepage revert back to the "system" template for now. The "simple" template is not sticky in those cases. It should be sticky for a single problem.

simpleTemplateTest.html.dist also points to hosted2 -- compares appearance of the WebworkClient "simple" template (used for xmlrpc) with the simple template used through ContentGenerator (the webwork2 route)

If displayMode, courseID, userID, or problemSeed is missing then the problem is not rendered and the server returns an error message for the request. Check that this works properly on hosted2 (when it is running the most recent develop). Check that it is not possible to use this error message for XSS.

…s to be shown. (The introduction of knows changes when the showHint and showSolution checkbox are displayed. Even if knowls is disabled the checkboxes already display "show hints" and "show solutions" as labels. )
@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

Fixed display of Show.

Test by viewing a problem containing a hint as a student. If you have patience disable showing knowls for hints and for solutions and test again.

Also view the same problem after the due date when both show solutions and show correct answer check boxes are available to make sure that the presentation is acceptable.

@goehle
Copy link
Member

goehle commented Feb 21, 2016

Great, I'll try to check this stuff out later today. Two things.

  1. Could you merge my pull to this pull? I fixed a bunch of sticky format stuff that was badly broken.
  2. After having experimented with adding lti stuff to xmlrpc I was wondering if some of the options could be defaulted. The reason I'm asking for this stuff is that passing parameters through LTI can be a bit of a pain so reducing the number required has some good payoff. Outside of the simple defaults this could also be put off to another pull, though.
  • displayMode could pretty easily default to MathJax if there isn't one specified.
  • courseID could default to a specific course specified in the servers .conf file if it exists or give an error message if it doesn't exist.
  • If userID and course_password are required parameters then you can't use LTI based authentication. This may or may not matter to you in terms of fixing for this pull.
  • If problemSeed is missing then it could default to a static seed. You could also have a flag to generate a random seed. In particular with LTI stuff there isn't really a way to generate a random number when creating the LTI link so you either give all students the same seed or have a way to ask WeBWorK to pick a random one. (More generally with the LTI stuff it might be worth it put seeds and lti_source_did's in the key database so you can randomly generate a seed and then re-use it if the same user accesses the problem.)

@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

which branch do you want pulled? ltigrade? That hasn't yet been pull requested to openwebwork, but I can pull directly from your github.

There is a trade-off between error messages when important information hasn't been provided and supplying defaults (which in some cases can become confusing if the guessed defaults are not appropriate).

Needing the defaults for LTI requests seems like a good reason to provide them. I'll make those changes in the next pull request wwclientsup9 so there is a clear record of which changes were made to accommodate LTI.

@goehle
Copy link
Member

goehle commented Feb 21, 2016

I made a pull request directly to your github account.
mgage#16

On Sun, Feb 21, 2016 at 9:58 AM, Michael Gage notifications@github.com
wrote:

which branch do you want pulled? ltigrade? That hasn't yet been pull
requested to openwebwork, but I can pull directly from your github.

There is a trade-off between error messages when important information
hasn't been provided and supplying defaults (which in some cases can become
confusing if the guessed defaults are not appropriate).

Needing the defaults for LTI requests seems like a good reason to provide
them. I'll make those changes in the next pull request wwclientsup9 so
there is a clear record of which changes were made to accommodate LTI.


Reply to this email directly or view it on GitHub
#672 (comment).

…configurations can be made in that file and that the lack of a configuration is either reported or replaced with a sensible default. (The webwork displayMode defaults to "MathJax" for example.)

The hash output modes print directly to STDOUT -- one can pipe this through less if desired, or use the output in otherwise. The output continues to be pretty printed.

It is possible to set the log file path using --log=path_to_log_file.  The path defaults to ...../webwork2/DATA/xmlrpc_results.log
@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

Move more configuration to the ww_credentials.dist file. Allow log file path to be specified using --log.

Test by changing the various configurations in ww_creditentials (or your private copy of same). Make sure that the configurations take effect and that if they are omitted either an appropriate warning or an appropriate default is chosen.

Check that the --log=path_to_log_file switch works correctly. (The full path is required.)

Check that the directions in --help and the directions given in the POD documentation agree.

@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

Merged myclients8 from goehle.

Tests: ??

@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

Remaining items:

  • Move test .pg files to the pg repo? In any case the test problems in commandline_test_problems as well as the test problems in clients should all be consolidated, I think.
  • Fix the resource object knowls (probably by adding <p>'s) so that when you open a resource knowls it doesn't open at the very bottom of the warn area.
  • Maybe change how PGInfo works so you don't have to add the macro file to your problems to use the PGInfo checkbox.

@mgage
Copy link
Sponsor Member Author

mgage commented Feb 21, 2016

PGinfo now prints without using the macro file PGinfo.pl.
I don't know if I understand the comment about fixing the resource object knowls. I've added a little space at the bottom of the hash when the knowl expands.

Both of these fixes involve changes only to pg files -- they appear in the pull request develop_showinfo

@goehle
Copy link
Member

goehle commented Mar 2, 2016

I tested the following and everything checked out, so I will merge the result.

  • Tested new sendXMLRPC options.
  • Tested new ww_credentials configurations.
  • I tested that the PGinfo and Resource options work and that the "Show:" test is displayed properly.
  • I tested that the templateName parameter works
  • I tested the various .html files in t and the test pg problems as well.

goehle added a commit that referenced this pull request Mar 2, 2016
@goehle goehle merged commit d660171 into openwebwork:develop Mar 2, 2016
@goehle goehle mentioned this pull request Apr 20, 2016
41 tasks
@mgage mgage deleted the develop_wwclientsup8 branch June 7, 2016 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants