-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ascending order activity #172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I did remarks but there is a more global point to fix. The activity like that is not really interesting for children, It would be better to discuss it with the mailing list (there are teachers who can provide good advices on pedagogic values) to know how we can improve the quality of it.
Johnny
prerequisite: qsTr("Move a mouse and click on the correct place") | ||
manual: qsTr("You are provided with few numbers. Click on the smallest number first, second smallest number second, and the largest number in the last") | ||
credit: "openclipart.org" | ||
section: qsTr("math") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have an exception for this line, you don't need the qsTr() here.
It also misses the createdInVersion value (8000)
*/ | ||
import QtQuick 2.1 | ||
import GCompris 1.0 | ||
import QtQuick.Window 2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need this?
anchors { | ||
horizontalCenter: parent.horizontalCenter | ||
} | ||
text: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to initialize the value with the default value
property int scale_factor: Screen.pixelDensity/default_pix_density | ||
Rectangle { | ||
property int imageX: 0 | ||
width: 360/4 * ApplicationInfo.ratio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 is the model size?
Repeater { | ||
id: boxes | ||
model: 4 | ||
property int scale_factor: Screen.pixelDensity/default_pix_density |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
* Copyright (C) 2016 Rudra Nil Basu <rudra.nil.basu.1996@gmail.com> | ||
* | ||
* Authors: | ||
* Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this line
} | ||
|
||
function printSorted() { | ||
for(var i=0;i<entered.length-1;i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a sort function in js directly
} | ||
} | ||
} | ||
for(i=0;i<entered.length;i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use Array.join()
Hi Rudra, I had a look to your number ordering activity. 1- It should have a ok button for the kid to confirm when he is ready to validate. http://doc.qt.io/qt-4.8/qml-flow.html 3- There should be options like in the web application to match to different ages. You can have a look to divyam categorisation to see how he manages settings. Good luck, Emmanuel |
Implemented draging and dropping of the blocks and shifting of the other blocks to it's correct position
Core changes are: * The size of the Blocks are now scaling with the change in screen size * the threshold distance changes with change in screen size * the tiles are now aligned in the center of the screen * the Rectangle containing the Flow resizes with change in screen size Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Previously, we could change the position of a tile even when the tile (or some other tiles) are still animating, thus creating conflicts in position. This is corrected by not accepting any onPressed or onReleased signals while the animation is still going on Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Changed the instruction of the activity. A possible bug was found when mouse input was taken into account even when the animation was still going on. This problem was reflected when the mouse was Released and the tile went to the previous location. This was solved by accepting the onPressed action only when the animation is over Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Previously, the mouse input was checked with whether the animations are completed and whether the input is valid or not to determine whether or not the current mouse input should be taken into consideration. Here, instead of doing that, the mouseArea is enabled and disabled based on the value of the above two variables, which is also set via the script with the following rules: 1. It is valid when the level starts 2. It is not valid when the ok button is pressed 3. It is valid again when the answer turns out to be the wrong one This should be much more intuitive and bug free as far as working with the mouse is concerned Sigend-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Added source of the icon on README (from openclipart) Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Updated the manual of the ActivityInfo.qml Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
@petitlapin @allon49 In the ascending order activity:
|
Hi, Thank you, Johnny |
difficulty: 2 | ||
icon: "ascending_order/ascending_order.svg" | ||
author: "Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>" | ||
demo: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this value should be true
demo: false | ||
title: qsTr("Ascending Order") | ||
description: qsTr("Arrange the given numbers in ascending order") | ||
//intro: "click on the numbers in ascending order" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update this. It corresponds to the intro voice that should be listened to explain the activity.
goal: qsTr("arranging numbers in ascending order") | ||
prerequisite: qsTr("Move, drag and drop using mouse") | ||
manual: qsTr("You are provided with few numbers. Drag and Drop the numbers in it's correct position to reorder the numbers in ascending order") | ||
credit: "openclipart.org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it is needed, we used the images in a lot of places.
|
||
import "../../core" | ||
import "ascending_order.js" as Activity | ||
import "qrc:/gcompris/src/core/core.js" as Core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
hi, Thank you |
@divyam3897 hi, the numbers will change the position (and the others will shift back or front) only when one tile is placed over another tile (not exactly over, a minimum distance is maintained). In that case, the dragged number will occupy the position of the tile on which it was dragged and the rest of them will get shifted accordingly. So, if a tile is dragged to the extreme corner, it crosses the minimum distance and hence it comes back to the original position. |
I did a screenshot for some cases.
|
|
Hi,
Divyam, did you do the screenshot while dragging?
Emmanuel
2017-03-01 17:55 GMT+01:00 Rudra Nil Basu <notifications@github.com>:
… @divyam3897 <https://github.com/divyam3897>
1.
I didn't get the first case. Do the tiles remain in that way
(separated by a space) after dropping a tile (after the mouse is released)?
In that case is there any specific way by which it can be reproduced? Also,
which number is being dragged in this case? Strange. This type of thing
never actually occurred to me.
2.
This one is okay. The 29 tile should be placed over the 74 tile in
order to change the positions. The minimum distance is less in this case
because had there been another tile on the left of 74, then the 29 tile
should have occupied that position. The aim is to place a tile over the
tile where it should belong.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#172 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHJUIOxRcGPzbbmqJUhxrWFeiGXCDJ6cks5rhaMNgaJpZM4LbEQo>
.
|
Added sub level score, which will display the current sublevel in which the player is currently present. Level changes: Previously on changing the levels from the arrow key, the current sib level was getting incremented. As of now, on clicking the left or right arrow keys, the current sub level is reset to zero and the current level is decremented or incremented accordingly. On winning, the current sub level is incremented. The ok button is repositioned above the bar, so that it doesn't get overriden by the bar when resized Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
@petitlapin Following changes were made:
|
@allon49 yes, In one case the card returned back after the screenshot and in the other it stayed there, creating an empty place. |
The sub level score is moved to the top right corner of the screen just after the instruction text to avoid getting hidden under the bar when the screen size is reduced Signed-off by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Repositioned the sub level score to avoid getting hidden
under the bar for small screen sizes.
The card coming back is normal, since it is not over any
other card and it is going outside the play area once
released, so the move is invalid and thus returns back
to the original position.
The card staying there is quite surprising. Does the
problem still persist ? Strange, I can't seem to
reproduce it in any way.
…On Thu, 2 Mar 2017, divyam3897 wrote:
@allon49 yes, In one case the card returned back after the screenshot and in the other it stayed there, creating an empty place.
@RudraNilBasu The sublevel count also may need to be repositioned? It gets hidden in case of small screen size http://pasteboard.co/Ey6QDoCx7.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.[AMJ3zw7lt7uvGrmmgK9rVOnFRbHsvIPMks5rhqpTgaJpZM4LbEQo.gif]
|
property alias flow: flow | ||
property alias container: container | ||
property real ratio: ApplicationInfo.ratio | ||
property Score score: score |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be an alias
demo: true | ||
title: qsTr("Ascending Order") | ||
description: qsTr("Arrange the given numbers in ascending order") | ||
// intro: "arrange the numbers in ascending order by placing a number in it's correct position" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its
|
||
var currentLevel = 0 | ||
var numberOfLevel = 4 | ||
var currentSubLevel = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can directly use score.currentSubLevel
var currentLevel = 0 | ||
var numberOfLevel = 4 | ||
var currentSubLevel = 0 | ||
var numberOfSubLevel = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can directly use score.numberOfSubLevels
|
||
var currentLevel = 0 | ||
var numberOfLevel = 4 | ||
var currentSubLevel = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should directly use Score currentSubLevel instead and remove the items.score.message assignment below
|
||
var currentLevel = 0 | ||
var numberOfLevel = 4 | ||
var currentSubLevel = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can directly use Score.currentSubLevel
|
||
var currentLevel = 0 | ||
var numberOfLevel = 4 | ||
var currentSubLevel = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can directly use the score for this instead of having 2 other variables
Used sub level from score instead of creating new variables. Fixed typing error in ActivityInfo.qml and used alias for the score in QObject Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Added arranging alphabetical order in it's ascending and descending order. Number of sub levels is increased to 4, each containing 2 ascending and 2 descending ordering sub-levels Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
@petitlapin Following changes were made:
|
The copyright option was not properly filled previously. It is now corrected with proper name and email address Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
Previously, the alphabets activity only contained a-z english alphabets. Now, it allows translation for different languages An array is maintained to store [qsTr("a")....qsTr("z")] and a random value is chosen from the array and then placed in the block Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
All the letters are now stored in the letters string separated by "/". Few other fixes, including the problem with boxes not changing positions when released on a nearby box Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
@petitlapin I have changed the alphabets activity to support various languages other than english.
with
|
icon: "alphabetical_order/alphabetical_order.svg" | ||
author: "Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>" | ||
demo: true | ||
title: "Alphabetical Order" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qsTr()
goal: qsTr("arranging alphabets in ascending or descending order as instructed") | ||
prerequisite: qsTr("Move, drag and drop using mouse") | ||
manual: qsTr("You are provided with few alphabets. Drag and Drop the alphabets in its correct position to reorder the numbers in ascending or descending order as instructed") | ||
section: "math" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reading
@@ -0,0 +1,30 @@ | |||
/* GCompris - alphabetical_order.qml | |||
* | |||
* Copyright (C) 2016 Rudra Nil Basu <rudra.nil.basu.1996@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2017
} | ||
} | ||
|
||
function generateRandomNumbers() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to be renamed more generic
import "../../core" | ||
import "../ascending_order" | ||
|
||
Ascending_order { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
camelCase (also for filename). Same for AlphabeticalOrder
} | ||
|
||
function initLevel() { | ||
ascendingOrder = items.score.currentSubLevel % 2 == 0 ? true : false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be checked on the mailing list (or at least with Emmanuel) but I wouldn't change every sublevel. It would not be efficient to understand the meaning behind ascending/descending order
|
||
if (mode == "alphabets") { | ||
//: list containing all the characters separated by a "/" | ||
var letters = qsTr("a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a help button showing the order could be nice.
there are many things to be sorted |
@allon49 if we do like that, we need to think of other activities where it could be applied to (not for this PR but it could be in the improvements section). With one generic submenu, if we manage to load datasets easily, then we can think of having the difficulty for each category instead at activity level (which would not make sense on this case as the activity level is more global than only a 2 years old span). |
Merged in ascending_order branch to continue the work |
Ascending order activity
Given few randomly generated numbers, user will have to click on the numbers in
ascending order.