HK,

There is currently no specific routine available for you to call from 
default_homework.lcpm to separate a submission for a numericalresponse item 
into the number and unit as two variables. 

Instead LON-CAPA internally uses one of two regular expressions within the 
caparesponse_check_list() routine to separate a submission into a non-unit part 
and a unit part.  Which regex is used depends on whether the allowalgebra 
parameter is set to yes.  After separating the parts, each is passed to 
&capa_formula_fix() in caparesponse.pm, which applies the 
&implicit_multiplication() routine found in response.pm.

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> on behalf of H. 
K. Ng <h...@fsu.edu>
Sent: Saturday, April 18, 2020 6:54 AM
To: Discussion list for LON-CAPA users
Subject: [LON-CAPA-users] routine to separate submission into number and unit

Hi,

Does anyone know of a built-in routine that separates a submission into the 
number and unit as two variables? Thanks

Regards,
-hk

_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

Reply via email to