diff --git a/src/activities/gletters/gletters.js b/src/activities/gletters/gletters.js
--- a/src/activities/gletters/gletters.js
+++ b/src/activities/gletters/gletters.js
@@ -153,9 +153,10 @@
// The word is a letter, even if it has several chars (digraph)
var letter = level.words[i];
var isUpper = (letter == letter.toLocaleUpperCase());
- if (isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1)
+ var isDigit = letter.toLocaleLowerCase() === letter.toLocaleUpperCase()
+ if (!isDigit && isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1)
items.keyboard.shiftKey = true;
- else if (!isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1)
+ else if (!isDigit && !isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1)
items.keyboard.shiftKey = true;
else if (letters.indexOf(letter) === -1)
letters.push(level.words[i]);
@@ -178,7 +179,7 @@
var layout = new Array();
var row = 0;
var offset = 0;
- while (offset < letters.length-1) {
+ while (offset < letters.length) {
var cols = letters.length <= 10 ? letters.length : (Math.ceil((letters.length-offset) / (3 - row)));
layout[row] = new Array();
for (var j = 0; j < cols; j++)
diff --git a/src/activities/smallnumbers/ActivityInfo.qml b/src/activities/smallnumbers/ActivityInfo.qml
--- a/src/activities/smallnumbers/ActivityInfo.qml
+++ b/src/activities/smallnumbers/ActivityInfo.qml
@@ -37,5 +37,5 @@
credit: ""
section: "computer keyboard math numeration"
createdInVersion: 0
- levels: "1,2,3"
+ levels: "1,2,3,4,5,6,7"
}
diff --git a/src/activities/smallnumbers/resource/1/Data.qml b/src/activities/smallnumbers/resource/1/Data.qml
--- a/src/activities/smallnumbers/resource/1/Data.qml
+++ b/src/activities/smallnumbers/resource/1/Data.qml
@@ -18,39 +18,36 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 4")
+ objective: qsTr("Select a number on dice up to 3")
difficulty: 1
data: [
- {
+ {
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 2"),
+ "objective" : qsTr("Select the number 3"),
"words" : [
- "1",
- "2"
+ "3",
+ "3",
+ "3"
]
},
{
"level" : "2",
- "objective" : qsTr("Select the number on dice up to 3"),
+ "objective" : qsTr("Select the number on dice from 2 to 3"),
"words" : [
- "1",
"2",
- "3",
+ "3"
]
},
{
"level" : "3",
- "objective" : qsTr("Select the number on dice up to 4"),
+ "objective" : qsTr("Select the number on dice from 1 to 3"),
"words" : [
"1",
"2",
- "3",
- "4"
+ "3"
]
}
]
diff --git a/src/activities/smallnumbers/resource/2/Data.qml b/src/activities/smallnumbers/resource/2/Data.qml
--- a/src/activities/smallnumbers/resource/2/Data.qml
+++ b/src/activities/smallnumbers/resource/2/Data.qml
@@ -18,58 +18,46 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 7")
- difficulty: 2
+ objective: qsTr("Select a number on dice up to 4")
+ difficulty: 1
data: [
{
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 4"),
+ "objective" : qsTr("Select the number 4"),
"words" : [
- "1",
- "2",
- "3",
+ "4",
+ "4",
"4"
- ]
+ ]
},
{
"level" : "2",
- "objective" : qsTr("Select the number on dice up to 5"),
+ "objective" : qsTr("Select the number on dice from 3 to 4"),
"words" : [
- "1",
- "2",
"3",
- "4",
- "5"
+ "4"
]
},
{
"level" : "3",
- "objective" : qsTr("Select the number on dice up to 6"),
+ "objective" : qsTr("Select the number on dice from 2 to 4"),
"words" : [
- "1",
"2",
"3",
- "4",
- "5",
- "6"
+ "4"
]
},
{
"level" : "4",
- "objective" : qsTr("Select the number on dice up to 7"),
+ "objective" : qsTr("Select the number on dice from 1 to 4"),
"words" : [
"1",
"2",
"3",
- "4",
- "5",
- "6",
- "7"
+ "4"
]
}
]
diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/3/Data.qml
--- a/src/activities/smallnumbers/resource/3/Data.qml
+++ b/src/activities/smallnumbers/resource/3/Data.qml
@@ -18,66 +18,57 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 9")
- difficulty: 3
- data: [
+ objective: qsTr("Select a number on dice up to 5")
+ difficulty: 2
+ data: [
{
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 6"),
+ "objective" : qsTr("Select the number 5"),
"words" : [
- "1",
- "2",
- "3",
- "4",
"5",
- "6"
- ]
+ "5",
+ "5"
+ ]
},
{
"level" : "2",
- "objective" : qsTr("Select the number on dice up to 7"),
+ "objective" : qsTr("Select the number on dice from 4 to 5"),
"words" : [
- "1",
- "2",
- "3",
"4",
- "5",
- "6",
- "7"
+ "5"
]
},
{
"level" : "3",
- "objective" : qsTr("Select the number on dice up to 8"),
+ "objective" : qsTr("Select the number on dice from 3 to 5"),
"words" : [
- "1",
- "2",
"3",
"4",
- "5",
- "6",
- "7",
- "8"
+ "5"
]
},
{
"level" : "4",
- "objective" : qsTr("Select the number on dice up to 9"),
+ "objective" : qsTr("Select the number on dice from 2 to 5"),
+ "words" : [
+ "2",
+ "3",
+ "4",
+ "5"
+ ]
+ },
+ {
+ "level" : "5",
+ "objective" : qsTr("Select the number on dice from 1 to 5"),
"words" : [
"1",
"2",
"3",
"4",
- "5",
- "6",
- "7",
- "8",
- "9"
+ "5"
]
}
]
diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/4/Data.qml
copy from src/activities/smallnumbers/resource/3/Data.qml
copy to src/activities/smallnumbers/resource/4/Data.qml
--- a/src/activities/smallnumbers/resource/3/Data.qml
+++ b/src/activities/smallnumbers/resource/4/Data.qml
@@ -1,9 +1,9 @@
/* GCompris - Data.qml
*
- * Copyright (C) 2019 Akshay Kumar
+ * Copyright (C) 2019 Shubham Mishra
*
* Authors:
- * Akshay Kumar
+ * Shubham Mishra
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,66 +18,69 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 9")
- difficulty: 3
- data: [
+ objective: qsTr("Select a number on dice up to 6")
+ difficulty: 2
+ data: [
{
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 6"),
+ "objective" : qsTr("Select the number 6"),
+ "words" : [
+ "6",
+ "6",
+ "6"
+ ]
+ },
+ {
+ "level" : "2",
+ "objective" : qsTr("Select the number on dice from 5 to 6"),
+ "words" : [
+ "5",
+ "6"
+ ]
+ },
+ {
+ "level" : "3",
+ "objective" : qsTr("Select the number on dice from 4 to 6"),
"words" : [
- "1",
- "2",
- "3",
"4",
"5",
"6"
]
},
{
- "level" : "2",
- "objective" : qsTr("Select the number on dice up to 7"),
+ "level" : "4",
+ "objective" : qsTr("Select the number on dice from 3 to 6"),
"words" : [
- "1",
- "2",
"3",
"4",
"5",
- "6",
- "7"
+ "6"
]
},
{
- "level" : "3",
- "objective" : qsTr("Select the number on dice up to 8"),
+ "level" : "5",
+ "objective" : qsTr("Select the number on dice from 2 to 6"),
"words" : [
- "1",
"2",
"3",
"4",
"5",
- "6",
- "7",
- "8"
+ "6"
]
},
{
- "level" : "4",
- "objective" : qsTr("Select the number on dice up to 9"),
+ "level" : "6",
+ "objective" : qsTr("Select the number on dice from 1 to 6"),
"words" : [
"1",
"2",
"3",
"4",
"5",
- "6",
- "7",
- "8",
- "9"
+ "6"
]
}
]
diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/5/Data.qml
copy from src/activities/smallnumbers/resource/3/Data.qml
copy to src/activities/smallnumbers/resource/5/Data.qml
--- a/src/activities/smallnumbers/resource/3/Data.qml
+++ b/src/activities/smallnumbers/resource/5/Data.qml
@@ -1,9 +1,9 @@
/* GCompris - Data.qml
*
- * Copyright (C) 2019 Akshay Kumar
+ * Copyright (C) 2019 Shubham Mishra
*
* Authors:
- * Akshay Kumar
+ * Shubham Mishra
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,66 +18,82 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 9")
- difficulty: 3
- data: [
+ objective: qsTr("Select a number on dice up to 7")
+ difficulty: 3
+ data: [
{
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 6"),
+ "objective" : qsTr("Select the number 7"),
+ "words" : [
+ "7",
+ "7",
+ "7"
+ ]
+ },
+ {
+ "level" : "2",
+ "objective" : qsTr("Select the number on dice from 6 to 7"),
+ "words" : [
+ "6",
+ "7"
+ ]
+ },
+ {
+ "level" : "3",
+ "objective" : qsTr("Select the number on dice from 5 to 7"),
+ "words" : [
+ "5",
+ "6",
+ "7"
+ ]
+ },
+ {
+ "level" : "4",
+ "objective" : qsTr("Select the number on dice from 4 to 7"),
"words" : [
- "1",
- "2",
- "3",
"4",
"5",
- "6"
+ "6",
+ "7"
]
},
{
- "level" : "2",
- "objective" : qsTr("Select the number on dice up to 7"),
+ "level" : "5",
+ "objective" : qsTr("Select the number on dice from 3 to 7"),
"words" : [
- "1",
- "2",
"3",
"4",
"5",
"6",
"7"
]
},
{
- "level" : "3",
- "objective" : qsTr("Select the number on dice up to 8"),
+ "level" : "6",
+ "objective" : qsTr("Select the number on dice from 2 to 7"),
"words" : [
- "1",
"2",
"3",
"4",
"5",
"6",
- "7",
- "8"
+ "7"
]
},
{
- "level" : "4",
- "objective" : qsTr("Select the number on dice up to 9"),
+ "level" : "7",
+ "objective" : qsTr("Select the number on dice from 1 to 7"),
"words" : [
"1",
"2",
"3",
"4",
"5",
"6",
- "7",
- "8",
- "9"
+ "7"
]
}
]
diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/6/Data.qml
copy from src/activities/smallnumbers/resource/3/Data.qml
copy to src/activities/smallnumbers/resource/6/Data.qml
--- a/src/activities/smallnumbers/resource/3/Data.qml
+++ b/src/activities/smallnumbers/resource/6/Data.qml
@@ -1,9 +1,9 @@
/* GCompris - Data.qml
*
- * Copyright (C) 2019 Akshay Kumar
+ * Copyright (C) 2019 Shubham Mishra
*
* Authors:
- * Akshay Kumar
+ * Shubham Mishra
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,44 +18,75 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see .
*/
-import QtQuick 2.6
-import GCompris 1.0
import "../../../../core"
Dataset {
- objective: qsTr("Select a number on dice up to 9")
- difficulty: 3
- data: [
+ objective: qsTr("Select a number on dice up to 8")
+ difficulty: 3
+ data: [
{
"level" : "1",
- "objective" : qsTr("Select the number on dice up to 6"),
+ "objective" : qsTr("Select the number 8"),
+ "words" : [
+ "8",
+ "8",
+ "8"
+ ]
+ },
+ {
+ "level" : "2",
+ "objective" : qsTr("Select the number on dice from 7 to 8"),
+ "words" : [
+ "7",
+ "8"
+ ]
+ },
+ {
+ "level" : "3",
+ "objective" : qsTr("Select the number on dice from 6 to 8"),
+ "words" : [
+ "6",
+ "7",
+ "8"
+ ]
+ },
+ {
+ "level" : "4",
+ "objective" : qsTr("Select the number on dice from 5 to 8"),
+ "words" : [
+ "5",
+ "6",
+ "7",
+ "8"
+ ]
+ },
+ {
+ "level" : "5",
+ "objective" : qsTr("Select the number on dice from 4 to 8"),
"words" : [
- "1",
- "2",
- "3",
"4",
"5",
- "6"
+ "6",
+ "7",
+ "8"
]
},
{
- "level" : "2",
- "objective" : qsTr("Select the number on dice up to 7"),
+ "level" : "6",
+ "objective" : qsTr("Select the number on dice from 3 to 8"),
"words" : [
- "1",
- "2",
"3",
"4",
"5",
"6",
- "7"
+ "7",
+ "8"
]
},
{
- "level" : "3",
- "objective" : qsTr("Select the number on dice up to 8"),
+ "level" : "7",
+ "objective" : qsTr("Select the number on dice from 2 to 8"),
"words" : [
- "1",
"2",
"3",
"4",
@@ -66,18 +97,17 @@
]
},
{
- "level" : "4",
- "objective" : qsTr("Select the number on dice up to 9"),
+ "level" : "8",
+ "objective" : qsTr("Select the number on dice from 1 to 8"),
"words" : [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
- "8",
- "9"
+ "8"
]
}
]
diff --git a/src/activities/smallnumbers/resource/7/Data.qml b/src/activities/smallnumbers/resource/7/Data.qml
new file mode 100644
--- /dev/null
+++ b/src/activities/smallnumbers/resource/7/Data.qml
@@ -0,0 +1,130 @@
+/* GCompris - Data.qml
+ *
+ * Copyright (C) 2019 Shubham Mishra
+ *
+ * Authors:
+ * Shubham Mishra
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see .
+ */
+import "../../../../core"
+
+Dataset {
+ objective: qsTr("Select a number on dice up to 9")
+ difficulty: 3
+ data: [
+ {
+ "level" : "1",
+ "objective" : qsTr("Select the number 9"),
+ "words" : [
+ "9",
+ "9",
+ "9",
+ "9"
+ ]
+ },
+ {
+ "level" : "2",
+ "objective" : qsTr("Select the number on dice from 8 to 9"),
+ "words" : [
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "3",
+ "objective" : qsTr("Select the number on dice from 7 to 9"),
+ "words" : [
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "4",
+ "objective" : qsTr("Select the number on dice from 6 to 9"),
+ "words" : [
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "5",
+ "objective" : qsTr("Select the number on dice from 5 to 9"),
+ "words" : [
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "6",
+ "objective" : qsTr("Select the number on dice from 4 to 9"),
+ "words" : [
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "7",
+ "objective" : qsTr("Select the number on dice from 3 to 9"),
+ "words" : [
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "8",
+ "objective" : qsTr("Select the number on dice from 2 to 9"),
+ "words" : [
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ },
+ {
+ "level" : "9",
+ "objective" : qsTr("Select the number on dice from 1 to 9"),
+ "words" : [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"
+ ]
+ }
+ ]
+}