You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has_content doesn't allow to check if a substring is present. Either add contains_content or add substring search functionality to has_content.
Use case: Make exercises more personal and detecting plagiarism easier. Structure has to be there, but content can be different for each student e.g.
"Make mini website with an image, a paragraph of at least 50 characters and a table of 3 rows. If the image can't be displayed the text should contain the text "not found".
Add option to compare only plain text, removing all tags (also child tags). See example below.
If possible option with direct to only search in top level. See example below.
Add option to specify minimum or maximum characters the plain text tag should contain.
html=HtmlSuite(content)
body=html.element('body')
ol=body.get_child('ol', 0)
li0=ol.get_child('li', 0)
html.make_item("Het eerste lijstelement bevat de tekst 'Fruit' in het topniveau.",
li0.contains_content("fruit", case_insensitive=True, remove_tags=True, direct=True)) # Truehtml.make_item("Het eerste lijstelement bevat de tekst 'Peer' in het topniveau.",
li0.contains_content("peer", case_insensitive=True, remove_tags=True, direct=True)) # Falsehtml.make_item("Het eerste lijstelement bevat ergens de tekst 'Peer'.",
li0.contains_content("peer", case_insensitive=True, remove_tags=True, direct=False)) # True
The text was updated successfully, but these errors were encountered:
has_content
doesn't allow to check if a substring is present. Either addcontains_content
or add substring search functionality tohas_content
.Use case: Make exercises more personal and detecting plagiarism easier. Structure has to be there, but content can be different for each student e.g.
direct
to only search in top level. See example below.The text was updated successfully, but these errors were encountered: