Changeset View
Changeset View
Standalone View
Standalone View
src/activities/calendar/resource/1/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("Calendar Questions for a single month") | ||||
44 | difficulty: 4 | ||||
45 | data: [ | ||||
46 | { | ||||
47 | "navigationBarVisible" : false, | ||||
48 | "minimumDate": "2018-03-01", | ||||
49 | "maximumDate": "2018-03-31", | ||||
50 | "visibleMonth": 2, | ||||
51 | "visibleYear": 2018, | ||||
52 | "mode": "findDay", | ||||
53 | "questionsExplicitlyGiven": false, | ||||
54 | "questionAnswers": { | ||||
55 | "length": 5 | ||||
56 | } | ||||
57 | }, | ||||
58 | { | ||||
59 | "navigationBarVisible" : false, | ||||
60 | "minimumDate": "2018-03-01", | ||||
61 | "maximumDate": "2018-03-31", | ||||
62 | "visibleMonth": 2, | ||||
63 | "visibleYear": 2018, | ||||
64 | "mode": "findDay", | ||||
65 | "questionsExplicitlyGiven": true, | ||||
66 | "questionAnswers": [ | ||||
67 | { | ||||
68 | "question": qsTr("Select day 23"), | ||||
69 | "answer": {"year": 2018, "month": 2, "day": 23} | ||||
70 | }, | ||||
71 | { | ||||
72 | "question": qsTr("Select day 1"), | ||||
73 | "answer": {"year": 2018, "month": 2, "day": 1} | ||||
74 | }, | ||||
75 | { | ||||
76 | "question": qsTr("Select day 16"), | ||||
77 | "answer": {"year": 2018, "month": 2, "day": 16} | ||||
78 | }, | ||||
79 | { | ||||
80 | "question": qsTr("Select day 28"), | ||||
81 | "answer": {"year": 2018, "month": 2, "day": 28} | ||||
82 | }, | ||||
83 | { | ||||
84 | "question": qsTr("Select day 11"), | ||||
85 | "answer": {"year": 2018, "month": 2, "day": 11} | ||||
86 | }, | ||||
87 | { | ||||
88 | "question": qsTr("Select day 20"), | ||||
89 | "answer": {"year": 2018, "month": 2, "day": 20} | ||||
90 | } | ||||
91 | ] | ||||
92 | }, | ||||
93 | { | ||||
94 | "navigationBarVisible" : false, | ||||
95 | "minimumDate": "2018-03-01", | ||||
96 | "maximumDate": "2018-03-31", | ||||
97 | "visibleMonth": 2, | ||||
98 | "visibleYear": 2018, | ||||
99 | "mode": "findDayOfWeek", | ||||
100 | "questionsExplicitlyGiven": false, | ||||
101 | "questionAnswers": { | ||||
102 | "length": 7 | ||||
103 | } | ||||
104 | }, | ||||
105 | { | ||||
106 | "navigationBarVisible" : false, | ||||
107 | "minimumDate": "2018-03-01", | ||||
108 | "maximumDate": "2018-03-31", | ||||
109 | "visibleMonth": 2, | ||||
110 | "visibleYear": 2018, | ||||
111 | "mode": "findDayOfWeek", | ||||
112 | "questionsExplicitlyGiven": true, | ||||
113 | "questionAnswers": [ | ||||
114 | { | ||||
115 | "question": qsTr("What day of week is the 4th of given month?"), | ||||
116 | "answer": {"dayOfWeek": 0} | ||||
117 | }, | ||||
118 | { | ||||
119 | "question": qsTr("What day of the week is the 12th of given month?"), | ||||
120 | "answer": {"dayOfWeek": 1} | ||||
121 | }, | ||||
122 | { | ||||
123 | "question": qsTr("What day of the week is the 20th of given month?"), | ||||
124 | "answer": {"dayOfWeek": 2} | ||||
125 | }, | ||||
126 | { | ||||
127 | "question": qsTr("What day of the week is the 28th of given month?"), | ||||
128 | "answer": {"dayOfWeek": 3} | ||||
129 | }, | ||||
130 | { | ||||
131 | "question": qsTr("What day of the week is the 22nd of given month?"), | ||||
132 | "answer": {"dayOfWeek": 4} | ||||
133 | }, | ||||
134 | { | ||||
135 | "question": qsTr("What day of the week is the 16th of given month?"), | ||||
136 | "answer": {"dayOfWeek": 5} | ||||
137 | }, | ||||
138 | { | ||||
139 | "question": qsTr("What day of the week is the 10th of given month?"), | ||||
140 | "answer": {"dayOfWeek": 6} | ||||
141 | } | ||||
142 | ] | ||||
143 | }, | ||||
144 | { | ||||
145 | "navigationBarVisible": false, | ||||
146 | "minimumDate": "2018-03-01", | ||||
147 | "maximumDate": "2018-03-31", | ||||
148 | "visibleMonth": 2, | ||||
149 | "visibleYear": 2018, | ||||
150 | "mode": "findDay", | ||||
151 | "questionsExplicitlyGiven": true, | ||||
152 | "questionAnswers": [ | ||||
153 | { | ||||
154 | "question": qsTr("Select a Monday between days 1 and 7 of given month"), | ||||
155 | "answer": {"year": 2018, "month": 2, "day": 5} | ||||
156 | }, | ||||
157 | { | ||||
158 | "question": qsTr("Select a Tuesday between days 8 and 16 of given month"), | ||||
159 | "answer": {"year": 2018, "month": 2, "day": 13} | ||||
160 | }, | ||||
161 | { | ||||
162 | "question": qsTr("Select a Wednesday between days 15 and 22 of given month"), | ||||
163 | "answer": {"year": 2018, "month": 2, "day": 21} | ||||
164 | }, | ||||
165 | { | ||||
166 | "question": qsTr("Select a Thursday between days 26 and 31 of given month"), | ||||
167 | "answer": {"year": 2018, "month": 2, "day": 29} | ||||
168 | }, | ||||
169 | { | ||||
170 | "question": qsTr("Select a Friday between days 20 and 25 of given month"), | ||||
171 | "answer": {"year": 2018, "month": 2, "day": 23} | ||||
172 | }, | ||||
173 | { | ||||
174 | "question": qsTr("Select a Saturday between days 13 and 23 of given month"), | ||||
175 | "answer": {"year": 2018, "month": 2, "day": 17} | ||||
176 | }, | ||||
177 | { | ||||
178 | "question": qsTr("Select a Sunday between days 5 and 17 of given month"), | ||||
179 | "answer": {"year": 2018, "month": 2, "day": 11} | ||||
180 | } | ||||
181 | ] | ||||
182 | }, | ||||
183 | { | ||||
184 | "navigationBarVisible" : false, | ||||
185 | "minimumDate": "2018-03-01", | ||||
186 | "maximumDate": "2018-03-31", | ||||
187 | "visibleMonth": 2, | ||||
188 | "visibleYear": 2018, | ||||
189 | "mode": "findDay", | ||||
190 | "questionsExplicitlyGiven": true, | ||||
191 | "questionAnswers": [ | ||||
192 | { | ||||
193 | "question": qsTr("Select a Monday between days 1 and 7 of given month"), | ||||
194 | "answer": {"year": 2018, "month": 2, "day": 5} | ||||
195 | }, | ||||
196 | { | ||||
197 | "question": qsTr("Select a Tuesday between days 8 and 16 of given month"), | ||||
198 | "answer": {"year": 2018, "month": 2, "day": 13} | ||||
199 | }, | ||||
200 | { | ||||
201 | "question": qsTr("Select a Wednesday between days 15 and 22 of given month"), | ||||
202 | "answer": {"year": 2018, "month": 2, "day": 21} | ||||
203 | }, | ||||
204 | { | ||||
205 | "question": qsTr("Select a Thursday between days 26 and 31 of given month"), | ||||
206 | "answer": {"year": 2018, "month": 2, "day": 29} | ||||
207 | }, | ||||
208 | { | ||||
209 | "question": qsTr("Select a Friday between days 20 and 25 of given month"), | ||||
210 | "answer": {"year": 2018, "month": 2, "day": 23} | ||||
211 | }, | ||||
212 | { | ||||
213 | "question": qsTr("Select a Saturday between days 13 and 23 of given month"), | ||||
214 | "answer": {"year": 2018, "month": 2, "day": 17} | ||||
215 | }, | ||||
216 | { | ||||
217 | "question": qsTr("Select a Sunday between days 5 and 17 of given month"), | ||||
218 | "answer": {"year": 2018, "month": 2, "day": 11} | ||||
219 | } | ||||
220 | ] | ||||
221 | } | ||||
222 | ] | ||||
223 | } |