Skip to content
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

Closed
BenHenning opened this issue May 10, 2020 · 8 comments · Fixed by #1059 or #4846
Closed

Solutions are not displayed correctly except for text and fraction input types #1050

BenHenning opened this issue May 10, 2020 · 8 comments · Fixed by #1059 or #4846
Assignees
Labels
Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

BenHenning commented May 10, 2020

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.

@BenHenning BenHenning added Type: Bug Priority: Essential This work item must be completed for its milestone. labels May 10, 2020
@aggarwalpulkit596
Copy link
Contributor

Hint will always be of type text right ? 🤔

@BenHenning
Copy link
Member Author

BenHenning commented May 28, 2020

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.

@BenHenning BenHenning added this to the Alpha milestone May 28, 2020
@BenHenning
Copy link
Member Author

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.

@veena14cs
Copy link
Contributor

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.

@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.

@seanlip
Copy link
Member

seanlip commented May 29, 2020

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.

@BenHenning
Copy link
Member Author

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 InteractionObject since they can reveal the answer for any interaction supported by the app. I suggest adding hints & a solution to each state of the prototype exploration as a testbed for verifying this functionality for each interaction that is supported in the app. I'd expect that some of those states would fail today (likely not a crash--I suspect that for non-fractions and non-text answers that the solution will show up as something like "0/0").

@BenHenning BenHenning assigned BenHenning and unassigned veena14cs Jul 8, 2020
@BenHenning
Copy link
Member Author

Pushing to beta since the current solution seems to work correctly for place values & multiplication topics that we're including in alpha.

@BenHenning
Copy link
Member Author

BenHenning commented Oct 20, 2021

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).

@BenHenning BenHenning modified the milestones: Beta, Beta MR1, Beta MR2 Jun 11, 2022
@Broppia Broppia added issue_type_bug Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). labels Jul 29, 2022
@BenHenning BenHenning added Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Z-ibt Temporary label for Ben to keep track of issues he's triaged. issue_user_learner labels Sep 15, 2022
@seanlip seanlip changed the title Solutions need to be generic to all interaction types Solutions are not displayed correctly except for text and fraction input types Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
5 participants