[Xerte] cmi.core.score.raw datatype?

Mark Tomlinson, AC&S Ltd mark.tomlinson at acns-group.com
Tue Oct 21 14:48:45 BST 2008


That was why I was using Math.round() as I also thought that BUT:


-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 October 2008 14:46
To: Xerte discussion list
Subject: RE: [Xerte] cmi.core.score.raw datatype?

Does it need to be an integer?

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Mark Tomlinson,
AC&S Ltd
Sent: Tuesday, October 21, 2008 2:44 PM
To: 'Xerte discussion list'
Subject: RE: [Xerte] cmi.core.score.raw datatype?

Yes, it is a percentage.

Thanks


Mark

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Martín Dobovšek
Sent: 21 October 2008 14:41
To: Xerte discussion list
Subject: Re: [Xerte] cmi.core.score.raw datatype?

Mark:

Check that value is UNDER or equal 100. It must be string

Best regards

Martin

--- "Mark Tomlinson, AC&S Ltd" <mark.tomlinson at acns-group.com> escribió:

> What data type is cmi.core.score.raw supposed to be?
> 
>  
> 
> If I call : 
> 
>  
> 
> _level0.setValue('cmi.core.score.raw',"50");  as a 'hard coded' value this
> works and sets the score as 50 in the LMS
> 
>  
> 
> If I call:
> 
>  
> 
>
_level0.setValue('cmi.core.score.raw',Math.round((m1score+m2score)/18*100));
> This fails.  I assumed because it was not a string?
> 
>  
> 
> If I call:
> 
>  
> 
>
_level0.setValue('cmi.core.score.raw',String(Math.round((m1score+m2score)/18
> *100)));  This also fails.
> 
>  
> 
>  
> 
> In all failing cases I get a JavaScript alert stating 'Incorrect Data
Type'.
> If I turn on debugging in apiwrapper.js, I get :  Incorrect Data Type   No
> Error
> 
>  
> 
>  
> 
> Anyone any ideas what I am doing wrong here?
> 
>  
> 
> Cheers
> 
>  
> 
> Mark
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  <http://www.acns-group.com> 
> 
> Creating Excellence Together
> 
>  
> 
> 
> 
> Mark Tomlinson
> Managing Director 
> 
> AC&S LTD
> 35A Victoria Road East
> Thornton-Cleveleys
> Lancashire
> FY5 5BU
> UK 
> 
> 
>  <mailto:mark.tomlinson at acns-group.com> mark.tomlinson at acns-group.com 
> 
> 
> tel: 
> fax: 
> mobile: 
> 
> +44 1253 855 997
> +44 870 762 6818
> +44 789 968 7257 
> 
>  
> 
> 
> 
>  
> 
>  
> 
> > _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> 



      Yahoo! Cocina
Recetas prácticas y comida saludable
http://ar.mujer.yahoo.com/cocina/

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte



More information about the Xerte mailing list