forked from apluslms/mooc-jutut
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regex search option for text searches
Allow user to select to use regex search for student form contents and teacher response. This is done by checking a checkbox by the field. Implement filter, field and widget that allow selecting between default search method and a regex search. Implement simple validation and error handling (also for exercise identifier, which didn't validate regex) for regex. Change form styling to use flex, so the checkbox and label can also be positioned well. Fix apluslms#87
- Loading branch information
Showing
4 changed files
with
181 additions
and
9 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
18 changes: 18 additions & 0 deletions
18
feedback/templates/feedback/widgets/combo_textsearch_widget.html
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% spaceless %} | ||
{% for widget in widget.subwidgets %} | ||
{% if not forloop.last %} | ||
{% include widget.template_name %} | ||
{% else %} | ||
<div> | ||
{% include widget.template_name %} | ||
<label{% if widget.attrs.id %} for="{{ widget.attrs.id }}"{% endif %} | ||
{% if widget.attrs.bool_helptext %} | ||
data-toggle="tooltip" data-placement="right" | ||
data-original-title="{{ widget.attrs.bool_helptext }}" | ||
{% endif %} | ||
> | ||
{{ widget.attrs.bool_label }} | ||
</label> | ||
</div> | ||
{% endif %} | ||
{% endfor %}{% endspaceless %} |