-
Notifications
You must be signed in to change notification settings - Fork 29
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
Import task: Handle exercises without tests / model solution files #2503
Comments
A model-solution without files is not allowed by the schema and importing tests without files does not error anymore (there were some refactors in the meantime). |
For me, it still errors with 03c71f4 and openHPI/codeharbor@0863898. Here is an example I've exported from CodeHarbor: task_898.zip ![]() |
The problem with the mentioned task is a missing description, which is validated for |
Ah, right! I double-checked, and having a validation is enough to perform the import successfully. Then, yes, a more robust import would be great. I would also be fine to add a description (like the title) if missing. 😇 |
@kkoehn Feel free to set the description to the same value as the title (if the description is otherwise blank) and close this issue. Thanks! |
When importing a ProFormA task that contains a test but without a test file or alternatively a model solution without a model solution file, CodeOcean throws an error.
Most likely, the error is caused through these two lines:
codeocean/app/services/proforma_service/convert_task_to_exercise.rb
Line 68 in 1e08f2c
codeocean/app/services/proforma_service/convert_task_to_exercise.rb
Line 79 in 1e08f2c
Here, we are accessing the ID of the first file for both, but don't handle the case where no file exists.
The text was updated successfully, but these errors were encountered: