diff --git a/src/activities/activities.txt b/src/activities/activities.txt index b9955bf36..be4fc64b9 100644 --- a/src/activities/activities.txt +++ b/src/activities/activities.txt @@ -1,146 +1,147 @@ # The list of activities that will be loaded at GCompris start. # Keep it sorted advanced_colors algebra_by algebra_div algebra_minus algebra_plus algorithm align4 align4-2players alphabet-sequence babymatch babyshapes baby_wordprocessor balancebox ballcatch bargame bargame_2players braille_alphabets braille_fun calendar canal_lock categorization checkers checkers_2players chess chess_2players chess_partyend chronos clickanddraw clickgame click_on_letter click_on_letter_up clockgame color_mix color_mix_light colors crane details digital_electricity drawletters drawnumbers enumerate erase erase_2clic erase_clic explore_farm_animals explore_monuments explore_world_animals explore_world_music family family_find_relative fifteen +find_the_day followline football geo-country geography gletters gnumch-equality gnumch-factors gnumch-inequality gnumch-multiples gnumch-primes graph-coloring guesscount guessnumber hangman hanoi hanoi_real hexagon imagename instruments intro_gravity land_safe lang leftright letter-in-word lightsoff louis-braille magic-hat-minus magic-hat-plus maze mazeinvisible mazerelative melody memory memory-case-association memory-case-association-tux memory-enumerate memory-math-add memory-math-add-minus memory-math-add-minus-mult-div memory-math-add-minus-mult-div-tux memory-math-add-minus-tux memory-math-add-tux memory-math-div memory-math-div-tux memory-math-minus memory-math-minus-tux memory-math-mult memory-math-mult-div memory-math-mult-div-tux memory-math-mult-tux memory-sound memory-sound-tux memory-tux memory-wordnumber mining missing-letter money money_back money_back_cents money_cents mosaic nine_men_morris nine_men_morris_2players number_sequence numbers-odd-even paintings penalty photo_hunter planegame readingh readingv redraw redraw_symmetrical renewable_energy reversecount roman_numerals scalesboard scalesboard_weight scalesboard_weight_avoirdupois share simplepaint smallnumbers smallnumbers2 submarine sudoku superbrain tangram target tic_tac_toe tic_tac_toe_2players traffic watercycle wordsgame diff --git a/src/activities/find_the_day/ActivityInfo.qml b/src/activities/find_the_day/ActivityInfo.qml new file mode 100644 index 000000000..0baf14d36 --- /dev/null +++ b/src/activities/find_the_day/ActivityInfo.qml @@ -0,0 +1,40 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2018 Amit Sagtani + * + * 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 GCompris 1.0 + +ActivityInfo { + name: "find_the_day/FindTheDay.qml" + difficulty: 6 + icon: "find_the_day/find_the_day.svg" + author: "Amit Sagtani <asagtani06@gmail.com>" + demo: true + //: Activity title + title: qsTr("Find the day") + //: Help title + description: qsTr("Read the task and find the correct date by doing mathematical calculations.") + //intro: "Select the asked date on the calendar" + //: Help goal + goal: qsTr("Learn to find date on the calendar by duration calculations.") + //: Help prerequisite + prerequisite: qsTr("Basics of calendar") + //: Help manual + manual: qsTr("Review the instructions and select the correct date on calendar.") + credit: "" + section: "discovery" + createdInVersion: 9000 +} diff --git a/src/activities/find_the_day/CMakeLists.txt b/src/activities/find_the_day/CMakeLists.txt new file mode 100644 index 000000000..d7b406cd0 --- /dev/null +++ b/src/activities/find_the_day/CMakeLists.txt @@ -0,0 +1 @@ +GCOMPRIS_ADD_RCC(activities/find_the_day *.qml *.svg *.js resource/*) diff --git a/src/activities/find_the_day/FindTheDay.qml b/src/activities/find_the_day/FindTheDay.qml new file mode 100644 index 000000000..62f0bb3c6 --- /dev/null +++ b/src/activities/find_the_day/FindTheDay.qml @@ -0,0 +1,29 @@ +/* GCompris - find_the_day.qml + * + * Copyright (C) 2018 Amit Sagtani + * + * Authors: + * Amit Sagtani + * + * 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 QtQuick 2.6 + +import "../calendar" +import "find_the_day_dataset.js" as Dataset + +Calendar { + dataset: Dataset + +} diff --git a/src/activities/find_the_day/find_the_day.svg b/src/activities/find_the_day/find_the_day.svg new file mode 100644 index 000000000..84c1c871f --- /dev/null +++ b/src/activities/find_the_day/find_the_day.svg @@ -0,0 +1,1163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + Calendar Month + 2010-11-12T11:27:48 + + https://openclipart.org/detail/95215/calendar-month-by-baditaflorin + + + baditaflorin + + + + + calendar + january + month + + + + + + + + + + + diff --git a/src/activities/find_the_day/find_the_day_dataset.js b/src/activities/find_the_day/find_the_day_dataset.js new file mode 100644 index 000000000..1b199b965 --- /dev/null +++ b/src/activities/find_the_day/find_the_day_dataset.js @@ -0,0 +1,216 @@ +/* GCompris - find_the_day_dataset.js + * + * Copyright (C) 2018 Amit Sagtani + * + * 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 . + */ + +// Contains the questions, answers and calendar configurations of every level. +// Add more levels by inserting questions and answers below. +// Days of weeks are indexed from 0 i.e (Sunday = 0, Monday = 1, Tuesday = 2, .... ..... .... , Saturday = 6) +// Months of year are indexed from 0 i.e (January = 0, February = 1, March = 2, .... ..... ...., December = 11) + +//MODES +// findMonthOnly --> For questions based on finding month only. +// findYearMonthDay --> For questions based on finding year, month and day. +// findDayOfWeek --> For questions based on finding day of week only. +// findDay --> For questions based on finding day of a given month and year. + + +function get() { + return [ + [ // Level 1 + [ // Level 1 Configurations + { + "navigationBarVisible" : true, + "minimumDate": "2018-01-01", + "maximumDate": "2018-12-31", + "visibleMonth": 7, + "visibleYear": 2018, + "mode": "findYearMonthDay" + } + ], + [ // Level 1 Questions + { + "question": qsTr("Find the date 13 days after 3 May."), + "answer": {"year": 2018, "month": 4, "day": 16} + }, + { + "question": qsTr("Find the date 7 days after 1 October."), + "answer": {"year": 2018, "month": 9, "day": 8} + }, + { + "question": qsTr("Find the date 31 days after 12 July."), + "answer": {"year": 2018, "month": 7, "day": 12} + }, + { + "question": qsTr("Find the date two weeks after 27 November."), + "answer": {"year": 2018, "month": 11, "day": 11} + }, + { + "question": qsTr("Find the date 19 days before 1 September."), + "answer": {"year": 2018, "month": 7, "day": 13} + }, + { + "question": qsTr("Find the date 5 days before 8 December."), + "answer": {"year": 2018, "month": 11, "day": 3} + } + ] + + ], + + [ // Level 2 + [ // Level 2 Configurations + { + "navigationBarVisible" : true, + "minimumDate": "2018-01-01", + "maximumDate": "2018-12-31", + "visibleMonth": 7, + "visibleYear": 2018, + "mode": "findDayOfWeek" + } + ], + [ // Level 2 Questions + { + "question": qsTr("Find day of week 3 days after 5 December."), + "answer": {"dayOfWeek": 6} + }, + { + "question": qsTr("Find day of week 12 days before 12 November."), + "answer": {"dayOfWeek": 3} + }, + { + "question": qsTr("Find day of week 32 days after 5 January."), + "answer": {"dayOfWeek": 2} + }, + { + "question": qsTr("Find day of week 5 days after 23 February."), + "answer": {"dayOfWeek": 3} + }, + { + "question": qsTr("Find day of week 17 days before 16 August."), + "answer": {"dayOfWeek": 1} + } + + ] + ], + + [ // Level 3 + [ // Level 3 configurations + { + "navigationBarVisible": true, + "minimumDate": "2018-01-01", + "maximumDate": "2018-12-31", + "visibleMonth": 7, + "visibleYear": 2018, + "mode": "findYearMonthDay" + } + ], + + [ // Level 3 Questions + { + "question": qsTr("Find the date 2 weeks and 3 days after 12 January."), + "answer": {"year": 2018, "month": 0, "day": 29} + }, + { + "question": qsTr("Find the date 3 weeks and 2 days after 22 March."), + "answer": {"year": 2018, "month": 3, "day": 14} + }, + { + "question": qsTr("Find the date 5 weeks and 6 days after 5 October."), + "answer": {"year": 2018, "month": 10, "day": 15} + }, + { + "question": qsTr("Find the date 1 week and 1 day before 8 August."), + "answer": {"year": 2018, "month": 6, "day": 31} + }, + { + "question": qsTr("Find the date 2 weeks and 5 days before 2 July."), + "answer": {"year": 2018, "month": 5, "day": 13} + } + + ] + ], + + [ // level 4 + [ // Level 4 Configurations + { + "navigationBarVisible" : true, + "minimumDate": "2018-01-01", + "maximumDate": "2018-12-31", + "visibleMonth": 7, + "visibleYear": 2018, + "mode": "findDayOfWeek" + } + ], + [ // Level 4 Questions + { + "question": qsTr("Find day of week 5 months and 2 days after 3 July."), + "answer": {"dayOfWeek": 3} + }, + { + "question": qsTr("Find day of week 2 months and 4 days after 8 October."), + "answer": {"dayOfWeek": 3} + }, + { + "question": qsTr("Find day of week 1 month and 3 days before 28 December."), + "answer": {"dayOfWeek": 0} + }, + { + "question": qsTr("Find day of week 8 months and 7 days after 28 February."), + "answer": {"dayOfWeek": 0} + }, + { + "question": qsTr("Find day of week 3 months and 3 days before 15 September."), + "answer": {"dayOfWeek": 2} + } + ] + ], + + [ // level 5 + [ // Level 5 Configurations + { + "navigationBarVisible" : true, + "minimumDate": "2018-01-01", + "maximumDate": "2018-12-31", + "visibleMonth": 7, + "visibleYear": 2018, + "mode": "findYearMonthDay" + } + ], + [ // Level 5 Questions + { + "question": qsTr("Find the date 2 months, 1 week and 5 days after 12 January."), + "answer": {"year": 2018, "month": 2, "day": 24} + }, + { + "question": qsTr("Find the date 3 months, 2 weeks and 1 day after 23 August."), + "answer": {"year": 2018, "month": 11, "day": 8} + }, + { + "question": qsTr("Find the date 5 months, 3 weeks and 2 days after 20 March."), + "answer": {"year": 2018, "month": 8, "day": 12} + }, + { + "question": qsTr("Find the date 1 month 1 week and 1 day before 10 September."), + "answer": {"year": 2018, "month": 7, "day": 2} + }, + { + "question": qsTr("Find the date 2 months, 1 week and 8 days before 7 April."), + "answer": {"year": 2018, "month": 0, "day": 23} + } + ] + ] + ] +}