Tests & Quizzes: issue with calculated questions using the OR (|) operator and comma (,)

Description

The symbols “|” and “,” are also used as a separators in calculated questions, provoking wrong answers but also other issues:

 

Pregunta.png

 

In the screenshot you can see (at the right, solution view) 0|1 should be calculated as 1 but shows 0.

It seems there are also issues when printing exams with these questions and other characters like commas cause irregular behaviours.

Problem on this line: https://github.com/sakaiproject/sakai/blob/master/samigo/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/assessment/PublishedItemData.java#L776
and more places.

Attachments

2
  • 18 Oct 2024, 09:39 AM
  • 17 Oct 2024, 10:58 AM

Activity

Show:

Automation for Jira November 25, 2024 at 11:47 AM

A pull request has been created, "SAK-50613 Tests & Quizzes: issue with calculated questions using the OR (|) operator and comma (,)", you can see it at https://github.com/sakaiproject/sakai/pull/13059

Bernardo Garcia Vila October 18, 2024 at 9:39 AM
Edited

Oops, sorry, fixed. Translating it here too just in case it’s not clear:

With 0 and 1.

An AND is 0, that is 0

An OR is 0, that is 1

Christina Schwiebert October 17, 2024 at 11:02 PM

Do you have a larger version of your screenshot? That one is unreadable when you make it larger.

Fixed

Details

Priority

Fix versions

23 Status

Please Merge

22 Status

Please Merge

Assignee

Reporter

Created October 17, 2024 at 10:59 AM
Updated December 19, 2024 at 7:15 AM
Resolved December 19, 2024 at 7:15 AM

Flag notifications