-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Autoformat Problem XBlock Source Files for Consistency (3/3) #37760
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
Merged
+1,440
−1,318
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,62 +1,61 @@ | ||
| {% load static %} | ||
| <div class="annotation-input"> | ||
| <div class="script_placeholder" data-src="{% static 'js/capa/annotationinput.js' %}"/> | ||
|
|
||
| <div class="annotation-header"> | ||
| {{ title|safe }} | ||
|
|
||
| {% if return_to_annotation %} | ||
| <a class="annotation-return" href="javascript:void(0)">Return to Annotation</a><br/> | ||
| {% endif %} | ||
| </div> | ||
| <div class="annotation-body"> | ||
|
|
||
| <div class="block block-highlight">{{ text|safe }}</div> | ||
| <div class="block block-comment">{{ comment|safe }}</div> | ||
|
|
||
| <div class="block">{{ comment_prompt|safe }}</div> | ||
| <textarea class="comment" id="input_{{ id }}_comment" name="input_{{ id }}_comment" aria-describedby="answer_{{ id }}">{{ comment_value|safe }}</textarea> | ||
|
|
||
| <div class="block" id="label_{{ id }}">{{ tag_prompt|safe }}</div> | ||
| <ul class="tags"> | ||
| {% for option in options %} | ||
| <li> | ||
| {% if has_options_value %} | ||
| {% if option.choice == status.classname and status == status.classname %} | ||
| <span class="tag-status {{ status.classname }}" aria-describedby="input_{{ id }}_comment"> | ||
| {% include "status_span.html" with status=status %} | ||
| </span> | ||
| {% endif %} | ||
| {% endif %} | ||
|
|
||
| <span class="tag | ||
| {% if option.id in options_value %} | ||
| selected | ||
| {% endif %} | ||
| " data-id="{{ option.id }}"> | ||
| {{ option.description|safe }} | ||
| </span> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| {% if debug %} | ||
| <div class="debug-value"> | ||
| Rendered with value:<br/> | ||
| <pre>{{ value|safe }}</pre> | ||
| Current input value:<br/> | ||
| <input type="text" class="value" name="input_{{ id }}" id="input_{{ id }}" value="{{ value }}" /> | ||
| <div class="script_placeholder" | ||
| data-src="{% static 'js/capa/annotationinput.js' %}" /> | ||
| <div class="annotation-header"> | ||
| {{ title|safe }} | ||
| {% if return_to_annotation %} | ||
| <a class="annotation-return" href="javascript:void(0)">Return to Annotation</a> | ||
| <br /> | ||
| {% endif %} | ||
| </div> | ||
| <div class="annotation-body"> | ||
| <div class="block block-highlight">{{ text|safe }}</div> | ||
| <div class="block block-comment">{{ comment|safe }}</div> | ||
| <div class="block">{{ comment_prompt|safe }}</div> | ||
| <textarea class="comment" | ||
| id="input_{{ id }}_comment" | ||
| name="input_{{ id }}_comment" | ||
| aria-describedby="answer_{{ id }}">{{ comment_value|safe }}</textarea> | ||
| <div class="block" id="label_{{ id }}">{{ tag_prompt|safe }}</div> | ||
| <ul class="tags"> | ||
| {% for option in options %} | ||
| <li> | ||
| {% if has_options_value %} | ||
| {% if option.choice == status.classname and status == status.classname %} | ||
| <span class="tag-status {{ status.classname }}" | ||
| aria-describedby="input_{{ id }}_comment"> | ||
| {% include "status_span.html" with status=status %} | ||
| </span> | ||
| {% endif %} | ||
| {% endif %} | ||
| <span class="tag {% if option.id in options_value %}selected{% endif %} " | ||
| data-id="{{ option.id }}">{{ option.description|safe }}</span> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| {% if debug %} | ||
| <div class="debug-value"> | ||
| Rendered with value: | ||
| <br /> | ||
| <pre>{{ value|safe }}</pre> | ||
| Current input value: | ||
| <br /> | ||
| <input type="text" | ||
| class="value" | ||
| name="input_{{ id }}" | ||
| id="input_{{ id }}" | ||
| value="{{ value }}" /> | ||
| </div> | ||
| {% else %} | ||
| <input type="hidden" | ||
| class="value" | ||
| name="input_{{ id }}" | ||
| id="input_{{ id }}" | ||
| value="{{ value }}" /> | ||
| {% endif %} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| <p id="answer_{{ id }}" class="answer answer-annotation"></p> | ||
| </div> | ||
| {% else %} | ||
| <input type="hidden" class="value" name="input_{{ id }}" id="input_{{ id }}" value="{{ value }}" /> | ||
| {% endif %} | ||
|
|
||
| {% include "status_span.html" with status=status status_id=id %} | ||
|
|
||
| <p id="answer_{{ id }}" class="answer answer-annotation"></p> | ||
| </div> | ||
| </div> | ||
|
|
||
| {% if msg %} | ||
| <span class="message" aria-describedby="label_{{ id }}" tabindex="-1">{{ msg|safe }}</span> | ||
| {% endif %} | ||
| {% if msg %}<span class="message" aria-describedby="label_{{ id }}" tabindex="-1">{{ msg|safe }}</span>{% endif %} |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,19 @@ | ||
| <div id="chemicalequationinput_{{ id }}" class="chemicalequationinput"> | ||
| <div class="script_placeholder" data-src="{{ previewer }}"/> | ||
|
|
||
| <div class="script_placeholder" data-src="{{ previewer }}" /> | ||
| <div class="{{ status.classname }}"> | ||
|
|
||
| <input type="text" name="input_{{ id }}" id="input_{{ id }}" aria-label="{{ response_data.label|striptags }}" | ||
| aria-describedby="answer_{{ id }}" data-input-id="{{ id }}" value="{{ value }}" | ||
| {% if size %} | ||
| size="{{ size }}" | ||
| {% endif %} | ||
| /> | ||
|
|
||
| <p class="indicator-container"> | ||
| {{ value }} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| </p> | ||
|
|
||
| <div id="input_{{ id }}_preview" class="equation"></div> | ||
| <p id="answer_{{ id }}" class="answer"></p> | ||
| </div> | ||
| <input type="text" | ||
| name="input_{{ id }}" | ||
| id="input_{{ id }}" | ||
| aria-label="{{ response_data.label|striptags }}" | ||
| aria-describedby="answer_{{ id }}" | ||
| data-input-id="{{ id }}" | ||
| value="{{ value }}" | ||
| {% if size %}size="{{ size }}"{% endif %} /> | ||
| <p class="indicator-container"> | ||
| {{ value }} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| </p> | ||
| <div id="input_{{ id }}_preview" class="equation"></div> | ||
| <p id="answer_{{ id }}" class="answer"></p> | ||
| </div> | ||
| </div> |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,46 +1,41 @@ | ||
| <div class="choicegroup capa_inputtype" id="inputtype_{{ id }}"> | ||
| <fieldset {{ describedby_html }}> | ||
| {% if response_data.label %} | ||
| <legend id="{{ id }}-legend" class="response-fieldset-legend field-group-hd">{{ response_data.label }}</legend> | ||
| {% endif %} | ||
| {% for description_id, description_text in response_data.descriptions.items %} | ||
| <p class="question-description" id="{{ description_id }}">{{ description_text|safe }}</p> | ||
| {% endfor %} | ||
| {% if response_data.label %} | ||
| <legend id="{{ id }}-legend" class="response-fieldset-legend field-group-hd">{{ response_data.label }}</legend> | ||
| {% endif %} | ||
| {% for description_id, description_text in response_data.descriptions.items %} | ||
| <p class="question-description" id="{{ description_id }}">{{ description_text|safe }}</p> | ||
| {% endfor %} | ||
| {% for choice_id, choice_label in choices %} | ||
| <div class="field"> | ||
| <input type="{{ input_type }}" name="input_{{ id }}{{ name_array_suffix }}" id="input_{{ id }}_{{ choice_id }}" | ||
| class="field-input input-{{ input_type }}{% if input_type == 'radio' and choice_id == value or input_type != 'radio' and choice_id in value %} submitted{% endif %}" value="{{ choice_id }}" | ||
| {# If the student selected this choice... #} | ||
| {% if input_type == 'radio' and choice_id == value or input_type != 'radio' and choice_id in value %} | ||
| checked="true" | ||
| {% elif input_type != 'radio' and choice_id in value %} | ||
| checked="true" | ||
| {% endif %} | ||
| /><label id="{{ id }}-{{ choice_id }}-label" for="input_{{ id }}_{{ choice_id }}" | ||
| class="response-label field-label label-inline{% if choice_id in value and status.classname and show_correctness != 'never' %} choicegroup_{{ status.classname }}{% endif %}" | ||
| {{ describedby_html }} | ||
| > | ||
| <div> | ||
| {{ choice_label|safe }} | ||
| <div class="field"> | ||
| <input type="{{ input_type }}" name="input_{{ id }}{{ name_array_suffix }}" id="input_{{ id }}_{{ choice_id }}" | ||
| class="field-input input-{{ input_type }}{% if input_type == 'radio' and choice_id == value or input_type != 'radio' and choice_id in value %} submitted{% endif %}" value="{{ choice_id }}" | ||
| {# If the student selected this choice... #} | ||
| {% if input_type == 'radio' and choice_id == value or input_type != 'radio' and choice_id in value %} | ||
| checked="true" | ||
| {% elif input_type != 'radio' and choice_id in value %} | ||
| checked="true" | ||
| {% endif %} | ||
| /> | ||
| <label id="{{ id }}-{{ choice_id }}-label" | ||
| for="input_{{ id }}_{{ choice_id }}" | ||
| class="response-label field-label label-inline{% if choice_id in value and status.classname and show_correctness != 'never' %} choicegroup_{{ status.classname }}{% endif %}" | ||
| {{ describedby_html }}> | ||
| <div>{{ choice_label|safe }}</div> | ||
| </label> | ||
| </div> | ||
| </label> | ||
| </div> | ||
| {% endfor %} | ||
| <span id="answer_{{ id }}"></span> | ||
| </fieldset> | ||
| <div class="indicator-container"> | ||
| {% if show_correctness != 'never' %} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| {% else %} | ||
| {% include "status_span.html" with status=status status_id=id hide_correctness=True %} | ||
| {% endfor %} | ||
| <span id="answer_{{ id }}"></span> | ||
| </fieldset> | ||
| <div class="indicator-container"> | ||
| {% if show_correctness != 'never' %} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| {% else %} | ||
| {% include "status_span.html" with status=status status_id=id hide_correctness=True %} | ||
| {% endif %} | ||
| </div> | ||
| {% if show_correctness == "never" %} | ||
| {% if value or status != "unsubmitted" %}<div class="capa_alert">{{ submitted_message|safe }}</div>{% endif %} | ||
| {% endif %} | ||
| </div> | ||
| {% if show_correctness == "never" %} | ||
| {% if value or status != "unsubmitted" %} | ||
| <div class="capa_alert">{{ submitted_message|safe }}</div> | ||
| {% endif %} | ||
| {% endif %} | ||
| {% if msg %} | ||
| <span class="message" aria-describedby="{{ id }}-legend" tabindex="-1">{{ msg|safe }}</span> | ||
| {% endif %} | ||
| </div> | ||
| {% if msg %}<span class="message" aria-describedby="{{ id }}-legend" tabindex="-1">{{ msg|safe }}</span>{% endif %} | ||
| </div> | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,72 +1,61 @@ | ||
| {% load i18n %} | ||
| {% load static %} | ||
|
|
||
| {% with element_checked=False %} | ||
| {% for choice_id, _ in choices %} | ||
| {% if choice_id in value %} | ||
| {% with element_checked=True %} | ||
| {% endwith %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| <section id="choicetextinput_{{ id }}" class="choicetextinput"> | ||
| <div class="choicetextgroup capa_inputtype" id="inputtype_{{ id }}"> | ||
| <div class="script_placeholder" data-src="{% static 'js/capa/choicetextinput.js' %}"/> | ||
|
|
||
| <fieldset aria-label="{{ response_data.label|striptags }}"> | ||
| {% for choice_id, choice_description in choices %} | ||
| <section id="forinput{{ choice_id }}" | ||
| {% if input_type == 'radio' and choice_id in value %} | ||
| {% if status.classname %} | ||
| class="choicetextgroup_{{ status.classname }}" | ||
| {% for choice_id, _ in choices %} | ||
| {% if choice_id in value %} | ||
| {% with element_checked=True %}{% endwith %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| <section id="choicetextinput_{{ id }}" class="choicetextinput"> | ||
| <div class="choicetextgroup capa_inputtype" id="inputtype_{{ id }}"> | ||
| <div class="script_placeholder" | ||
| data-src="{% static 'js/capa/choicetextinput.js' %}" /> | ||
| <fieldset aria-label="{{ response_data.label|striptags }}"> | ||
| {% for choice_id, choice_description in choices %} | ||
| <section id="forinput{{ choice_id }}" | ||
| {% if input_type == 'radio' and choice_id in value %} {% if status.classname %}class="choicetextgroup_{{ status.classname }}"{% endif %} | ||
| {% endif %}> | ||
| <input class="ctinput" | ||
| type="{{ input_type }}" | ||
| name="choiceinput_{{ id }}" | ||
| id="{{ choice_id }}" | ||
| value="{{ choice_id }}" | ||
| {% if choice_id in value %}checked="true"{% endif %} /> | ||
| {% for content_node in choice_description %} | ||
| {% if content_node.type == 'text' %} | ||
| <span class="mock_label">{{ content_node.contents }}</span> | ||
| {% else %} | ||
| {% with my_id=content_node.contents|default:'' %} | ||
| {% with my_val=value.my_id|default:'' %} | ||
| <input class="ctinput" | ||
| type="text" | ||
| name="{{ content_node.contents }}" | ||
| id="{{ content_node.contents }}" | ||
| value="{{ my_val }}" /> | ||
| {% endwith %} | ||
| {% endwith %} | ||
| {% endif %} | ||
| <span class="mock_label">{{ content_node.tail_text }}</span> | ||
| {% endfor %} | ||
| <p id="answer_{{ choice_id }}" class="answer"></p> | ||
| </section> | ||
| {% endfor %} | ||
| <span id="answer_{{ id }}"></span> | ||
| </fieldset> | ||
| <input class="choicetextvalue" | ||
| type="hidden" | ||
| name="input_{{ id }}{}" | ||
| id="input_{{ id }}" | ||
| value="{{ value }}" /> | ||
| <div class="indicator-container"> | ||
| {% if input_type == 'checkbox' or not value or status.classname == 'incomplete' or status.classname == 'unsubmitted' or status.classname == 'unanswered' %} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| {% endif %} | ||
| </div> | ||
| {% if show_correctness == "never" %} | ||
| {% if value or status != "unsubmitted" %}<div class="capa_alert">{{ submitted_message }}</div>{% endif %} | ||
| {% endif %} | ||
| > | ||
| <input class="ctinput" type="{{ input_type }}" name="choiceinput_{{ id }}" id="{{ choice_id }}" value="{{ choice_id }}" | ||
|
|
||
| {% if choice_id in value %} | ||
| checked="true" | ||
| {% endif %} | ||
| /> | ||
|
|
||
| {% for content_node in choice_description %} | ||
| {% if content_node.type == 'text' %} | ||
| <span class="mock_label"> | ||
| {{ content_node.contents }} | ||
| </span> | ||
| {% else %} | ||
| {% with my_id=content_node.contents|default:'' %} | ||
| {% with my_val=value.my_id|default:'' %} | ||
| <input class="ctinput" type="text" name="{{ content_node.contents }}" id="{{ content_node.contents }}" value="{{ my_val }}"/> | ||
| {% endwith %} | ||
| {% endwith %} | ||
| {% endif %} | ||
| <span class="mock_label"> | ||
| {{ content_node.tail_text }} | ||
| </span> | ||
|
|
||
| {% endfor %} | ||
| <p id="answer_{{ choice_id }}" class="answer"></p> | ||
| </section> | ||
|
|
||
| {% endfor %} | ||
| <span id="answer_{{ id }}"></span> | ||
| </fieldset> | ||
| <input class= "choicetextvalue" type="hidden" name="input_{{ id }}{}" id="input_{{ id }}" value="{{ value }}" /> | ||
|
|
||
| <div class="indicator-container"> | ||
| {% if input_type == 'checkbox' or not value or status.classname == 'incomplete' or status.classname == 'unsubmitted' or status.classname == 'unanswered' %} | ||
| {% include "status_span.html" with status=status status_id=id %} | ||
| {% endif %} | ||
| </div> | ||
|
|
||
| {% if show_correctness == "never" %} | ||
| {% if value or status != "unsubmitted" %} | ||
| <div class="capa_alert">{{ submitted_message }}</div> | ||
| {% endif %} | ||
| {% endif %} | ||
| {% if msg %} | ||
| <span class="message" tabindex="-1">{{ msg|safe }}</span> | ||
| {% endif %} | ||
| </div> | ||
| </section> | ||
| {% if msg %}<span class="message" tabindex="-1">{{ msg|safe }}</span>{% endif %} | ||
| </div> | ||
| </section> | ||
| {% endwith %} |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| <span class="clarification" tabindex="0" role="note" aria-label="Clarification"> | ||
| <span data-tooltip="{{ clarification }}" data-tooltip-show-on-click="true" | ||
| class="fa fa-info-circle" aria-hidden="true"></span> | ||
| <span class="clarification" | ||
| tabindex="0" | ||
| role="note" | ||
| aria-label="Clarification"> | ||
| <span data-tooltip="{{ clarification }}" | ||
| data-tooltip-show-on-click="true" | ||
| class="fa fa-info-circle" | ||
| aria-hidden="true"></span> | ||
| <span class="sr">({{ clarification }})</span> | ||
| </span> |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.