WeBWorK Main Forum

how can I rename a homework set?

how can I rename a homework set?

by Peter Selinger -
Number of replies: 4
Sorry, newbie question: how can I rename a homework set? I created 10 sets at the beginning of the course, called a1, a2, etc. Now I have split a4 into two sets, and I would like to rename all the following ones. Thanks, -- Peter
In reply to Peter Selinger

Re: how can I rename a homework set?

by Alex Jordan -
Hi Peter,

It depends. If students have not already worked on the problems in the sets you wish to rename, then you could export the problem sets into .def files, then delete the problem sets, then change the names of the .def files, and then import the name-altered problem sets.

Maybe you have considered this, but you could also just do this with a4, and have a4a and a4b.

If students have already worked on problems in these problem sets that you wish to rename, then unless I'm mistaken, it unfortunately can't be done without directly going into the database.

In reply to Alex Jordan

Re: how can I rename a homework set?

by Michael Gage -
HI,

Alex is right.  If there is already student data in a homework set it basically can't be changed while preserving the student data without working directly with the database. That's not impossible but it's probably not worth the effort.

It was a design flaw in the original database design to use the name of the set as the primary key -- so that is not easily changed.  

You can copy homework sets easily (but not the student data).  When you create a new set in the homeworkset editor you are given the opportunity to base it on some other set and then edit it further.  That is often a bit faster than exporting the set to a set definition file.
In reply to Alex Jordan

Re: how can I rename a homework set?

by Peter Selinger -
Hi Alex and Michael,

thanks for your answers. I have 7 sets to rename (a4a, a5, ..., a10) that the students have not yet worked on, so I think with .def files it is too awkward, but the "copy a set" option (which I had looked for but did not find) might be a quick way to work around it.

As for the design flaw: there is nothing wrong with using a fixed string as the primary key - but it doesn't have to be the "name" of the homework set that is shown to students. In the same way that the header is configurable, it would be nice if the display name were also configurable - then it could even have spaces in it, for example "Homework 1" would be a natural display name, even if the set is internally called a1. Perhaps that would be easier to implement than fixing the original design flaw. All of the pull-down menus could also display that name, rather than the internal ones (but still use the internal one as an HTML key of course). Just a thought.

Thanks! -- Peter

In reply to Peter Selinger

Re: how can I rename a homework set?

by Michael Gage -
Hi Peter,

Those are good suggestions and more or less in line with what we would like to do.  First we need someone with the time and skills to do it. (There is also the question about whether we should do piecemeal upgrades or do a complete redesign.  Given the realities of our user base I currently think the piecemeal approach will get more done. ) 

You may have noticed that something similar has been done with problems which now have information not directly related to their position in the problem set.