Commit 21d97e8c authored by Shubham Mishra's avatar Shubham Mishra

categorization, replaced category names with full urls in dataset and change objectives

parent c2799b23
...@@ -88,7 +88,7 @@ Item { ...@@ -88,7 +88,7 @@ Item {
function setDefaultValues() { function setDefaultValues() {
if( dataToSave["data"] === undefined) { if( dataToSave["data"] === undefined) {
dataToSave["data"] = Activity.categoriesToSavedProperties(dataToSave) dataToSave["data"] = Activity.categoriesToSavedProperties(dataToSave)
if(dataToSave["mode"]=== undefined) if(dataToSave["mode"] === undefined)
dataToSave["mode"] = mode dataToSave["mode"] = mode
} }
mode = dataToSave["mode"] mode = dataToSave["mode"]
......
...@@ -34,7 +34,6 @@ ActivityBase { ...@@ -34,7 +34,6 @@ ActivityBase {
onStart: focus = true onStart: focus = true
onStop: {} onStop: {}
property string boardsUrl: ":/gcompris/src/activities/categorization/resource/board/"
property bool vert: background.width <= background.height property bool vert: background.width <= background.height
property var barAtStart property var barAtStart
...@@ -84,7 +83,7 @@ ActivityBase { ...@@ -84,7 +83,7 @@ ActivityBase {
} }
onStart: { onStart: {
Activity.init(items, boardsUrl) Activity.init(items)
Activity.start() Activity.start()
hideBar() hideBar()
} }
......
...@@ -35,13 +35,11 @@ var index ...@@ -35,13 +35,11 @@ var index
var imagesData = [] var imagesData = []
var categoriesData = [] var categoriesData = []
var expertCategories = [] var expertCategories = []
var boardsUrl
var answerTable = {} var answerTable = {}
var totalImages var totalImages
var fileName = ":/gcompris/data/words/animals/camel.jpg" var fileName = ":/gcompris/data/words/animals/camel.jpg"
function init(items_,boardsUrl_) { function init(items_) {
boardsUrl = boardsUrl_
items = items_ items = items_
items.menuModel.clear() items.menuModel.clear()
currentSubLevel = 0 currentSubLevel = 0
...@@ -59,7 +57,7 @@ function start() { ...@@ -59,7 +57,7 @@ function start() {
var categoryDataset = items.categoryReview.categoryDataset var categoryDataset = items.categoryReview.categoryDataset
var categoryLists = items.categories var categoryLists = items.categories
for(var i = 0; i < categoryLists.length; i++) { for(var i = 0; i < categoryLists.length; i++) {
categoriesFilename = "qrc" + boardsUrl + categoryLists[i] categoriesFilename = categoryLists[i][0]
categoryDataset.source = categoriesFilename categoryDataset.source = categoriesFilename
if(isEmbeddedMode || categoryDataset.item.isEmbedded) { if(isEmbeddedMode || categoryDataset.item.isEmbedded) {
categoriesData.push(categoryDataset.item) categoriesData.push(categoryDataset.item)
......
...@@ -21,23 +21,23 @@ ...@@ -21,23 +21,23 @@
import GCompris 1.0 import GCompris 1.0
Data { Data {
objective: qsTr("Very Familiar categories, with score.") objective: qsTr("Very Familiar categories.")
difficulty: 3 difficulty: 3
data: [ data: [
[ [
"category_colors.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_colors.qml"
], ],
[ [
"category_animals.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_animals.qml"
], ],
[ [
"category_food.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_food.qml"
], ],
[ [
"category_numbers.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_numbers.qml"
], ],
[ [
"category_birds.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_birds.qml"
] ]
] ]
} }
...@@ -21,29 +21,29 @@ ...@@ -21,29 +21,29 @@
import GCompris 1.0 import GCompris 1.0
Data { Data {
objective: qsTr("Less familiar categories, with or without score.") objective: qsTr("Less familiar categories.")
difficulty: 4 difficulty: 4
data: [ data: [
[ [
"category_vegetables.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_vegetables.qml"
], ],
[ [
"category_shapes.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_shapes.qml"
], ],
[ [
"category_flowers.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_flowers.qml"
], ],
[ [
"category_living_beings.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_living_beings.qml"
], ],
[ [
"category_nature.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_nature.qml"
], ],
[ [
"category_insects.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_insects.qml"
], ],
[ [
"category_fishes.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_fishes.qml"
] ]
] ]
} }
...@@ -21,26 +21,26 @@ ...@@ -21,26 +21,26 @@
import GCompris 1.0 import GCompris 1.0
Data { Data {
objective: qsTr("Unfamiliar categories, with score, without score and without model.") objective: qsTr("Unfamiliar categories.")
difficulty: 5 difficulty: 5
data: [ data: [
[ [
"category_household_goods.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_household_goods.qml"
], ],
[ [
"category_monuments.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_monuments.qml"
], ],
[ [
"category_renewable.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_renewable.qml"
], ],
[ [
"category_transports.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_transports.qml"
], ],
[ [
"category_odd_even.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_odd_even.qml"
], ],
[ [
"category_tools.qml" "qrc:/gcompris/src/activities/categorization/resource/board/category_tools.qml"
] ]
] ]
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment