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

Incorrect variables in the exercise_template view #98

Open
markkuriekkinen opened this issue Jan 11, 2021 · 4 comments
Open

Incorrect variables in the exercise_template view #98

markkuriekkinen opened this issue Jan 11, 2021 · 4 comments
Assignees
Labels
effort: hours The issue seems to be small and should be doable in hours or few days. experience: good first issue Good for newcomers priority: medium requester: internal The issue is raised by a person inside the A+ team type: bug This is a bug.

Comments

@markkuriekkinen
Copy link
Contributor

mooc-grader exercise_template view: wrong variable parameter, inner function has different variables:

if name == parameter:

@markkuriekkinen markkuriekkinen added type: bug This is a bug. experience: good first issue Good for newcomers priority: high Important issue effort: hours The issue seems to be small and should be doable in hours or few days. requester: internal The issue is raised by a person inside the A+ team labels Jan 11, 2021
@markkuriekkinen
Copy link
Contributor Author

Actually, parameter is used in the inner function, but it is defined in the outer function. Does Python support closures like that? I think I created this issue because the code crashed in my testing. It is important to also test non-existent files, i.e., when you try to download a template file that does not exist. Either it does not exist on the file system or it is not defined in the exercise config.yaml.

@jaguarfi
Copy link
Contributor

If the file does not exist the following message is shown
image

On the other hand, https://realpython.com/inner-functions-what-are-they-good-for/#closures-and-factory-functions

@jaguarfi
Copy link
Contributor

I was testing and this is what I got

image

image

@markkuriekkinen
Copy link
Contributor Author

@jaguarfi thanks, just to confirm, are you saying that you didn't find any problems in the code? That is fine. I may have messed up something myself in my testing. Let's leave the issue open so that I can take a look someday, but now this is not urgent anymore. Thanks for your effort!

@markkuriekkinen markkuriekkinen self-assigned this Jan 19, 2021
@markkuriekkinen markkuriekkinen added priority: medium and removed priority: high Important issue labels Jan 19, 2021
@markkuriekkinen markkuriekkinen removed this from the June 2021 Release v1.9 milestone Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: hours The issue seems to be small and should be doable in hours or few days. experience: good first issue Good for newcomers priority: medium requester: internal The issue is raised by a person inside the A+ team type: bug This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants