Commit 512381bd by Kyle Fiedler

Fixed merge confilcts, hopefully

--HG--
branch : kf-refactor
parents 63ad756a a0abfe17
<%inherit file="main.html" />
<div id="topnav">
<ul>
<li id="current" style="border:none">
<a href="#" shape="rect">Home</a>
</li>
<li style="border:none">
<a href="/t/info.html" shape="rect">Course Info</a>
</li>
<li style="border:none">
<a href="/t/staff.html" shape="rect">Instructors</a>
</li>
<li style="border:none">
<a href="credits.html" shape="rect">Credits</a>
</li>
</ul>
</div>
<!-- end top wrapper -->
<div id="wrapper">
<div id="bg">
<div id="page">
<!-- begin container -->
<div id="container">
<!-- content -->
<div id="content">
<h1> Credits </h1>
<p> The team of instructors is Anant Agarwal, Piotr Mitros, Chris
Terman, and Gerald Sussman. Our intrepid team of TAs is
<p> The main codebase was crammed out in two months by Piotr
Mitros. Evgeny Fadeev helped integrate Askbot into the
system. Schematic entry and circuit simulation are by Chris
Terman. Jean-Michel Claus designed the applets. IT and infrastructure
are managed by Scott Bloomquist of TechSquare, Inc.</p>
<p> The codebase was made possible by Django, JQuery, JQueryUI,
MathJAX, swfobject, askbot, django-simplewiki, pyparsing, and the
original FancyBox. Graphic design and css started from a free template
from <a href="http://www.dotemplate.com/">dotemplate.com</a>, one of
the few, genuinely free template web sites (although you have to
e-mail the owner to find that out), and was heavily modified by Piotr
Mitros, and later, thoughtbot.</p>
<p> The system is running in the Amazon cloud, which allows us to hold up to anticipated loads. </p>
</div>
</div>
<div align="center">
<form onsubmit="return submit_circuit('${name}');" action="" method="post">
<!--input type="hidden" class="schematic" width="600" height="400" name="schematic" value="" /-->
${ circuit_line }
<input type="submit" value="save">
<input type="hidden" name="csrfmiddlewaretoken" id="csrfmiddlewaretoken">
</form>
</div>
Feedback from: ${ user }
url: ${ url }
time: ${ time }
Subject: ${ subject }
Feedback:
${ feedback }
......@@ -38,6 +38,7 @@ $(function() {
$.each($("[id^=li_]"), function(index,value){
submit_data[value.name]=value.value;
});
submit_data["remember"] = ($('#remember').attr("checked")? true : false);
postJSON('/login',
submit_data,
......
<%inherit file="main.html" />
<script>
$(function() {
/* Set up FancyBox pop-ups */
$("a#inline").fancybox({
'hideOnContentClick': false
});
// TODO: Clean up as per http://stackoverflow.com/questions/169506/obtain-form-input-fields-using-jquery
/* Handles when the user hits 'enroll'. Grabs form data. Does AJAX.
Either shows error, or shows success. */
$('#create_account_button').click(function() {
var submit_data={};
$.each($("[id^=ca_]"), function(index,value){
submit_data[value.name]=value.value;
});
$.each($("[id^=cb_]"), function(index,value){
submit_data[value.name]=value.checked;
});
postJSON('/create_account',
submit_data,
function(json) {
if(json.success) {
$('#enroll').html(json.value);
} else {
$('#enroll_error').html(json.value);
}
}
);
});
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
Either shows error, or redirects. */
$('#login_button').click(function() {
var submit_data={};
$.each($("[id^=li_]"), function(index,value){
submit_data[value.name]=value.value;
});
submit_data["remember"] = ($('#remember').attr("checked")? true : false);
postJSON('/login',
submit_data,
function(json) {
if(json.success) {
location.href="/courseware";
} else {
$('#login_error').html("Invalid Login");
}
}
);
});
$('#pwd_reset_button').click(function() {
$.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }",
"email" : $('#id_email').val()}, function(data){
$('#pwd_reset').html(data);
});
});
/* Activate stupid spinner drop-downs in enrollment form */
var spinner_array=$("[id^=spinner_]");
spinner_array.each(function(i) {
var s=spinner_array[i];
$("#"+s.id).click(function(){
$("#sregion"+s.id.substring(7)).toggle();
});
})
/*$("sregion"+$("[id^=spinner_]")[1].id.substring(7)) */
});
</script>
<div id="topWrapper">
<div id="topBanner"></div>
</div>
<div id="topnav">
<ul>
<li id="current" style="border:none">
<a href="#" shape="rect">Home</a>
</li>
<li style="border:none">
<a href="/t/info.html" shape="rect">Course Info</a>
</li>
<li style="border:none">
<a href="/t/staff.html" shape="rect">Instructors</a>
</li>
<li style="border:none">
<a href="/t/credits.html" shape="rect">Credits</a>
</li>
</ul>
</div>
<!-- end top wrapper -->
<div id="wrapper">
<div id="bg">
<div id="header"></div>
<div id="page">
<!-- begin container -->
<div id="container">
<!-- content -->
<div id="content">
<center>
<table>
<tr><td align=right><big><a id="inline" href="#enroll">Enroll &gt;&gt;</a><br><br><br>
<a id="inline" href="#login">Log In &gt;&gt;</a></big></td><td><div style="width:50px; float:center;"></div></td><td>
<div style="width:300px; float:center;">
Taught by Anant Agarwal, with Gerald Sussman, Piotr Mitros, and Chris
Terman, "6.002 Circuits and Electronics" is an an on-line adaption of
MIT's first undergraduate analog design course. This course will run,
free of charge, for students worldwide from February 1, 2012 through
July 1, 2012.
<br><br>Students who successfully complete the course will receive an
electronic certificate of accomplishment from MIT. Students will not
receive course credit, but students successfully finishing the course
will be well-placed to take an exam to pass out of 6.002 should they
ever enroll at MIT, and potentially, similar courses at other schools.
<br><br> In order to succeed in this course, students must have some
background in calculus and differential equations. Since more advanced
mathematics will not show up until the second half of the course, the
first half of the course will include an optional remedial
differential equations component for students with weaker math
backgrounds.
</div>
<div style="display:none"><div id="enroll" name="enroll"><%include file="create_account.html" /></div></div>
<div style="display:none"><div id="login"><%include file="login.html" /></div></div>
<div style="display:none"><div id="pwd_reset"><%include file="password_reset_form.html" /></div></div>
<div style="display:none"><div id="reset_done"></div></div>
</td></tr></table>
</div>
<!-- end content -->
</div>
<!-- end container -->
</div>
<div id="footerWrapper"></div>
</div>
</div>
......@@ -6,7 +6,7 @@
<tr><td colspan=2 align=center><div id="login_error"></div></td></tr>
<tr><td align=right>E-mail</td><td><input name="email" id="li_email" type="email" required> </td></tr>
<tr><td align=right>Password</td><td><input name="password" id="li_password" type="password" required> </td></tr>
<!--tr><td align=right><input name="remember" type="checkbox" value="remember"></td><td>Remember me </td></tr-->
<tr><td align=right><input name="remember" id="remember" type="checkbox"></td><td>Remember me </td></tr>
<tr><td align=right></td><td align=right><input name="submit" id="login_button" type="button" value="Log in"> </td></tr>
</form>
</td></tr></table>
......
......@@ -24,6 +24,15 @@
});
</script>
<script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script>
$(function() {
// Set up FancyBox pop-ups
$("a#inline").fancybox({
'hideOnContentClick': false
});
});
</script>
</head>
<body>
......@@ -31,10 +40,53 @@
${self.body()}
<footer>
<p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a>
<p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a> Please give us <a id="inline"
href="#feedback_div">feedback</a>. Try our <a id="inline"
href="#calculator_div">calculator</a>.
<!-- Template based on a design from http://www.dotemplate.com/ - Donated $10 (pmitros) so we don't need to include credit. -->
</p>
<div style="display:none"><div id="feedback_div">Found a bug? Got an
idea for improving our system? Let us know.
<br> Subject: <br><input id="feedback_subject" size=40>
<br> Feedback: <br><textarea id="feedback_message" cols="40" rows="5">
</textarea>
<br> <input id="feedback_button" type="button" value="Submit">
<script>$(function() {
$("#feedback_button").click(function(){
postJSON("/send_feedback", {"subject":$("#feedback_subject").attr("value"),
"url":document.URL,
"message":$("#feedback_message").attr("value")},
function(data){
$("#feedback_subject").attr("value","");
$("#feedback_message").attr("value","");
$("#feedback_div").html("Feedback submitted. Thank you");
});
});
});</script>
</div></div>
<div style="display:none"><div id="calculator_div">
<input id="calculator_input" > <input id="calculator_button" type=button value="=&gt;">
<input id="calculator_output" readonly>
<script>$(function() {
$("#calculator_button").click(function(){
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){
$("#calculator_output").attr("value",data.result);
});
});
});</script>
<br>
Supported operations: ^ * / + - || ()
<br>
Supported suffixes: %kMGTcmunp
</div></div>
<ul>
<li><a href="/s/help.html">Help</a></li>
<li><a href="/logout">Log out</a></li>
......
<!DOCTYPE html>
<html>
<head>
<title>MITX 6.002</title>
<link rel="stylesheet" href="/static/lib/jquery.treeview.css" type="text/css" media="all" />
<link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" />
<link href="/static/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/static/lib/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/static/lib/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/static/lib//swfobject/swfobject.js"></script>
<script type="text/javascript" src="/static/lib/jquery.treeview.js"></script>
<script type="text/javascript" src="/static/js/video_player.js"></script>
<script type="text/javascript" src="/static/js/schematic.js"></script>
<!-- Warning: Do not upgrade FancyBox. V2.0 is under a non-free CC license -->
<script type="text/javascript" src="/static/lib/fancybox/jquery.fancybox-1.3.4.js"></script>
<link rel="stylesheet" href="/static/lib/fancybox/jquery.fancybox-1.3.4.css">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["\\(","\\)"]],
displayMath: [["\\[","\\]"]]}
});
</script>
<script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script>
$(function() {
// Set up FancyBox pop-ups
$("a#inline").fancybox({
'hideOnContentClick': false
});
});
</script>
</head>
<body>
${self.body()}
<footer>
<p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a> Please give us <a id="inline"
href="#feedback_div">feedback</a>. Try our <a id="inline"
href="#calculator_div">calculator</a>.
<!-- Template based on a design from http://www.dotemplate.com/ - Donated $10 (pmitros) so we don't need to include credit. -->
</p>
<div style="display:none"><div id="feedback_div">Found a bug? Got an
idea for improving our system? Let us know.
<br> Subject: <br><input id="feedback_subject" size=40>
<br> Feedback: <br><textarea id="feedback_message" cols="40" rows="5">
</textarea>
<br> <input id="feedback_button" type="button" value="Submit">
<script>$(function() {
$("#feedback_button").click(function(){
postJSON("/send_feedback", {"subject":$("#feedback_subject").attr("value"),
"url":document.URL,
"message":$("#feedback_message").attr("value")},
function(data){
$("#feedback_subject").attr("value","");
$("#feedback_message").attr("value","");
$("#feedback_div").html("Feedback submitted. Thank you");
});
});
});</script>
</div></div>
<div style="display:none"><div id="calculator_div">
<input id="calculator_input" > <input id="calculator_button" type=button value="=&gt;">
<input id="calculator_output" readonly>
<script>$(function() {
$("#calculator_button").click(function(){
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){
$("#calculator_output").attr("value",data.result);
});
});
});</script>
<br>
Supported operations: ^ * / + - || ()
<br>
Supported suffixes: %kMGTcmunp
</div></div>
<ul>
<li><a href="/s/help.html">Help</a></li>
<li><a href="/logout">Log out</a></li>
</ul>
</footer>
</body>
</html>
......@@ -12,7 +12,11 @@ function ${ id }_load() {
postJSON('/modx/problem/${ id }/problem_check',
submit_data,
function(json) {
${ id }_load();
if(json['success'] == 'syntax')
alert('Syntax error');
else
${ id }_load();
});
log_event('problem_check', submit_data);
});
......
......@@ -45,9 +45,6 @@ $(function() {
}
});
$("a#inline").fancybox({
'hideOnContentClick': false
});
$('#change_password').click(function(){
$('#inline').trigger('click');
......
<%inherit file="main.html" />
<script>
var loc=true; // Activate on clicks? Not if already clicked.
var lang=true;
$(function() {
$("#change_location").click(function() {
log_event("profile", {"type":"location_show", "old":$("#location_sub").text()});
if(loc) {
$("#description").html('<div style="color:#FF0000">'+
"Preferred format is city, state, country (so for us, "+
"&quot;Cambridge, Massachusetts, USA&quot;), but give "+
"as much or as little detail as you want. </div>");
loc=false;
$("#location_sub").html('<input id="id_loc_text" type="text" name="loc_text" />'+
'<input type="button" id="change_loc_button" value="Change" />');
$("#change_loc_button").click(function() {
postJSON('/change_setting', {'location':$("#id_loc_text").attr("value")}, function(json) {
$("#location_sub").text(json.location);
loc=true;
$("#description").html("");
log_event("profile", {"type":"location_change", "new":json.location});
});
});
}
});
$("#change_language").click(function() {
log_event("profile", {"type":"language_show", "old":$("#language_sub").text()});
if(lang) {
lang=false;
$("#language_sub").html('<input id="id_lang_text" type="text" name="lang_text" />'+
'<input type="button" id="change_lang_button" value="Change" />');
$("#change_lang_button").click(function() {
postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) {
$("#language_sub").text(json.language);
lang=true;
$("#description").html("");
log_event("profile", {"type":"language_change", "new":json.language});
});
});
}
});
$('#change_password').click(function(){
$('#inline').trigger('click');
log_event("profile", {"type":"password_show"});
});
$('#pwd_reset_button').click(function() {
$.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }",
"email" : $('#id_email').val()}, function(data){
$('#pwd_reset').html(data);
log_event("profile", {"type":"password_send"});
});
});
})
</script>
<%include file="navigation.html" />
<section class="main-content">
<div class="profile-wrapper">
<section class="user-info">
<h1>${name}</h1>
<ul>
<li>Forum name: ${username}</li>
<li>E-mail: ${email}</li>
<li>Location: ${location}</li>
<li>Language: ${language}</li>
<li>Password: ********</li>
</ul>
<!-- <div><a href="#change_password_pop">Reset password</a></div> -->
<!-- hidden trigger for password -->
<div id="change_password_pop">
<h2>Password reset</h2>
<p>We'll e-mail you a password reset link at ${email}.</p>
<input id="id_email" type="hidden" name="email" maxlength="75" value="${email}" />
<input type="button" id="pwd_reset_button" value="Reset Password" />
</div>
</section>
<section class="course-info">
<h1>Course Progress</h1>
<!-- <div id="description"></div> -->
<ol>
% for hw in homeworks:
<li>
<h2>${ hw['chapter'] }</h2>
<h3>${ hw['section'] }</h3>
<ul>
% for score in hw['scores']:
<li>${ score[0] }/${ score[1] }</li>
% endfor
</ul>
</li>
% endfor
</ol>
</section>
</div>
</section>
<div align="center" id="div_wiki_circuit_${name}" class="div_wiki_circuit">
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment