shevandrin / rqti

Create QTI Exercises and Exams from R
https://shevandrin.github.io/rqti/
GNU General Public License v3.0
4 stars 2 forks source link

docs table: managing identifiers #161

Closed johannes-titz closed 8 months ago

johannes-titz commented 8 months ago

For now I commented out the third way of specifying ids as I believe it might lead to confusion. If there is a demand for that we can add it again. But I think the abbreviation should be sufficient for most cases.

But I am wondering, what happens with the abbreviation if numbers are used (e.g. as in the multiplication table)?

shevandrin commented 8 months ago

But I am wondering, what happens with the abbreviation if numbers are used (e.g. as in the multiplication table)?

from complex table template it gives: "49_=" "39=" "5*5=" "23_=" "123_=" as rows identifiers

johannes-titz commented 8 months ago

Are numbers allowed as ids? I thought this creates problems.

shevandrin commented 8 months ago

yes, it does not pass the verification due to numbers at the beginning:

Error: Xml file is not valid. 
c("Element '{http://www.imsglobal.org/xsd/imsqti_v2p1}simpleAssociableChoice', attribute 'identifier': '4*9_=' is not a valid value of the atomic type '{http://www.imsglobal.org/xsd/imsqti_v2p1}Identifier.Type'.", "Element '{http://www.imsglobal.org/xsd/imsqti_v2p1}simpleAssociableChoice', attribute 'identifier': '3*9_=' is not a valid value of the atomic type '{http://www.imsglobal.org/xsd/imsqti_v2p1}Identifier.Type'.", "Element '{http://www.imsglobal.org/xsd/imsqti_v2p1}simpleAssociableChoice', attribute 'identifier': '5*5_=' is not a valid value of the atomic type '{http://www.imsglobal.org/xsd/imsqti_v2p1}Identifier.Type'.", 
"Element '{http://www.imsglobal.org/xsd/imsqti_v2p1}simpleAssociableChoice', attribute 'identifier': '2*3_=' is not a valid value of the atomic type '{http://www.imsglobal.org/xsd/imsqti_v2p1}Identifier.Type'.", "Element '{http://www.imsglobal.org/xsd/imsqti_v2p1}simpleAssociableChoice', attribute 'identifier': '12*3_=' is not a

should i add some prefix at the beginning like r?

shevandrin commented 8 months ago

moreover, all special characters are not allowed to be in identifiers. so I eliminate them as well. now for complex table template: rows identifiers are "row49_" "row39_" "row55_" "row23_" "row123_" cols identifiers are "col27" "col36" "col25" "col6"

this values passed xml verification

johannes-titz commented 8 months ago

So if it is invalid you are adding row/col to the identifier, right?

shevandrin commented 8 months ago

if it strarts with ditigs, col/row is added as prefix. All symbols (except digits, letters and underscore) are removed in any case.

johannes-titz commented 8 months ago

Okay, I added this to the docs.