-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Quiz #1629
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
Quiz #1629
Conversation
Codecov Report
@@ Coverage Diff @@
## gamification #1629 +/- ##
===============================================
- Coverage 3.86% 3.7% -0.16%
===============================================
Files 151 157 +6
Lines 7587 7911 +324
Branches 710 726 +16
===============================================
Hits 293 293
- Misses 7277 7601 +324
Partials 17 17
Continue to review full report at Codecov.
|
app/build.gradle
Outdated
| releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY" | ||
| testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY" | ||
|
|
||
| implementation "com.google.dagger:dagger:$DAGGER_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.
App already uses dagger. :)
|
@tanvidadu Thanks for the pointer. :) I re-tested and the quiz works well for me, well done! 👍 One issue:
A few critiques for the UI:
To fix both of these, I think we should break up "More than %1$s of the images you uploaded have been deleted. If you carry on uploading images that require deletion, your account will likely be banned." "Would you like to view the tutorial again and then take a quiz to help you learn what type of images you should or shouldn't upload?"
Testing:Additionally, I think it would really help with the testing (and look good in your final blog post), if you could do a screencast walking people through the quiz steps.
|
misaochan
left a comment
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.
Additional spelling/whitespace comments
| private String url; | ||
| private String answerMessage; | ||
|
|
||
| QuizQuestion( int questionNumber, String question, String url, boolean answer, String answerMessage){ |
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.
Please ensure that you use consistent whitespaces. We don't use whitespaces before the first parameter of a method, and there is usually a whitespace between the ) and the {. Please check the rest of your code as well, as there are a few more instances of this. Thanks!
| * share the screenshot through social media | ||
| * @param bitmap | ||
| */ | ||
| void shareScreen ( Bitmap bitmap){ |
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.
Aaahhhh whitespaces.... ;)
| * to calculate the number of images reverted after previous quiz | ||
| * @param revertCountFetched | ||
| */ | ||
| private void setRevertParamter( int revertCountFetched){ |
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.
Parameter
| import timber.log.Timber; | ||
|
|
||
| /** | ||
| * to check whether to pop quiz or not |
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 would be good to have more detailed Javadocs, especially for classes - the reader should be able to have a fairly detailed idea of what the class does based on the Javadocs alone. For instance, see this example: http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#examples (I personally think that is a bit much, we certainly don't need 20+ line docs, lol. But more detail than the present is needed).
How about something like "Fetches the number of images the user has uploaded and the number of images reverted, in order to calculate the % of reverts. Then calls quiz if the revert parameter exceeds the required percentage."
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
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.
Needs Javadocs
|
|
||
| import java.io.File; | ||
| import java.io.FileOutputStream; | ||
|
|
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.
How about a Javadoc like "Displays the final page of the quiz, which congratulates user and shows them their quiz score"?
|
@misaochan I will work on these changes and update the pr :) thanks!
revertCount = total number of reverts( up till know) - number of reverts of the last quiz I will add checks for negative revertCount 👍 |
|
@misaochan @maskaravivek @nicolas-raoul @neslihanturan I have incorporated the suggested changes ! I will soon upload the video walking people through the quiz steps as mentioned above. |
|
I am actually undecided on which of the two looks better, haha! Would anyone like to weigh in? |
|
Well, second next button gives me feeling of something is missing. I think Taj Mahal UI is better than Nicolas selfie UI:) |
|
Any is fine I would say. |
app/src/main/res/values/strings.xml
Outdated
| <string name="quiz_question_string">Is this picture OK to upload?</string> | ||
| <string name="question">Question</string> | ||
| <string name="result">Result</string> | ||
| <string name="quiz_back_button">End quiz ? </string> |
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.
Ah, I just realized this string is displayed when the user tries to prematurely end the quiz. In that case I think more explanation is in order, perhaps "If you carry on uploading images that require deletion, your account will likely be banned. Are you sure you want to end the quiz?".
|
Great job, @tanvidadu ! I changed the title of your PR, as this isn't a WIP anymore. :) I'm happy to approve this PR pending the final change that I requested. We can merge this when @maskaravivek is back this week, if he approves it as well. It seems you are almost done with your GSoC, congratulations! :) I think the next steps would be to:
Is there anything else that we are missing? |
|
@tanvidadu I see that some of my comments are still unaddressed. :) Can you check the pending comments, especially the string resources thing? |
|
Sorry @maskaravivek I somehow missed them! |
* Quiz (#1629) * Layout inflated * Layout for mcq added * Inflated Basic Layout * Implemented basic flow * Added the basic implementation pf score * Added the result layout * Added the result layout * Added functionality to set result * Changed the launcher intent to Quiz Activity for testing purpose * Explanations of answers added * Improved the layout of quiz result a bit * Fixed some minor issues * Fixed build issues * Api Added and basic structure for calling implemented * Added intents * Added the title * Fixed image error and improved quality of pr * Made separate class for checking quiz * Added counter * Implemented back and next for quiz result * Added back functionality to quiz * Added progressBar * Fixed bugs * Improved code quality * Imporved code Quality * Updated strings * Added share screenshot function * Added checks and improved UI * Removed unused string * Removed unused string * Adding checks and improving code quality * Changed string * Improved code quality * Update strings.xml * Update MediaWikiApi.java * Fix build




Tutorial and Quiz
Fixes #274
Description (required)
Implemented a basic layout for the quiz
added functionality to calculate the score and display result
Implemented quiz and displayed answers with explanation
Displayed Congratulatory message as well as warnings
Implemented Counter and class to check the parameters to call quiz
Implemented back functionality for quiz
Added ProgressBar
Added functionality to share result
Tests performed (required)
Tested on betaDebug and ProdDebug
Screenshots showing what changed (optional)
{Only for user interface changes, otherwise remove this section. See how to take a screenshot}
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.