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

if content has length 1, make a list out of it #223

Open johannes-titz opened 1 month ago

johannes-titz commented 1 month ago

e.g. essay(content = "my content") throws an error, UX can be improved.

shevandrin commented 1 month ago

Done!

johannes-titz commented 1 month ago

for all types, right?

shevandrin commented 1 month ago

only for essay()

shevandrin commented 1 month ago

i can do it for all types of questions easily, except 'entry' type

johannes-titz commented 1 month ago

why?

shevandrin commented 1 month ago

content of entry must contain instances of Gaps, it has to be a list anyway

johannes-titz commented 1 month ago

in this case an error will be thrown, right? Entry("my gap missing the gap will throw an error")

shevandrin commented 1 month ago

yes, because it is a character string, not a list

shevandrin commented 1 month ago

initiating procedure is looking for gaps inside content, if they are not found it gives an error (but not meaningful)

johannes-titz commented 1 month ago

we can add a meaninful error; then my above example should throw it bcause gaps is missing not because the string ist no t a list.

btw. also applies to feedback. if i have only one string it can be converted to a list. UX would be better.

shevandrin commented 1 month ago
shevandrin commented 1 month ago

done!

shevandrin commented 1 month ago

@bondarenko-petr please cover these cases with tests