Closed omiras closed 2 years ago
Expect to finish this issue today or tomorrow.
@fataranto @lisis What do you think about design? I am using Bootstrap default colors.
TODO: I will display here the current code for the evaluated variable so the user can check what is the result of the evaluation.
We're still working on the style guide so don't worry, once you have the functionality finished I can adapt the way the message is displayed
Description
We need to improve the feedback we give to the user after exercise code is executed.
Requirements
It would be a good idea, after executing the code, give a piece of information about what is just happened. The message could be in the bottom of the app, just below the Instructions and JavaScript Editor area. An easy way to implement this would be using Bootstrap's alert component:
https://getbootstrap.com/docs/5.0/components/alerts/
Exercise is correct
If the exercise is correct, display the evaluation of the exercise
User's code throws error
If the user's code generated a syntax or execution error, make him know
There is a place in the code where we can catch the exception's error. Have a look at checlLevelCorrect function.
Exercise not correct
If there is no error, but the exercise is not correct, make him know too.