[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-edu-devel
Subject: D17945: Tutorial screen added for odd even activity
From: Johnny Jazeix <noreply () phabricator ! kde ! org>
Date: 2019-02-27 12:20:53
Message-ID: f1610c4aa11101c6df2b91e3f39ae65a () localhost ! localdomain
[Download RAW message or body]
[Attachment #2 (text/plain)]
jjazeix added inline comments.
INLINE COMMENTS
> TutorialBase.qml:32
> + property bool isEven: true
> + property bool isFirstCorrect: true
> +
I still don't understand why you need 2 bools?
isEven (should be renamed to isEvenExpected) is set to true if the question is \
"choose the even number". then, when you click on a button, if the number inside is \
even you should tell if it is good or not.
> TutorialBase.qml:69
> + message.text = qsTr("There is an error:" +
> + " when divided by 2, it leaves \
> remainder as 1." + + "Therefore this is \
> an odd number.")
missing space after the '.'?
> TutorialBase.qml:92
> + isCorrectAnswer: !isFirstCorrect
> + onPressed: {
> + if(!isCorrectAnswer) {
why is there 3 cases here and only one on the other button? Shouldn't they be \
"symetrical"?
> TutorialBase.qml:93
> + onPressed: {
> + if(!isCorrectAnswer) {
> + message.text = qsTr("There is an error:" +
The checks order seems not logical.
There is a check on !isCorrectAnswer to display a text and two lines below, if it's \
not even, the text changes directly. It would look more readable having:
if(isCorrect) {
}
else {
if(even) {
}
else {
}
}
REPOSITORY
R2 GCompris
REVISION DETAIL
https://phabricator.kde.org/D17945
To: dekumar, #gcompris_improvements, jjazeix
Cc: echarruau, amankumargupta, jjazeix, kde-edu, narvaez, apol
[Attachment #3 (text/html)]
<table><tr><td style="">jjazeix added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D17945">View Revision</a></tr></table><br \
/><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D17945#inline-108166">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">TutorialBase.qml:32</span></div> <div \
style="font: 11px/15px "Menlo", "Consolas", "Monaco", \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span \
style="color: #004012">property</span> <span style="color: #004012">bool</span> <span \
style="color: #aa4000">isEven:</span> <span style="color: #000a65">true</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, \
.6);"> <span style="color: #004012">property</span> <span style="color: \
#004012">bool</span> <span style="color: #aa4000">isFirstCorrect:</span> <span \
style="color: #000a65">true</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I \
still don't understand why you need 2 bools?<br /> isEven (should be renamed to \
isEvenExpected) is set to true if the question is "choose the even \
number".<br /> then, when you click on a button, if the number inside is even \
you should tell if it is good or not.</p></div></div><br /><div style="border: 1px \
solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D17945#inline-108167">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">TutorialBase.qml:69</span></div> <div \
style="font: 11px/15px "Menlo", "Consolas", "Monaco", \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #004012">message</span><span class="p">.</span><span \
style="color: #004012">text</span> <span style="color: #aa2211">=</span> <span \
style="color: #004012">qsTr</span><span class="p">(</span><span style="color: \
#766510">"There is an error:"</span> <span style="color: #aa2211">+</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, \
.6);"> <span style="color: #766510">" \
when divided by 2, it leaves remainder as 1."</span> <span style="color: \
#aa2211">+</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);"> <span \
style="color: #766510">"Therefore this is an odd number."</span><span \
class="p">)</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: \
8px;">missing space after the '.'?</p></div></div><br /><div style="border: \
1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D17945#inline-108170">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">TutorialBase.qml:92</span></div> <div \
style="font: 11px/15px "Menlo", "Consolas", "Monaco", \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #aa4000">isCorrectAnswer:</span> <span style="color: \
#aa2211">!</span><span style="color: #004012">isFirstCorrect</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #aa4000">onPressed:</span> <span class="p">{</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #aa4000">if</span><span class="p">(</span><span style="color: \
#aa2211">!</span><span style="color: #004012">isCorrectAnswer</span><span \
class="p">)</span> <span class="p">{</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">why \
is there 3 cases here and only one on the other button? Shouldn't they be \
"symetrical"?</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" \
href="https://phabricator.kde.org/D17945#inline-108169">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">TutorialBase.qml:93</span></div> <div \
style="font: 11px/15px "Menlo", "Consolas", "Monaco", \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #aa4000">onPressed:</span> <span class="p">{</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> \
<span style="color: #aa4000">if</span><span class="p">(</span><span style="color: \
#aa2211">!</span><span style="color: #004012">isCorrectAnswer</span><span \
class="p">)</span> <span class="p">{</span> </div><div style="padding: 0 8px; margin: \
0 4px; background: rgba(151, 234, 151, .6);"> <span \
style="color: #004012">message</span><span class="p">.</span><span style="color: \
#004012">text</span> <span style="color: #aa2211">=</span> <span style="color: \
#004012">qsTr</span><span class="p">(</span><span style="color: #766510">"There \
is an error:"</span> <span style="color: #aa2211">+</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">The \
checks order seems not logical.<br /> There is a check on !isCorrectAnswer to display \
a text and two lines below, if it's not even, the text changes directly.<br /> \
It would look more readable having:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if(isCorrect) { }
else {
if(even) {
}
else {
}
}</pre></div></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R2 GCompris</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D17945">https://phabricator.kde.org/D17945</a></div></div><br \
/><div><strong>To: </strong>dekumar, GCompris: Improvements, jjazeix<br /><strong>Cc: \
</strong>echarruau, amankumargupta, jjazeix, kde-edu, narvaez, apol<br /></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic