Changeset View
Changeset View
Standalone View
Standalone View
src/activities/find_the_day/resource/3/Data.qml
- This file was added.
1 | /* GCompris - Data.qml | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * Copyright (C) 2019 Akshay Kumar <email.akshay98@gmail.com> | ||||
4 | * | ||||
5 | * Authors: | ||||
6 | * Akshay Kumar <email.akshay98@gmail.com> | ||||
7 | * | ||||
8 | * This program is free software; you can redistribute it and/or modify | ||||
9 | * it under the terms of the GNU General Public License as published by | ||||
10 | * the Free Software Foundation; either version 3 of the License, or | ||||
11 | * (at your option) any later version. | ||||
12 | * | ||||
13 | * This program is distributed in the hope that it will be useful, | ||||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
16 | * GNU General Public License for more details. | ||||
17 | * | ||||
18 | * You should have received a copy of the GNU General Public License | ||||
19 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||||
20 | */ | ||||
21 | import QtQuick 2.6 | ||||
22 | import GCompris 1.0 | ||||
23 | import "../../../../core" | ||||
24 | | ||||
25 | /* | ||||
26 | Contains the questions, answers and calendar configurations of every level. | ||||
27 | Add more levels by inserting questions and answers below. | ||||
28 | Days of weeks are indexed from 0 i.e (Sunday = 0, Monday = 1, Tuesday = 2, .... ..... .... , Saturday = 6) | ||||
29 | Months of year are indexed from 0 i.e (January = 0, February = 1, March = 2, .... ..... ...., December = 11) | ||||
30 | If questions are provided explicitly field questionAnswers contains an array of questions and answers and | ||||
31 | if they are not provided, then questionAnswers field contains parameter length signifying the number of questions, and optional | ||||
32 | parameter maxOffset for questions where the user has to find date some days ahead of the given date. | ||||
33 | [ | ||||
34 | //MODES | ||||
35 | // findMonthOnly --> For questions based on finding month only. | ||||
36 | // findYearMonthDay --> For questions based on finding year, month and day. | ||||
37 | // findDayOfWeek --> For questions based on finding day of week only. | ||||
38 | // findDay --> For questions based on finding day of a given month and year. | ||||
39 | ] | ||||
40 | */ | ||||
41 | | ||||
42 | Dataset { | ||||
43 | objective: qsTr("Find the date several months away") | ||||
44 | difficulty: 6 | ||||
45 | data: [ | ||||
46 | { | ||||
47 | "navigationBarVisible" : true, | ||||
48 | "minimumDate": "2018-01-01", | ||||
49 | "maximumDate": "2018-12-31", | ||||
50 | "visibleMonth": 0, | ||||
51 | "visibleYear": 2018, | ||||
52 | "mode": "findYearMonthDay", | ||||
53 | "questionsExplicitlyGiven": false, | ||||
54 | "questionAnswers": { | ||||
55 | "length": 5, | ||||
56 | } | ||||
57 | }, | ||||
58 | { | ||||
59 | "navigationBarVisible" : true, | ||||
60 | "minimumDate": "2018-01-01", | ||||
61 | "maximumDate": "2019-12-31", | ||||
62 | "visibleMonth": 10, | ||||
63 | "visibleYear": 2018, | ||||
64 | "mode": "findYearMonthDay", | ||||
65 | "questionsExplicitlyGiven": false, | ||||
66 | "questionAnswers": { | ||||
67 | "length": 5, | ||||
68 | "maxOffset": 60 | ||||
69 | } | ||||
70 | }, | ||||
71 | { | ||||
72 | "navigationBarVisible" : true, | ||||
73 | "minimumDate": "2018-01-01", | ||||
74 | "maximumDate": "2019-12-31", | ||||
75 | "visibleMonth": 10, | ||||
76 | "visibleYear": 2018, | ||||
77 | "mode": "findYearMonthDay", | ||||
78 | "questionsExplicitlyGiven": false, | ||||
79 | "questionAnswers": { | ||||
80 | "length": 5, | ||||
81 | "maxOffset": 90 | ||||
82 | } | ||||
83 | }, | ||||
84 | { | ||||
85 | "navigationBarVisible" : true, | ||||
86 | "minimumDate": "2018-01-01", | ||||
87 | "maximumDate": "2018-12-31", | ||||
88 | "visibleMonth": 7, | ||||
89 | "visibleYear": 2018, | ||||
90 | "mode": "findDayOfWeek", | ||||
91 | "questionsExplicitlyGiven": true, | ||||
92 | "questionAnswers": [ | ||||
93 | { | ||||
94 | "question": qsTr("Find day of week 5 months and 2 days after July 3."), | ||||
95 | "answer": {"dayOfWeek": 3} | ||||
96 | }, | ||||
97 | { | ||||
98 | "question": qsTr("Find day of week 2 months and 4 days after October 8."), | ||||
99 | "answer": {"dayOfWeek": 3} | ||||
100 | }, | ||||
101 | { | ||||
102 | "question": qsTr("Find day of week 1 month and 3 days before December 28."), | ||||
103 | "answer": {"dayOfWeek": 0} | ||||
104 | }, | ||||
105 | { | ||||
106 | "question": qsTr("Find day of week 8 months and 7 days after February 28."), | ||||
107 | "answer": {"dayOfWeek": 0} | ||||
108 | }, | ||||
109 | { | ||||
110 | "question": qsTr("Find day of week 3 months and 3 days before September 15."), | ||||
111 | "answer": {"dayOfWeek": 2} | ||||
112 | } | ||||
113 | ] | ||||
114 | }, | ||||
115 | { | ||||
116 | "navigationBarVisible" : true, | ||||
117 | "minimumDate": "2018-01-01", | ||||
118 | "maximumDate": "2018-12-31", | ||||
119 | "visibleMonth": 7, | ||||
120 | "visibleYear": 2018, | ||||
121 | "mode": "findYearMonthDay", | ||||
122 | "questionsExplicitlyGiven": true, | ||||
123 | "questionAnswers": [ | ||||
124 | { | ||||
125 | "question": qsTr("Find the date 2 months, 1 week and 5 days after January 12."), | ||||
126 | "answer": {"year": 2018, "month": 2, "day": 24} | ||||
127 | }, | ||||
128 | { | ||||
129 | "question": qsTr("Find the date 3 months, 2 weeks and 1 day after August 23."), | ||||
130 | "answer": {"year": 2018, "month": 11, "day": 8} | ||||
131 | }, | ||||
132 | { | ||||
133 | "question": qsTr("Find the date 5 months, 3 weeks and 2 days after March 20."), | ||||
134 | "answer": {"year": 2018, "month": 8, "day": 12} | ||||
135 | }, | ||||
136 | { | ||||
137 | "question": qsTr("Find the date 1 month 1 week and 1 day before September 10."), | ||||
138 | "answer": {"year": 2018, "month": 7, "day": 2} | ||||
139 | }, | ||||
140 | { | ||||
141 | "question": qsTr("Find the date 2 months, 1 week and 8 days before April 7."), | ||||
142 | "answer": {"year": 2018, "month": 0, "day": 23} | ||||
143 | } | ||||
144 | ] | ||||
145 | } | ||||
146 | ] | ||||
147 | } |