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

MBS-6059: Remove obsolete features #62

Merged
merged 4 commits into from
Jul 24, 2022

Conversation

PhMemmel
Copy link
Member

@PhMemmel PhMemmel commented Jun 10, 2022

Closes #47
Closes #55

This is still a draft, there are some places in the code still using the xml we need to work around. They are currently marked with "TODO" comments

@PhMemmel PhMemmel marked this pull request as draft June 10, 2022 13:04
… validation and extraction of information on PHP side
@PhMemmel PhMemmel force-pushed the MBS-6059-Remove_obsolete_features branch from b3dd545 to 93da533 Compare June 12, 2022 09:10
@PhMemmel
Copy link
Member Author

I first tried to remove the XML completely, but realized it is being used to extract the information we need (result variables, feedback etc.) from the PHP side. I could not find a way to extract that from the base64 we are storing, because we do not have a PHP routine converting the base64 into a GGB xml. This can only be done by the JS GGB API. So for now I kept the XML in the frontend (JS, HTML) which is then being submitted to the PHP scripts which then extract all the necessary information, do the validations, calculate the mark etc.

However, I removed the XML storage as well as all the "GGB exercise" related code. The applet is only being injected via the base64 string from the database. As soon as this is loaded, the JS module extracts the XML via GGB JS API call into an HTML hidden input field which - when submitted - can be used to extract all the information from.

As a first approach I think this is fine. However, we could think about extracting all the necessary information in the JS module and create our own data structure there which then is being submitted to the PHP scripts. This would make the whole PHP structure much more easier and readable and we could make much more use of the GGB JS API itself for extracting the information we need. Any thoughts on this @mputzi and anyone else?

After some manual testing I think I did not screw up too much of the functionality by removing these things, so this would be a good step to continue the refactoring development.

@PhMemmel PhMemmel marked this pull request as ready for review June 12, 2022 09:53
@PhMemmel PhMemmel requested review from PM84 and removed request for PM84 June 12, 2022 09:53
@PhMemmel PhMemmel merged commit 9d566bd into develop Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant