[LON-CAPA-users] routine to separate submission into number and unit

Raeburn, Stuart raeburn at msu.edu
Mon Apr 20 11:28:24 EDT 2020


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-bounces at mail.lon-capa.org> on behalf of H. K. Ng <hkng at 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



More information about the LON-CAPA-users mailing list