-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a text post processing phase to the translator.
Macros or problems can add a hook by calling `add_content_post_processor` with a subroutine that will be called after the translator has processed answers. For all display modes except TeX, the subroutine will be passed the problem text parsed into a Mojo::DOM object and a reference to the header text. For the TeX display mode a reference to the problem text is passed. The subroutine can then modify the problem DOM or text, and header text. The resulting Mojo::DOM object will be converted back to a string and the problem text reference returned by the translator set to point to that string. Note that the `$PG_PROBLEM_TEXT_ARRAY_REF` has been removed from the translator code. It is never used and is redundant with the `$PG_PROBLEM_TEXT_REF` which is all that is used. It was becoming annoying to maintain both in a compatible manner. The hidden MathQuill inputs for the latex string is added in this post processing stage (see the ENDDOCUMENT method in PG.pl).
- Loading branch information
Showing
9 changed files
with
249 additions
and
231 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
answerInput.focus(); | ||
}); | ||
} else { | ||
answerLink.href = ''; | ||
answerLink.removeAttribute('href'); | ||
} | ||
}; | ||
|
||
|
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
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
Oops, something went wrong.