Installation

admin: incomplete Rename Course

admin: incomplete Rename Course

by Dick Lane -
Number of replies: 6
A colleague organized a course this Spring for one section.  For this Fall, she wants to reuse that course to handle all sections of the course.  After I logged into the admin course, I archived the Spring version and renamed the course:
    from    123-Hypatia
    to        123-Precalculus
During a subsequent login (as admin) to 123-Precalculus, I deleted all students from the classlist and told my colleague the renamed course was ready to go --- OOPS, Not Quite!

Although  123-Precalculus  now appears (and "123-Hypatia" does not) on the course list displayed at URL
        server.MySchool.edu/webwork2/
a subsequent login shows  "123-Hypatia"  on the assignment list page at URL
        server.MySchool.edu/webwork2/123-Precalculus/

It appears RenameCourse changed only one of
        Course ID
        Course Title
Can the course's  course.conf  file be edited to fix this?  (In any event, course.conf does need a revision of professor email and username.)
Can the  wwsh  script be used to fix this?
Or will I need to do a more direct change to a database?
If one or the other, detailed instructions will be welcome.

Alternatively, since instruction does not start until next Monday, I could just create a new course (after renaming Spring again) and copy Spring's templates folder into the Fall templates folder.
In reply to Dick Lane

Re: admin: incomplete Rename Course

by Danny Glin -
I had this same issue.  It appears that the Rename Course tool doesn't change the Course Title.

My fix was to change it directly in the database, though I didn't really look to see if there was a more graceful way to do it.  It can be found in the [coursename]_setting table.

I guess this should probably be reported as a bug...

Danny
In reply to Dick Lane

Re: admin: incomplete Rename Course

by John Travis -
Sorry to be obtuse here but why not just create a brand new course with proper naming, etc but use the old course as a template when doing so rather than using the model course? This option should be available to use any of your existing courses as models in the drop down at the bottom of the create a course page. What am I missing?
In reply to John Travis

Re: admin: incomplete Rename Course

by Dick Lane -
Thanks, JT, for your response.

0)  The modelCourse on my system has a few non-standard things in it, e.g., templates/macros/PGcourse.pl to enable GetNewVersion button.  Unfortunately, AddCourse does not copy that PGcourse.pl file into a newly created course.  Since I knew the Spring course used some revised problem files in templates/local/Library/..., I preferred to avoid a shell-login in order to copy them manually.

1)  Prompted by your post, I decided to check whether AddCourse might have improved --- mixed results.
  a)  the partial-copy behavior for modelCourse persists,
  b)  it appears designating a working (!!) course as model will cause contents of macros/, local/, etc. to be copied --- GOOD.

2)  I will do some more checking of the UseExistingAsModel procedure (and report by Thursday).  If it truly is complete, then I will not need dive into unfamiliar territory with database commands.
In reply to Dick Lane

Re: admin: incomplete Rename Course

by Dick Lane -
3)  While UseExistingAsModel copies files, it does not replicate the course assignments.  Since the Spring course had 51 assignments, that is NOT Good.

Current status:  I request detailed advice about database command(s) to change CourseTitle for the renamed course.

Note: my colleague does create her assignments by manually writing, and revising, set-definition files (including comments).  For a course with assignments created directly from LibraryBrowser, those assignments would need to be exported to set-def files before Rename.  However, importing those assignments into Fall course adds additional steps prior to the necessary change of Spring dates to Fall dates.

PS: bug 3403 has a discussion about possible changes to RenameCourse --- see http://bugs.webwork.maa.org/show_bug.cgi?id=3403
In reply to Dick Lane

Re: admin: incomplete Rename Course

by Michael Gage -
Exporting and then importing the set definition files before copying is not that big a deal since the set definition files can be exported and imported in batches.   It also provides a measure of backup and might possibly save some steps in terms of reassigning the dates for each assignment. 

The rename facility on the admin page simply copies the database with all of the assignments that have been loaded into the database.  It does not change any dates. It is very useful for those cases where you want to rename the course while keeping all of the homework, all of the students and all of their partially completed homework results untouched.  It's a bit overkill for creating a new course since you then have to manually delete the students and their work.




In reply to Dick Lane

Re: admin: incomplete Rename Course

by Danny Glin -
Here are instructions for changing the name in the database (with the usual warnings that making changes to the database can have catastrophic results if not done carefully.  I recommend looking up mysqldump for backing up databases before trying any direct database manipulation).

Log in to mysql:
> mysql -u root -p
(assuming you know the root mysql password.  If not, you can use the webworkWrite user configured in site.conf).

Change to the webwork database:
> use webwork;

Look up the current course title:
> select * from [coursename]_setting;
You should see three values, one of which is courseTitle.

Change the course title to something new:
> update [coursename]_setting set value='New Course Title' where name='courseTitle';

Check to see if the change was made:
> select * from [coursename]_setting;

It looks like this will be fixed in an upcoming version of WeBWorK, so you should only need this for the near future.

Danny