-
-
Notifications
You must be signed in to change notification settings - Fork 166
Ww216 patches admincourse #1423
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
Conversation
-e 's/database_password ='passwordRW'/database_password =$ENV{"WEBWORK_DB_PASSWORD"}/' \
because 'passwordRW' is what occurs in site.conf.dist (as it should).
literally specifying passwords in the configuration files allowing interpolation
wrecks havoc if the password has special characters such as @ and %
also changed README from 2.15 to 2.16
…assword) also added matching on for consistency with other matches
…inal file had no $ on this line) -- this still doesn't work for me for changing passwordRW and I can't see why.
…r more specific matches. To test this do rm conf/site.conf, then do docker-compose up and see if site.conf gets set up properly reading variables from ENV. Try running the admin course, but I think you will run into problems because the admin course tables haven't been upgraded. YMMV.
…: admin with password: admin to the course admin
|
I have never needed to do anything to have the My guess is that you may have manually needed to fix the DB if the DB connection was not working when the course was created. |
|
I'll try it again to double check and report back before this is checked in. I don't think it was because of a bad connection to the database. |
|
@taniwallach I think you are right, if the addcourse admin script runs completely the admin user and its credentials are also installed. |
taniwallach
left a comment
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.
As noted, I think the extra lines to make a second attempt to fix the admin course tables and to add the admin user are not needed.
| -e 's/database_username ="webworkWrite"/database_username =$ENV{"WEBWORK_DB_USER"}/' \ | ||
| -e 's/database_password ="passwordRW"/database_password =$ENV{"WEBWORK_DB_PASSWORD"}/' \ | ||
| -e 's/^\$database_username ="webworkWrite"/$database_username =$ENV{"WEBWORK_DB_USER"}/' \ | ||
| -e 's/^\$database_password ='\''passwordRW'\''/$database_password =$ENV{"WEBWORK_DB_PASSWORD"}/' \ |
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 line is a mission critical correction, as the line in site.conf.dist was changed to use single quotes.
The change on these 2 lines to match from the start of the line so it should only modify the active definition lines and not other lines is also good.
| $WEBWORK_ROOT/bin/addcourse admin --db-layout=sql_single --users=$WEBWORK_ROOT/courses.dist/adminClasslist.lst --professors=admin | ||
| chown www-data:www-data -R $APP_ROOT/courses | ||
| echo "Admin course is created." | ||
| $WEBWORK_ROOT/bin/upgrade_admin_db.pl |
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 have yet to be able to trigger a case where these extra lines are needed.
If I delete the course directory, but left the database tables alone - the course seems to work after being recreated by the prior call to bin/addcourse.
My impression is that these lines can be deleted (or commented out, if @mgage want's to retain them in case some special circumstances do make them necessary).
|
this has been addressed in patch5 |
if admin course is added then its tables are also updated and user: admin with password: admin are added to the admin course.