Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2acfd2

Browse files
author
NRU ITMO
committed
Auto check problem of type HTMLAcademy with #problem_check in url
1 parent bef1251 commit f2acfd2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

common/djangoapps/ifmo_mod/templates/htmlacademyinput.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<form id="inputtype_${id}" class="capa_inputtype">
1+
<section>
22

33
## TODO Hide navigation bars somehow else, scoped attribute wont be supported like so
44
<style type="text/css" scoped="scoped">
@@ -12,11 +12,22 @@
1212
<p>Go to <a href="http://htmlacademy.ru/courses/${course}/run/${task}" target="_blank">HTML Academy</a></p>
1313
</div>
1414

15+
<form id="inputtype_${id}" class="capa_inputtype">
16+
1517
<fieldset>
1618
<input type='hidden' id='input_${id}' name='input_${id}' value=''/>
1719
<input type='hidden' id='input_${id}_user' name='input_${id}_user' value='${userid}'/>
1820
</fieldset>
1921

2022
</form>
2123

24+
<script>
25+
$(function(){
26+
if(location.hash === '#problem_check') {
27+
setTimeout(function(){$('.check').trigger('click');}, 10);
28+
window.location.hash = '';
29+
}
30+
});
31+
</script>
2232

33+
</section>

0 commit comments

Comments
 (0)