Naming conventions

From WeBWorK_wiki
Jump to navigation Jump to search


Extended and unified naming conventions

Rules set for Release_notes_for_WeBWorK_2.4.9


  • Set names can contain alphanumeric characters, hyphens(-), underbars(_), periods(.), and commas(.), colons (:), and slashes(/).
  • User names can contain alphanumeric characters, hyphens(-), underbars(_), periods(.), and at signs(@). This allows the use of most email addresses as login user_id's. For safety the at sign, comma and period are converted to underbars when labeling on-the-fly graphs.
  • Problem_id's can contain only numbers.
  • IP's (used in proctored gateway quizzes) can contain alphanumeric characters, hyphens(-), underbars(_), periods(.), commas(.), colons (:), and slashes(/).
  • FileManager will allow commas in directory names.
  • Periods in set names are automatically converted to _ when printing hardcopy to avoid incompatibility with TeX. Still it is probably wise to limit set names characters to letters, numbers and underbars to avoid conflicts with auxiliary tools such as TeX, and mySQL.
  • Image names can contain underbars and still act peacefully with TeX (at least most of the time :-) ).
Technical note:
In conjunction with this unified naming convention a centralized macro in DB.pm, check_user_id, is called to make sure that
user names conform to the standards above.  This is also done when uploading classlists.  It is
expected that this will eliminate a previous bug which allowed student ID's with non-English characters
to corrupt the database resulting in non-deletable users with "diamond" characters in their user names.