SOK ideas

JAZEIX Johnny jazeix at gmail.com
Thu Oct 20 06:27:23 UTC 2016


On 10/19/16 21:19, Charles Cossé wrote:
> On Wed, Oct 19, 2016 at 12:14 PM, JAZEIX Johnny <jazeix at gmail.com 
> <mailto:jazeix at gmail.com>> wrote:
>
>
>     The question is more on how to handle the different cases with the
>     same base code. We should have a way to know if the data is good
>     without having a lot of if(multiplication) check if (number 1 *
>     number 2 = expected result) else if (addition) check if (number 1
>     + number 2 = expected result)...
>
>
> Hi, just lurking on your list, but if I may suggest: just evaluate the 
> string expression and test whether true or false.  That works for all 
> math.
> -Charles
>
Hi,

feel free to comment whenever you want :).

On my side I was more thinking on having a check method directly in the 
dataset and in the main activity calls dataset.check(data1, data2). This 
way we wouldn't have to modify the base activity.

After talking with Emmanuel, he found a third solution which is we don't 
care about the question and only check the result which is stored in the 
dataset:

[ { "3*7": "21" }, { "it go": "es" }, { "I go": ""}  ... ]

This way we can do a completely abstract questionnaire activity. 
Dataset/Questions would be created via an interface and we can think of 
a way of displaying either a menu like for lang or generating new 
activity on the fly (which may be better as we can categorize them in 
the section and search them using the search feature).

Johnny


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gcompris-devel/attachments/20161020/8ab7ceea/attachment.html>


More information about the GCompris-devel mailing list