{{ extend 'layout.html'}}
<h1 style="text-align: center">Report a Bug</h1>
<p>Sorry you are having trouble. I want to hear about problems you are having but before send a bug report please look over the following list of common problems and solutions:</p>
<p>I can’t login, I can reset my password, but after that I can’t login again! This is definitely one of the most reported bugs. However in almost 100% of the cases so far, the problem is that you are using your email address as your username. When you registered you created a username, this is what you must use to login, not your email. IF you really are using the username you made and still having login problems then I want to hear from you.</p>
<p>Very often, problems with activecode or exercises can be resolved by reloading your page a couple of times, or by clearing your cache.</p>
<p>OK, now you are still running into some problem. Telling me that X does not work doesn’t really help. runestone.academy gets over 100,000 page views a day from people around the world. So most of the time when someone says “X does not work” it does in fact work fine for most people. This does not make it your fault, it just means I need more information to try to make sense of what is going on. Fill out the following form to submit an error report on Github so that I can fix the problem.</p>
<h3>Please Use Github if at all possible</h3>
<p><strong>It is much better for everyone if you report problem the directly on our</strong>
<a href="https://github.com/RunestoneInteractive/RunestoneServer/issues">github issues page</a>.</p>
<p>If you report a problem on the form below, we will see the report but you <strong>should not</strong> expect a response. More often
than not it is helpful for us to clarify the problem with you. Github is designed for this, and allows our many volunteer coders
to help squash bugs! If there are details provided, please copy them now and paste them on github.</p>
{{ if ticket: }}
<h3>Error Details</h3>
<pre>
{{=ticket}}
</pre>
{{ pass }}
<button onclick="$('#bugformwrapper').show(); $(this).hide()">Show Form</button>
<div id="bugformwrapper" style="display: none;">
{{if registered_user: }}
<p><strong>Warning:</strong> The information on this form will be posted to Github, but you will not receive any notifications or feedback about the report.</p>
<div class="col-md-7">
<form name="bugform" id="bugform" action="/{{=request.application}}/{{=request.controller}}/sendreport" method="post">
<div class="form-group row">
<div class="col-md-4" id="bugtitlediv">
<label for="bugtitle">Bug Title</label>
<input type="text" class='form-control' name="bugtitle" id="bugtitle" required/>
</div>
</div>
<p>Enter a short title that summarises the bug</p>
<div class="form-group row">
<div class="col-md-4" id="coursenamediv">
<label for="coursename">Course Name</label>
<input type="text" class='form-control' placeholder="thinkcspy, pythonds, or other" name="coursename" id="coursename" value="{{=course}}" required/>
</div>
</div>
<div class="form-group row" id="pagenamediv">
<div class="col-md-4">
<label for="pagename">Page URL</label>
<input type="text" class='form-control' placeholder="Page URL of the bug" name="pagename" id="pagename" value="{{=uri}}" required/>
</div>
</div>
<div class="form-group-row" id="userinfodiv">
<div class="col-md-12">
<label for="bookerror"></label>
<input type="checkbox" name="bookerror" id="bookerror"> Check this box if the bug is a typo, unclear passage, or other problem with the content of a book.
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label for="useremail">My Email</label>
<input type="text" class="form-control" name="useremail" id="useremail" value="{{=email}}"/>
<label for="username">My Username</label>
<input type="text" class="form-control" name="username" id="username" value="{{=username}}"/>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label for="bugdetails">Bug Details</label> <br/>
{{if ticket:}}
<textarea rows="4" cols="50" form="bugform" name="bugdetails" id="bugdetails" required>
Please describe what you were doing that led up to this error:
---------------- Traceback --------------
{{=ticket}}</textarea>
{{ else:}}
<textarea rows="4" cols="50" form="bugform" name="bugdetails" id="bugdetails" required></textarea>
{{ pass }}
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<input type="button" class="btn btn-default" onclick="check_filled(this.form)" value="Submit" />
</div>
</div>
</form>
</div>
<script>
function check_filled(formdata){
var bugtitle = formdata.bugtitle.value;
var coursename = formdata.coursename.value;
var pagename = formdata.pagename.value;
var username = formdata.username.value;
var useremail = formdata.useremail.value;
if (bugtitle == "" ){
var bugtitlediv = document.getElementById('bugtitlediv');
newp = document.createElement('p');
newp.innerHTML = 'This is a required field.';
newp.style = 'color: red';
bugtitlediv.appendChild(newp);
} else if (coursename == "None" || coursename == "") {
var coursenamediv = document.getElementById('coursenamediv');
newp = document.createElement('p');
newp.innerHTML = 'This is a required field.';
newp.style = 'color: red';
coursenamediv.appendChild(newp);
} else if (pagename == "None" || pagename == ""){
var pagenamediv = document.getElementById('pagenamediv');
newp = document.createElement('p');
newp.innerHTML = 'This is a required field.';
newp.style = 'color: red';
pagenamediv.appendChild(newp);
} else if (username == "" && useremail == ""){
var userinfodiv = document.getElementById('userinfodiv');
newp = document.createElement('p');
newp.innerHTML = 'Either a Username or an Email address is required.';
newp.style = 'color: red';
userinfodiv.appendChild(newp)
} else {
document.getElementById('bugform').submit();
}
}
</script>
{{pass}}
</div>