IMathAS
IMathAS copied to clipboard
Author Last,First displayed without comma
The name of a question author or ancestor is displayed as Last,First
without any space after the comma, as is the list of question ancestors. This appears in the question editor and question preview. I could not find any discussion about this, so here it is. I think it would be best to follow convention and put a space afterward.
Example:
Places in the code I found this happen:
- https://github.com/drlippman/IMathAS/blob/8eb72ac7980e893b6777eb43d43e38b62d05c46a/course/moddataset.php#L1034
- https://github.com/drlippman/IMathAS/blob/ef54add6a654f4d0294fd115de40d7e1bac898cd/course/testquestion.php#L321
- https://github.com/drlippman/IMathAS/blob/37c79730de0d9ca670e6f9333ba5d2d47fcd32e2/course/testquestion2.php#L431
Calls that produce a list without spaces after the commas:
-
Sanitize::encodeStringForDisplay($line['author']))
-
Sanitize::encodeStringForDisplay($line['ancestors'])
-
Sanitize::encodeStringForDisplay($line['ancestorauthors'])
The author name is stored that way in moddataset, line 554. Those other places are just displaying the stored value.
I agree it would be better with a space, but it would cause some challenges with matching previous author names to prevent duplicates when edits are made. But I might be able to work around that.