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 wwsh #562

Merged
merged 3 commits into from
Apr 17, 2015
Merged

Develop wwsh #562

merged 3 commits into from
Apr 17, 2015

Conversation

mgage
Copy link
Sponsor Member

@mgage mgage commented Mar 14, 2015

Modify wwsh so that it takes courseID and the path to a script file.

It no longer uses perl -d to give an interactive shell. This stopped working (at least for me) around perl 5.16.

To test. Try to add an administrator from the command line to an existing course
wwsh maa101 addadmin

Then update the password

wwsh maa101 putadmin

Remember to remove the admin user from the maa101 course since the password is generic. This is a major use case for wwsh. To add an emergency administrator when you have been locked out of a course.

@goehle
Copy link
Member

goehle commented Apr 3, 2015

I've tested this a bit.

  • If you try to run wwsh with no courseID or script file you do get a usage message, but you also get a couple of "uninitialized value" warnings. It would be nice if it was just the usage message.
  • The interactive shell functionality was really powerful. Is it worth it to try and get it back? (I like having script support in either case because it makes simple tasks easier.) I've messed with it a bunch and it seems like something has changed with Safe which is causing the trouble. When the configuration files are "revaled" they can't see the "include" subroutine which should have been revaled in the compartment earlier. There is something squirrely going on deep down.

@mgage
Copy link
Sponsor Member Author

mgage commented Apr 3, 2015

I'll fix the uninitialized value warnings. I played briefly with trying to get the interactive shell back but wasn't able to figure out what was wrong either. There was an earlier version of wwsh which did not use the perl debug mode -- that is another possibility if we can't figure out how to make the debug mode work. My main goal for the moment is to able to run scripts -- such as the ones that allow you to insert yourself in a course from the command line.

@goehle
Copy link
Member

goehle commented Apr 3, 2015

Using a non perl -d solution could be good. Something like
http://search.cpan.org/~ether/Devel-REPL-1.003026/lib/Devel/REPL.pm

On Fri, Apr 3, 2015 at 1:21 PM, Michael Gage notifications@github.com
wrote:

I'll fix the uninitialized value warnings. I played briefly with trying to
get the interactive shell back but wasn't able to figure out what was wrong
either. There was an earlier version of wwsh which did not use the perl
debug mode -- that is another possibility if we can't figure out how to
make the debug mode work. My main goal for the moment is to able to run
scripts -- such as the ones that allow you to insert yourself in a course
from the command line.


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

…to avoid error messages.

This version of wwsh is no longer interactive. It simply accepts one scriptFile and executes it.  This is still useful for things like adding an instructor from the command line.
goehle added a commit that referenced this pull request Apr 17, 2015
Develop wwsh

Its still a good idea to get the interactive version back, but this will fill in.
@goehle goehle merged commit b72eaae into openwebwork:develop Apr 17, 2015
@mgage mgage deleted the develop_wwsh branch April 18, 2015 01:35
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