Closed silmer closed 1 year ago
This is an issue with AngularJS not ignoring expressions as it should. It is fixed by using ng-non-bindable. This can be added to the user pages that shows the assignments, but adding it to the admin pages where assignments are created might be a bit more difficult. I've raised an issue in cradmin-legacy about this which will hopefully solve the issue at its core rather than doing a big workaround.
This issue should be solved when cradmin_legacy
is upgraded to v4.1 as part of upgrading to Django 3.2 (issue #102).
Is this still happening after the Django3.2 update?
Is this still happening after the Django3.2 update?
As far as I can tell there isn't any parse error, and saving an assignment with that as an assignment description renders the assignment correctly. However, the preview function seems to discard the text so I guess it still isn't fully fixed.
Ended up with replacing the AceMarkdownWidget with a copy of DevilryCommentEditor. The bug is so ingrained inn how the AceMarkdownWidget is implemented inn cradmin that it is not easily fixable. Created a b14 release.
@Levijatan: the create new assignment function (/a/N/assignments/create
) broke with b14. There is an AttributeError at line 159 in trix/trix_admin/views/assignments.py
: 'NoneType' object has no attribute 'id'
.
Found that the AssignmentPreviewView expected an Assignment to already be saved to the db. So after fixing the AssignmentPreviewView not loading at all it started to crash the AssignmentCreateView and not actualy previewing the unsaved changes on the AssignmentUpdateView. So updated it use serialization and session storage to store the data for the preview instead of fetching it from the database. So now it actually previews changes and does not crash the create view. Created a b15 release.
@Levijatan: the error is fixed, but there seems to be a rendering issue with the editor.
Neither the assignment text or solution text are shown on the edit page. I'm however able to find their content among the elements (<devilry-comment-editor id="id_devilry_comment_editor" name="text" value="assignment text is here" (...)
and <devilry-comment-editor id="id_devilry_comment_editor" name="solution" value="and solution text is here" (...)
).
It doesn't render at all:
@torgeirl it was missing the .js files. setup.py just didn't include them. Released b16 with the missing files.
That solved it! :tada:
The following example was used in a task description form in Trix:
char [][] ordene ={{'H','A','B','D'}, {'M','V','Q','K'}, {'P','L','U','G'}, {'A','S','R','D'}};
Even with code tags, this leads to a parse error, see here.