Forum archive 2000-2006

Gavin LaRose - restrictions (or not) on course names

Gavin LaRose - restrictions (or not) on course names

by Arnold Pizer -
Number of replies: 0
inactiveTopicrestrictions (or not) on course names topic started 9/8/2005; 4:18:23 PM
last post 9/8/2005; 5:07:30 PM
userGavin LaRose - restrictions (or not) on course names  blueArrow
9/8/2005; 4:18:23 PM (reads: 403, responses: 2)
Hi all,

When creating a new WeBWorK 2 course, it says "Specify an ID, title, and institution for the new course. The course ID may contain only letters, numbers, hyphens, and underscores." Accordingly, I created a course with the name "ma115-027". Now, it so happens that I need to change some problem definitions, and it occurred to me that this might be easiest to do by going into mysql and changing values in the problem table for the course.

However, in mysql it appears that the hyphen is problematic:

  mysql> describe ma115-027_problem;
ERROR 1064: You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right syntax
to use near '-027_problem' at line 1
Should hyphens be excluded from course names?

It doesn't appear to be a problem for WeBWorK, but is causing me trouble when working manually with the table (obviously). I'm thinking that if I want to change the course name at this point I'll have to dump the databases to text files, edit those, and reload them.

Any suggestions, comments or tips?

Thanks,
Gavin

<| Post or View Comments |>


userMichael Gage - Re: restrictions (or not) on course names  blueArrow
9/8/2005; 4:55:58 PM (reads: 480, responses: 0)
Should hyphens be excluded from course names?

Use quotes for the file names. You'll need to look at http://dev.mysql.com/doc/mysql/en/index.html for details(the docs are quite good) but I think that backquotes around the file name will work.

It doesn't appear to be a problem for WeBWorK, but is causing me trouble trouble when working manually with the table. I'm thinking that if I want to change the course name at this point I'll have to dump the databases to text files, edit those, and reload them.

It WAS causing trouble for WeBWorK until we started quoting everything properly. There are three kinds of quotes, single, double and back. At the moment I'm not sure of the specific role of each of them in mysql.

-- Mike

<| Post or View Comments |>


userGavin LaRose - Re: restrictions (or not) on course names  blueArrow
9/8/2005; 5:07:30 PM (reads: 503, responses: 0)
Hi Mike,

Outstanding. Thanks. I think I tried every quote except backquotes.

Gavin

<| Post or View Comments |>