Repository: oppia/oppia

Issue:
[BUG]: Edits in practice questions do not show up after being updated
### Describe the bug

When I edit an uploaded practice question and click "update" to save my edits, the question pops up again. However, the changes/edits that I made are not visible. The question just looked how it originally did, before I even edited it. In the console, an error can be seen as shown in the attached screen recording. 

### Steps To Reproduce

1. Go to the reviewer dashboard.
2. Click "Review" on any question after going to "My Contributions"
3. Click "Edit" on the button on the page
4. Edit something, click "Update" afterwords
5. The question should pop up again, however with no edits 

### Expected Behavior

The updated question, with the edits, should be displayed, rather than the original question. 

### Screenshots/Videos


https://user-images.githubusercontent.com/113750776/212816672-2ff46ede-d99a-4554-a127-b0874a83cab1.mp4



### What device are you using?

Desktop

### Operating System

Windows

### What browsers are you seeing the problem on?

Chrome

### Browser version

Version 108.0.5359.126 

### Additional context

_No response_


Discussion:
@ViksarDubey Hello, are you able to expand the console error? Could you post a screenshot of what it shows? Thanks!
Sure thing! Here it is: 
![Capture13](https://user-images.githubusercontent.com/113750776/213078812-9b34fe50-587c-495d-9f71-4015b6337d96.JPG)

Note: moving to high impact since this completely breaks the practice questions review workflow (if the reviewers can't fix the question then they can't accept it, and most cards need edits).
I think I was able to reproduce it

```
ERROR:root:Exception raised at http://localhost:8181/updatequestionsuggestionhandler/skill.3wW1PYagsLtm.WzE2NzQ3NzQyNzU2MTNdWzEzMzQ1XQ==: Expected all answer groups to have destination as None.
Traceback (most recent call last):
  File "/var/folders/yz/fjzcwy6n67931ttmbnq24rzh0000gn/T/tmpL2IB9x/lib/python3.8/site-packages/webapp2.py", line 604, in dispatch
    return method(*args, **kwargs)
  File "/Users/hasitha/Documents/opensource/oppia/core/controllers/acl_decorators.py", line 4479, in test_can_update_suggestion
    return handler(self, suggestion_id, **kwargs)
  File "/Users/hasitha/Documents/opensource/oppia/core/controllers/suggestion.py", line 1088, in post
    suggestion_services.update_question_suggestion(
  File "/Users/hasitha/Documents/opensource/oppia/core/domain/suggestion_services.py", line 2071, in update_question_suggestion
    _update_suggestion(suggestion)
  File "/Users/hasitha/Documents/opensource/oppia/core/domain/suggestion_services.py", line 627, in _update_suggestion
    _update_suggestions([suggestion])
  File "/Users/hasitha/Documents/opensource/oppia/core/domain/suggestion_services.py", line 644, in _update_suggestions
    suggestion.validate()
  File "/Users/hasitha/Documents/opensource/oppia/core/domain/suggestion_registry.py", line 1008, in validate
    question.partial_validate()
  File "/Users/hasitha/Documents/opensource/oppia/core/domain/question_domain.py", line 1879, in partial_validate
    raise utils.ValidationError(
core.utils.ValidationError: Expected all answer groups to have destination as None.
ERROR:root:Exception raised: Expected all answer groups to have destination as None.
```

Can we get the server logs such that, this was the exact error that happened?
Hi @chris7716, I don't think this is the cause (though I'm not sure what you did to get that traceback). I tried editing one of the questions on oppia.org and the edit doesn't show up, but there's no console error at all. So I don't think this is a backend thing.

Are you able to edit questions locally (as a reviewer) with the edits subsequently showing up?

https://user-images.githubusercontent.com/41409951/215021166-3a90cf60-f4f4-45e5-98cf-d3b83043b4f8.mov

This is what I have done @seanlip I am not able to edit question suggestions


Hm, that's interesting, and honestly a bit odd. Not sure if this error and the current one are conflated but it's a clue we can follow. I think a good next step would be to see if you can figure out which answer group has a non-None destination and why? In the meantime @qinghaoyang and I can pursue other forms of replication.

Thanks @chris7716! 
Hi @seanlip, @chris7716. If `interaction.default_outcome.dest` is an empty string, the function will raise the "non-None destination" error mistakenly.
![image](https://user-images.githubusercontent.com/31307813/215285522-53b2de56-0eca-4e08-94fc-16d92830dc64.png)

After ignoring this backend error, the question can be updated successfully in the backend, which can be checked by refreshing the page. However, if I just click "Update", the change of texts will not show in the modal.

The edits could subsequently show up in dev mode.

https://user-images.githubusercontent.com/31307813/215286255-d41eef71-f2a4-43e6-8d76-f22309e787c1.mov



Resolving patch:
diff --git a/scripts/typescript_checks.py b/scripts/typescript_checks.py
--- a/scripts/typescript_checks.py
+++ b/scripts/typescript_checks.py
@@ -71,6 +71,7 @@
     'core/templates/components/interaction-display/interaction-display.component.ts',
     'core/templates/components/oppia-angular-root.component.spec.ts',
     'core/templates/components/oppia-angular-root.component.ts',
+    'core/templates/components/question-directives/question-editor/question-editor.component.ts',
     'core/templates/components/question-directives/questions-list/questions-list.component.spec.ts',
     'core/templates/components/question-directives/questions-list/questions-list.component.ts',
     'core/templates/components/shared-component.module.ts',


Test patch: