-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Frontend] Adding line offset for code problems #976
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anthonygego
requested changes
Oct 19, 2023
anthonygego
reviewed
Oct 20, 2023
anthonygego
reviewed
Nov 21, 2023
Can you rebase this PR so that only your commits appear here ? Otherwise it's pretty hard to review. |
A teacher could need to change the code lines offset in order to send back correct review when parsing student code into a template. Problem : changing the first_line parameter in the template_helper.render() function is effective only after restarting the server.
…rameter not defined
Was checking the value of data-x-first-line only for textareas with code-editor class. Now doing it in registerCodeEditor() function for every case.
…ubmit and apply it to the problem's code block
Was changing the firstline value into a integer or set it to 1 if it was not given. Was oing it outside the registerCodeEditor() function. But as it is used in other places this action wasn't performed each time. Doing this transformation inside the function now.
When the line offset was empty it was retrieved as an empty string. It couldn't be transformed into an integer so an error message appeared. Fixed that.
…ead of task_edit.py
…h default parameter
Rebase on 2e692aa. |
anthonygego
reviewed
Dec 8, 2023
Instead of setting it to 1 (default value) we do not store it Co-authored-by: Anthony Gégo <anthony.gego@uclouvain.be>
anthonygego
approved these changes
Dec 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the possibility through the task edit form to have a line offset for the code blocks in code problems. Adding a field to the form, checking it's value and applying the changes to the particular problem. An error will be displayed if the user inputs something other than a number.