-
Notifications
You must be signed in to change notification settings - Fork 528
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
Solutions are not displayed correctly except for text and fraction input types #1050
Comments
Hint will always be of type text right ? 🤔 |
#1059) * Update HintsAndSolutionAdapter.kt * Update HintsAndSolutionAdapter.kt
I don't think #1059 full solves this. The text being sent to the correct answer is still assuming that a solution has a numerator and denominator (that's only true for fractions--what about solutions for numeric input or multiple choice?). As far as I'm aware, hints can be any answer, which means those answers can correspond to any interaction type. |
Also, we should always use strings for formatting text like "/" (Android Studio gives a warning for these cases). We need to update hints to generically handle any interaction answer type, including non-text ones, and we should make sure the answer is formatted in a way that's understandable by the user. |
@BenHenning There are 2 types of correctAnswer one is object and one is string. Object corresponds to fractions based on json files in assets and rest all interaction types as well as other then fractions have correctAnswer type as string. |
Something seems a bit confused here. The bug title says "solutions" but the description talks about "hints". These are two different things. Hints are always in rich-text format. Solutions include an "answer" and an "explanation" component. The explanation is always in rich-text format. The type of the "answer" can vary, and it depends on the specific interaction in the corresponding question. The type of the answer would be the same as the type of the answer to the corresponding question (which is string in some cases, and other types of objects in other cases). In multiple-choice I think its an integer. You'll need to check the python definition files in the web codebase to figure out what the type for a particular interaction is. |
Thanks for pointing out the inconsistency in the description @seanlip -- I fixed that. This is only corresponding to solutions. @veena14cs as Sean mentioned, solutions are effectively an |
Pushing to beta since the current solution seems to work correctly for place values & multiplication topics that we're including in alpha. |
Note that this is becoming more of an issue now that we're launching more lessons. Solutions are currently broken for numeric interaction questions (see #3955 for an issue that came up partly because of the lack of generic type handling in solutions, and #3956 which is directly related to this issue). |
Per https://github.com/oppia/oppia-android/blob/65b1dc8/app/src/main/java/org/oppia/app/player/state/hintsandsolution/HintsAndSolutionAdapter.kt#L160 it seems that solutions are currently only supported for fractions whereas they should be supported for all interaction answer types.
The text was updated successfully, but these errors were encountered: