From 4550f63e2b4eb863b046c29fcf56a5ee97641caf Mon Sep 17 00:00:00 2001 From: pmitros Date: Thu, 8 Dec 2011 04:02:28 +0000 Subject: [PATCH 001/465] Initial commit --- Kirchhoff.html | 147 ++++++++++++++++++++ accordion.html | 28 ++++ accordion_bak.html | 70 ++++++++++ accordion_init.js | 1 + activation_complete.html | 3 + activation_email.txt | 9 ++ activation_email_subject.txt | 1 + activation_invalid.html | 5 + courseware.html | 41 ++++++ create_account.html | 66 +++++++++ homework.html | 10 ++ index.html | 155 ++++++++++++++++++++++ info.html | 75 +++++++++++ login.html | 16 +++ main.html | 25 ++++ password_reset_form.html | 8 ++ problem.html | 35 +++++ profile.html | 36 +++++ registration/activation_email.txt | 6 + registration/activation_email_subject.txt | 1 + registration/change_password.html | 55 ++++++++ registration/logged_out.html | 12 ++ registration/login.html | 28 ++++ registration/login_error.html | 0 registration/logout.html | 8 ++ registration/password_change_done.html | 15 +++ registration/password_change_form.html | 51 +++++++ registration/password_reset_complete.html | 9 ++ registration/password_reset_confirm.html | 25 ++++ registration/password_reset_done.html | 9 ++ registration/password_reset_email.html | 14 ++ registration/password_reset_form.html | 8 ++ registration/reg_complete.html | 3 + registration/registration_complete.html | 8 ++ registration/registration_form.html | 58 ++++++++ staff.html | 80 +++++++++++ tab_module.html | 14 ++ tab_module.js | 16 +++ using.html | 13 ++ vert_module.html | 7 + video.html | 31 +++++ video_init.js | 4 + 42 files changed, 1206 insertions(+) create mode 100644 Kirchhoff.html create mode 100644 accordion.html create mode 100644 accordion_bak.html create mode 100644 accordion_init.js create mode 100644 activation_complete.html create mode 100644 activation_email.txt create mode 100644 activation_email_subject.txt create mode 100644 activation_invalid.html create mode 100644 courseware.html create mode 100644 create_account.html create mode 100644 homework.html create mode 100644 index.html create mode 100644 info.html create mode 100644 login.html create mode 100644 main.html create mode 100755 password_reset_form.html create mode 100644 problem.html create mode 100644 profile.html create mode 100644 registration/activation_email.txt create mode 100644 registration/activation_email_subject.txt create mode 100644 registration/change_password.html create mode 100644 registration/logged_out.html create mode 100644 registration/login.html create mode 100644 registration/login_error.html create mode 100644 registration/logout.html create mode 100644 registration/password_change_done.html create mode 100644 registration/password_change_form.html create mode 100755 registration/password_reset_complete.html create mode 100755 registration/password_reset_confirm.html create mode 100755 registration/password_reset_done.html create mode 100755 registration/password_reset_email.html create mode 100755 registration/password_reset_form.html create mode 100644 registration/reg_complete.html create mode 100644 registration/registration_complete.html create mode 100644 registration/registration_form.html create mode 100644 staff.html create mode 100644 tab_module.html create mode 100644 tab_module.js create mode 100644 using.html create mode 100644 vert_module.html create mode 100644 video.html create mode 100644 video_init.js diff --git a/Kirchhoff.html b/Kirchhoff.html new file mode 100644 index 0000000000..541644d1e6 --- /dev/null +++ b/Kirchhoff.html @@ -0,0 +1,147 @@ +

Kirchhoff's circuit laws

+
From Wikipedia, the free encyclopedia. See original page for copyright and attribution
+

Kirchhoff's current law (KCL)

+
+
+
The current entering any junction is equal to the current leaving that junction. i1 + i4 = i2 + i3
+
+
+

This law is also called Kirchhoff's first law, Kirchhoff's point rule, Kirchhoff's junction rule (or nodal rule), and Kirchhoff's first rule.

+

The principle of conservation of electric charge implies that:

+
+
At any node (junction) in an electrical circuit, the sum of currents flowing into that node is equal to the sum of currents flowing out of that node. +
+
+
+
+
+
+
+
+
+
+
+
or
+
+
+
+
+
+
+
+
+
+
+
+
+
The algebraic sum of currents in a network of conductors meeting at a point is zero.
+
+

Recalling that current is a signed (positive or negative) quantity reflecting direction towards or away from a node, this principle can be stated as:

+
+
\sum_{k=1}^n {I}_k = 0
+
+

n is the total number of branches with currents flowing towards or away from the node.

+

This formula is valid for complex currents:

+
+
\sum_{k=1}^n \tilde{I}_k = 0
+
+

The law is based on the conservation of charge whereby the charge (measured in coulombs) is the product of the current (in amperes) and the time (in seconds).

+

Changing charge density

+

KCL is only valid if the charge density remains constant at the point to which it is applied. Consider the current entering a single plate of a capacitor. If one imagines a closed surface around that single plate, current enters through the surface, but does not exit, thus violating KCL. Certainly, the currents through a closed surface around the entire capacitor will meet KCL since the current entering one plate is balanced by the current exiting the other plate, and that is usually all that is important in circuit analysis, but there is a problem when considering just one plate. Another common example is the current in an antenna where current enters the antenna from the transmitter feeder but no current exits from the other end.(Johnson and Graham, pp.36-37)

+

Maxwell introduced the concept of displacement currents to describe these situations. The current flowing into a capacitor plate is equal to the rate of accumulation of charge and hence is also equal to the rate of change of electric flux due to that charge (electric flux is measured in the same units, Coulombs, as electric charge in the SI system of units). This rate of change of flux, \psi \ , is what Maxwell called displacement current ID;

+
+
I_\mathrm D = \frac {d \psi}{d t}
+
+

When the displacement currents are included, Kirchhoff's current law once again holds. Displacement currents are not real currents in that they do not consist of moving charges, they should be viewed more as a correction factor to make KCL true. In the case of the capacitor plate, the real current entering the plate is exactly cancelled by a displacement current leaving the plate and heading for the opposite plate.

+

This can also be expressed in terms of vector field quantities by taking the divergence of Ampere's law with Maxwell's correction and combining with Gauss's law, yielding:

+
+
\nabla \cdot \mathbf{J} = -\nabla \cdot \frac{\partial \mathbf{D}}{\partial t} = -\frac{\partial \rho}{\partial t}
+
+

This is simply the charge conservation equation (in integral form, it says that the current flowing out of a closed surface is equal to the rate of loss of charge within the enclosed volume (Divergence theorem)). Kirchhoff's current law is equivalent to the statement that the divergence of the current is zero, true for time-invariant p, or always true if the displacement current is included with J.

+

Uses

+

A matrix version of Kirchhoff's current law is the basis of most circuit simulation software, such as SPICE.

+

[edit] Kirchhoff's voltage law (KVL)

+
+
+
+
+The sum of all the voltages around the loop is equal to zero. v1 + v2 + v3 - v4 = 0
+
+
+

This law is also called Kirchhoff's second law, Kirchhoff's loop (or mesh) rule, and Kirchhoff's second rule.

+

The principle of conservation of energy implies that

+
+
The directed sum of the electrical potential differences (voltage) around any closed circuit is zero. +
+
+
+
+
+
+
+
+
+
+
+
or
+
+
+
+
+
+
+
+
+
+
+
+
+
More simply, the sum of the emfs in any closed loop is equivalent to the sum of the potential drops in that loop. +
+
+
+
+
+
+
+
+
+
+
+
or
+
+
+
+
+
+
+
+
+
+
+
+
+
The algebraic sum of the products of the resistances of the conductors and the currents in them in a closed loop is equal to the total emf available in that loop.
+
+

Similarly to KCL, it can be stated as:

+
+
\sum_{k=1}^n V_k = 0
+
+

Here, n is the total number of voltages measured. The voltages may also be complex:

+
+
\sum_{k=1}^n \tilde{V}_k = 0
+
+

This law is based on the conservation of "energy given/taken by potential field" (not including energy taken by dissipation). Given a voltage potential, a charge which has completed a closed loop doesn't gain or lose energy as it has gone back to initial potential level.

+

This law holds true even when resistance (which causes dissipation of energy) is present in a circuit. The validity of this law in this case can be understood if one realizes that a charge in fact doesn't go back to its starting point, due to dissipation of energy. A charge will just terminate at the negative terminal, instead of positive terminal. This means all the energy given by the potential difference has been fully consumed by resistance which in turn loses the energy as heat dissipation.

+

To summarize, Kirchhoff's voltage law has nothing to do with gain or loss of energy by electronic components (resistors, capacitors, etc.). It is a law referring to the potential field generated by voltage sources. In this potential field, regardless of what electronic components are present, the gain or loss in "energy given by the potential field" must be zero when a charge completes a closed loop.

+

Electric field and electric potential

+

Kirchhoff's voltage law could be viewed as a consequence of the principle of conservation of energy. Otherwise, it would be possible to build a perpetual motion machine that passed a current in a circle around the circuit.

+

Considering that electric potential is defined as a line integral over an electric field, Kirchhoff's voltage law can be expressed equivalently as

+
+
\oint_C \mathbf{E} \cdot d\mathbf{l} = 0,
+
+

which states that the line integral of the electric field around closed loop C is zero.

+

In order to return to the more special form, this integral can be "cut in pieces" in order to get the voltage at specific components.

+

Limitations

+

This is a simplification of Faraday's law of induction for the special case where there is no fluctuating magnetic field linking the closed loop. Therefore, it practically suffices for explaining circuits containing only resistors and capacitors.

+

In the presence of a changing magnetic field the electric field is not conservative and it cannot therefore define a pure scalar potential-the line integral of the electric field around the circuit is not zero. This is because energy is being transferred from the magnetic field to the current (or vice versa). In order to "fix" Kirchhoff's voltage law for circuits containing inductors, an effective potential drop, or electromotive force (emf), is associated with each inductance of the circuit, exactly equal to the amount by which the line integral of the electric field is not zero by Faraday's law of induction.

diff --git a/accordion.html b/accordion.html new file mode 100644 index 0000000000..2b09b49644 --- /dev/null +++ b/accordion.html @@ -0,0 +1,28 @@ +<%def name="make_chapter(chapter)"> +

${chapter['name']}

+
+ +
+ + +% for chapter in toc: + ${make_chapter(chapter)} +% endfor diff --git a/accordion_bak.html b/accordion_bak.html new file mode 100644 index 0000000000..9ac10a5764 --- /dev/null +++ b/accordion_bak.html @@ -0,0 +1,70 @@ +

Using the System

+
+ +
+ +

Basic Circuit Analysis

+
+ +
+

Digital Systems

+
+ +
+

Nonlinear Elements

+
+ +
+

Analog Amplification

+
+ +
+

Capacitors and Inductors

+
+ +
+

Operational Amplifiers

+
+ +
+

Applications

+
+ +
+ diff --git a/accordion_init.js b/accordion_init.js new file mode 100644 index 0000000000..7dbf05e8f5 --- /dev/null +++ b/accordion_init.js @@ -0,0 +1 @@ +$("#accordion").accordion({active:${ active_chapter }}); diff --git a/activation_complete.html b/activation_complete.html new file mode 100644 index 0000000000..2fba0f56ca --- /dev/null +++ b/activation_complete.html @@ -0,0 +1,3 @@ +

Activation Complete

+ +

Now go log in and try the course! diff --git a/activation_email.txt b/activation_email.txt new file mode 100644 index 0000000000..d61da883a2 --- /dev/null +++ b/activation_email.txt @@ -0,0 +1,9 @@ +Someone, hopefully you, signed up for an account for MIT's on-line +offering of 6.002 using this email address. If it was you, and you'd +like to activate and use your account, copy and paste this address +into your web browser's address bar: + +http://${ site }/activate/${ key } + +If you didn't request this, you don't need to do anything; you won't +receive any more email from us. diff --git a/activation_email_subject.txt b/activation_email_subject.txt new file mode 100644 index 0000000000..bbe04cd341 --- /dev/null +++ b/activation_email_subject.txt @@ -0,0 +1 @@ +Your account for MIT's on-line 6.002 diff --git a/activation_invalid.html b/activation_invalid.html new file mode 100644 index 0000000000..7c37581a26 --- /dev/null +++ b/activation_invalid.html @@ -0,0 +1,5 @@ +

Activation Invalid

+ +

Something went wrong. Did you already activate the account? If so, +go log in and try the course. Otherwise, e-mail us to +let us know what happened. diff --git a/courseware.html b/courseware.html new file mode 100644 index 0000000000..d0ab055e01 --- /dev/null +++ b/courseware.html @@ -0,0 +1,41 @@ +<%inherit file="main.html" /> + + + + + +
+
+${accordion} +
+
<
<
<
Digital Textbook + +Discussion + +Profile + +Help +Log out +
+ +${content} +
diff --git a/create_account.html b/create_account.html new file mode 100644 index 0000000000..47dceb5159 --- /dev/null +++ b/create_account.html @@ -0,0 +1,66 @@ +

+
+<% + if 'error' in locals(): + e = error +%> + + + + + + + + + + + + + + + + + + + +
+ +
Username
E-mail
Password
Full name
Location
Preferred Language
I agree to the Terms of +Service
I agree +to:
+
+Not engage in any activities that would dishonestly improve my +results, or improve or hurt those of others +

+Never post answers to problems +

+Maintain only one account +

+ +
+
+
diff --git a/homework.html b/homework.html new file mode 100644 index 0000000000..6e5a83b15e --- /dev/null +++ b/homework.html @@ -0,0 +1,10 @@ +

${ homework['name']}

+ +% for problem in homework['problems']: +

${ problem['name'] }

+ ${ problem['html'] } +
+ + +% endfor + diff --git a/index.html b/index.html new file mode 100644 index 0000000000..cbbd39d78f --- /dev/null +++ b/index.html @@ -0,0 +1,155 @@ +<%inherit file="main.html" /> + + +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
Enroll >>


+Log In >>
+
+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. + +

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. + +

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. + +
+ +
<%include file="create_account.html" />
+
<%include file="login.html" />
+
<%include file="password_reset_form.html" />
+
+ + +
+ + + +
+ +
+ +
+
+
+
+
+ +
diff --git a/info.html b/info.html new file mode 100644 index 0000000000..9f4498a2a8 --- /dev/null +++ b/info.html @@ -0,0 +1,75 @@ +<%inherit file="main.html" /> +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+

About 6.002

+ +

6.002 is designed to serve as a first course in an undergraduate +electrical engineering (EE), or electrical engineering and computer +science (EECS) curriculum. At MIT, 6.002 is in the core of department +subjects required for all undergraduates in EECS. + +

The course introduces engineering in the context of the lumped +circuit abstraction. Topics covered include: resistive elements and +networks; independent and dependent sources; switches and MOS +transistors; digital abstraction; amplifiers; energy storage elements; +dynamics of first- and second-order networks; design in the time and +frequency domains; and analog and digital circuits and +applications. Design and lab exercises are also significant components +of the course. 6.002 is worth 4 Engineering Design Points. The 6.002 +content was created collaboratively by Profs. Anant Agarwal and +Jeffrey H. Lang. + +

The course uses the textbook Foundations of Analog and Digital +Electronic Circuits. Agarwal, Anant, and Jeffrey H. Lang. San Mateo, +CA: Morgan Kaufmann Publishers, Elsevier, July 2005. ISBN: +9781558607354. While recommended, the book is not required -- relevant +section will be provided electronically as part of the on-line course. + +

+ + + +
+ +
+ +
+
+
+
+
+ +
diff --git a/login.html b/login.html new file mode 100644 index 0000000000..040f7b4418 --- /dev/null +++ b/login.html @@ -0,0 +1,16 @@ + + ${ error } +
+ + + + + + +
+
+
E-mail
Password
+
+ +
+
diff --git a/main.html b/main.html new file mode 100644 index 0000000000..580bef8c74 --- /dev/null +++ b/main.html @@ -0,0 +1,25 @@ + + + + MIT World 6.002 + + + + + + + + + + + + + + + +${self.body()} + +
Copyright © 2011. Massachusetts Institute of Technology. Some rights reserved.
+ + + diff --git a/password_reset_form.html b/password_reset_form.html new file mode 100755 index 0000000000..0e22c6e02a --- /dev/null +++ b/password_reset_form.html @@ -0,0 +1,8 @@ +

Password reset

+ +

Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.

+ +
+ +

+
diff --git a/problem.html b/problem.html new file mode 100644 index 0000000000..b416adcc54 --- /dev/null +++ b/problem.html @@ -0,0 +1,35 @@ +

${ problem['name'] }

+ ${ problem['html'] } +
+ + + + + + diff --git a/profile.html b/profile.html new file mode 100644 index 0000000000..418bd44e4f --- /dev/null +++ b/profile.html @@ -0,0 +1,36 @@ +<%inherit file="main.html" /> + +
Digital Textbook + +Discussion + +Profile + +Help +Log out +
+
+
+



+

${name}

+ + + +
Username:${username}
E-mail:${email}
Location:${location}
Language:${language}
+

Course Status

+ + % for hw in homeworks: + + % endfor +
${ hw['chapter'] }/ ${ hw['section'] }   + % for score in hw['scores']: + ${ score[0] }/${ score[1] } + % endfor +
+
+











+











+











+











+ +
diff --git a/registration/activation_email.txt b/registration/activation_email.txt new file mode 100644 index 0000000000..b594cd22d3 --- /dev/null +++ b/registration/activation_email.txt @@ -0,0 +1,6 @@ +{% load humanize %} +Someone, hopefully you, signed up for a new account at djangoproject.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar: + +http://127.0.0.1:8000/accounts/activate/{{ activation_key }}/ + +If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in {{ expiration_days|apnumber }} days. diff --git a/registration/activation_email_subject.txt b/registration/activation_email_subject.txt new file mode 100644 index 0000000000..8ec5ec4413 --- /dev/null +++ b/registration/activation_email_subject.txt @@ -0,0 +1 @@ +Activate your djangoproject.com account - you have {{ expiration_days }} days! diff --git a/registration/change_password.html b/registration/change_password.html new file mode 100644 index 0000000000..5a2036d1dc --- /dev/null +++ b/registration/change_password.html @@ -0,0 +1,55 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_modify adminmedia %} +{% load url from future %} +{% block extrahead %}{{ block.super }} +{% url 'admin:jsi18n' as jsi18nurl %} + +{% endblock %} +{% block extrastyle %}{{ block.super }}{% endblock %} +{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %} +{% block breadcrumbs %}{% if not is_popup %} + +{% endif %}{% endblock %} +{% block content %}
+
{% csrf_token %}{% block form_top %}{% endblock %} +
+{% if is_popup %}{% endif %} +{% if form.errors %} +

+ {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} +

+{% endif %} + +

{% blocktrans with original.username as username %}Enter a new password for the user {{ username }}.{% endblocktrans %}

+ +
+ +
+ {{ form.password1.errors }} + {# TODO: get required class on label_tag #} + {{ form.password1 }} +
+ +
+ {{ form.password2.errors }} + {# TODO: get required class on label_tag #} + {{ form.password2 }} +

{% trans 'Enter the same password as above, for verification.' %}

+
+ +
+ +
+ +
+ + +
+
+{% endblock %} diff --git a/registration/logged_out.html b/registration/logged_out.html new file mode 100644 index 0000000000..d339ef0a49 --- /dev/null +++ b/registration/logged_out.html @@ -0,0 +1,12 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} + +

{% trans "Thanks for spending some quality time with the Web site today." %}

+ +

{% trans 'Log in again' %}

+ +{% endblock %} diff --git a/registration/login.html b/registration/login.html new file mode 100644 index 0000000000..70e58965a4 --- /dev/null +++ b/registration/login.html @@ -0,0 +1,28 @@ +{% extends "registration/base.html" %} + +{% block title %}Log in{% endblock %} + +{% block content %} + +

Log in

+ +{% if form.errors %} +

Please correct the errors below:

+{% endif %} + +
+{% csrf_token %} +
+
{% if form.username.errors %} {{ form.username.errors|join:", " }}{% endif %}
+
{{ form.username }}
+
{% if form.password.errors %} {{ form.password.errors|join:", " }}{% endif %}
+
{{ form.password }}
+
+
+
+{% endblock %} + +{% block content-related %} +

If you don't have an account, you can sign +up for one. +{% endblock %} diff --git a/registration/login_error.html b/registration/login_error.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/registration/logout.html b/registration/logout.html new file mode 100644 index 0000000000..3275d2e1b4 --- /dev/null +++ b/registration/logout.html @@ -0,0 +1,8 @@ +{% extends "registration/base.html" %} + +{% block title %}Logged out{% endblock %} + +{% block content %} +

You've been logged out.

+

Thanks for stopping by; when you come back, don't forget to log in again.

+{% endblock %} \ No newline at end of file diff --git a/registration/password_change_done.html b/registration/password_change_done.html new file mode 100644 index 0000000000..0c0690d5e2 --- /dev/null +++ b/registration/password_change_done.html @@ -0,0 +1,15 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% load url from future %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %}{% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block breadcrumbs %}{% endblock %} + +{% block title %}{% trans 'Password change successful' %}{% endblock %} + +{% block content %} + +

{% trans 'Password change successful' %}

+ +

{% trans 'Your password was changed.' %}

+ +{% endblock %} diff --git a/registration/password_change_form.html b/registration/password_change_form.html new file mode 100644 index 0000000000..23d6c1d8af --- /dev/null +++ b/registration/password_change_form.html @@ -0,0 +1,51 @@ +{% extends "admin/base_site.html" %} +{% load i18n adminmedia %} +{% load url from future %} +{% block extrastyle %}{{ block.super }}{% endblock %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %} {% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block breadcrumbs %}{% endblock %} + +{% block title %}{% trans 'Password change' %}{% endblock %} + +{% block content %}
+ +
{% csrf_token %} +
+{% if form.errors %} +

+ {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} +

+{% endif %} + +

{% trans 'Password change' %}

+ +

{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}

+ +
+ +
+ {{ form.old_password.errors }} + {{ form.old_password }} +
+ +
+ {{ form.new_password1.errors }} + {{ form.new_password1 }} +
+ +
+{{ form.new_password2.errors }} + {{ form.new_password2 }} +
+ +
+ +
+ +
+ + +
+
+ +{% endblock %} diff --git a/registration/password_reset_complete.html b/registration/password_reset_complete.html new file mode 100755 index 0000000000..0338ce57b0 --- /dev/null +++ b/registration/password_reset_complete.html @@ -0,0 +1,9 @@ +{% load i18n %} + +

Password reset complete

+ +{% block content %} + +Your password has been set. You may go ahead and log in now. + +{% endblock %} diff --git a/registration/password_reset_confirm.html b/registration/password_reset_confirm.html new file mode 100755 index 0000000000..dea7e8a2d3 --- /dev/null +++ b/registration/password_reset_confirm.html @@ -0,0 +1,25 @@ +{% block content %} + +{% if validlink %} + +

Enter new password

+ +

Please enter your new password twice so we can verify you typed it in correctly.

+ +
{% csrf_token %} +{{ form.new_password1.errors }} +

{{ form.new_password1 }}

+{{ form.new_password2.errors }} +

{{ form.new_password2 }}

+

+
+ +{% else %} + +

Password reset unsuccessful

+ +

The password reset link was invalid, possibly because it has already been used. Please request a new password reset.

+ +{% endif %} + +{% endblock %} diff --git a/registration/password_reset_done.html b/registration/password_reset_done.html new file mode 100755 index 0000000000..dabca10cc9 --- /dev/null +++ b/registration/password_reset_done.html @@ -0,0 +1,9 @@ +{% block title %}Password reset successful{% endblock %} + +{% block content %} + +

Password reset successful

+ +

We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.

+ +{% endblock %} diff --git a/registration/password_reset_email.html b/registration/password_reset_email.html new file mode 100755 index 0000000000..de9dc79c52 --- /dev/null +++ b/registration/password_reset_email.html @@ -0,0 +1,14 @@ +{% load i18n %}{% load url from future %}{% autoescape off %} +{% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %} +{% endblock %} +{% trans "Your username, in case you've forgotten:" %} {{ user.username }} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} diff --git a/registration/password_reset_form.html b/registration/password_reset_form.html new file mode 100755 index 0000000000..4d73ff8c3a --- /dev/null +++ b/registration/password_reset_form.html @@ -0,0 +1,8 @@ +

Password reset

+ +

Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.

+ +
{% csrf_token %} +{{ form.email.errors }} +

{{ form.email }}

+
diff --git a/registration/reg_complete.html b/registration/reg_complete.html new file mode 100644 index 0000000000..256146f3b4 --- /dev/null +++ b/registration/reg_complete.html @@ -0,0 +1,3 @@ +

Check your email

+

An activation link has been sent to ${ email }, along with +instructions for activating your account.

diff --git a/registration/registration_complete.html b/registration/registration_complete.html new file mode 100644 index 0000000000..9f0cea41db --- /dev/null +++ b/registration/registration_complete.html @@ -0,0 +1,8 @@ +{% extends "registration/base.html" %} + +{% block title %}Registration complete{% endblock %} + +{% block content %} +

Check your email

+

An activation link has been sent to the email address you supplied, along with instructions for activating your account.

+{% endblock %} \ No newline at end of file diff --git a/registration/registration_form.html b/registration/registration_form.html new file mode 100644 index 0000000000..1e9d630639 --- /dev/null +++ b/registration/registration_form.html @@ -0,0 +1,58 @@ +{% extends "registration/base.html" %} + +{% block title %}Sign up{% endblock %} + +{% block content %} + + {% if form.errors %} +

Please correct the errors below: {{ form.non_field_errors }}

+ {% endif %} + +

Create an account

+ +
+{% csrf_token %} +

+ + {% if form.username.errors %} +

{{ form.username.errors.as_text }}

+ {% endif %} + {{ form.username }} +

+

+ + {% if form.email.errors %} +

{{ form.email.errors.as_text }}

+ {% endif %} + {{ form.email }} +

+

+ + {% if form.password1.errors %} +

{{ form.password1.errors.as_text }}

+ {% endif %} + {{ form.password1 }} +

+

+ + {% if form.password2.errors %} +

{{ form.password2.errors.as_text }}

+ {% endif %} + {{ form.password2 }} +

+

+
+ +{% endblock %} + +{% block content-related %} +

Fill out the form to the left (all fields are required), and your +account will be created; you'll be sent an email with instructions on how +to finish your registration.

+ +

We'll only use your email to send you signup instructions. We hate spam +as much as you do.

+ +

This account will let you log into the ticket tracker, claim tickets, +and be exempt from spam filtering.

+{% endblock %} diff --git a/staff.html b/staff.html new file mode 100644 index 0000000000..cb5fe8b426 --- /dev/null +++ b/staff.html @@ -0,0 +1,80 @@ +<%inherit file="main.html" /> +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+ + + + + + + + + + + +

About the course staff

Anant Agarwal is Director the MIT's Computer Science and Artificial +Intelligence Laboratory. His research focus is in parallel computer +architectures, and he is the founder of several successful +startups. Most recently, he founded Tilera, which produces scalable +multicore embedded processors. He co-author the course textbook +"Foundations of Analog and Digital Electronic Circuits."

Chris Terman is Co-Director MIT CSAIL, and a highly regarded +instructor. He is the author of JSim, an educational package for +on-line circuit schematic entry and simulation, and XTutor, and +on-line question-and-answer tutoring system.

Gerald Sussman is a Professor of Electrical Engineering at MIT. He +is a well know educator in the computer science community, perhaps +best know as the author of Structure and Interpretation of Computer +Programs, which is universally acknowledged as one of the top ten +textboooks in computer science, or as the creator of Scheme, a popular +teaching language. His research spans a range of topics, from +artifical intelligence, to physics and chaotic systems, to +supercomputer design.

Piotr Mitros is a Research Scientist at MIT. His research focus is +in finding ways to apply techniques from control systems to optimizing +the learning process. Piotr has worked as an analog designer at Texas +Instruments, Talking Lights, and most recently, designed the analog +front end for a novel medical imaging modality for Rhythmia Medical.

+ + + +
+ +
+ +
+
+
+
+
+ +
diff --git a/tab_module.html b/tab_module.html new file mode 100644 index 0000000000..e33f0caa74 --- /dev/null +++ b/tab_module.html @@ -0,0 +1,14 @@ +
+
    + % for t in tabs: +
  • ${t[0]} + % endfor +
+ +% for t in tabs: +
+ ${t[1]['content']} +
+% endfor + +
diff --git a/tab_module.js b/tab_module.js new file mode 100644 index 0000000000..4733e91021 --- /dev/null +++ b/tab_module.js @@ -0,0 +1,16 @@ +var tab_funcs=[] + +## We'd like to refresh the contents of tabs when they're shown again, but this probably +## isn't the way +## % for t in tabs: +## % if 'js' in t[1]: +## tab_funcs.push(function(){ ${t[1]['js']} }); +## % else: +## tab_funcs.push(function(){}); +## % endif +## % endfor + + +$("#tabs").tabs({select:function(event, ui){ +## tab_funcs[ui.index](); + }}); diff --git a/using.html b/using.html new file mode 100644 index 0000000000..39f21146b5 --- /dev/null +++ b/using.html @@ -0,0 +1,13 @@ +

Using the system

+ + diff --git a/vert_module.html b/vert_module.html new file mode 100644 index 0000000000..a50c9b2c8e --- /dev/null +++ b/vert_module.html @@ -0,0 +1,7 @@ +
+% for t in items: +
+ ${t[1]['content']} +
+% endfor +
diff --git a/video.html b/video.html new file mode 100644 index 0000000000..d4bb6463d1 --- /dev/null +++ b/video.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + +
+
+ You need Flash player 8+ and JavaScript enabled to view this video. +
+ +
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
+
0.75x 1x 1.25x 1.5x
diff --git a/video_init.js b/video_init.js new file mode 100644 index 0000000000..c51af43ef7 --- /dev/null +++ b/video_init.js @@ -0,0 +1,4 @@ +var captions=0; +$("#slider").slider({slide:function(event,ui){seek_slide('slide',event.originalEvent,ui.value);}, + stop:function(event,ui){seek_slide('stop',event.originalEvent,ui.value);}}); +loadNewVideo('${id}'); From f130fb5dadae3728140a51a53acae9c8ca056b94 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Thu, 8 Dec 2011 09:33:41 -0500 Subject: [PATCH 002/465] Problem now displays check vs. reset properly --- problem.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/problem.html b/problem.html index b416adcc54..0222f57a82 100644 --- a/problem.html +++ b/problem.html @@ -29,7 +29,10 @@ }); }); +% if not done: - +% else: + +% endif From 24df4a0bc901750d3e187e3619efd542310b8b13 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Fri, 9 Dec 2011 10:23:25 -0500 Subject: [PATCH 003/465] Sequential has basic functionality. JavaScript needs to be fixed. --- seq_module.html | 27 +++++++++++++++++++++++++++ seq_module.html~ | 7 +++++++ seq_module.js | 43 +++++++++++++++++++++++++++++++++++++++++++ seq_module.js~ | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 seq_module.html create mode 100644 seq_module.html~ create mode 100644 seq_module.js create mode 100644 seq_module.js~ diff --git a/seq_module.html b/seq_module.html new file mode 100644 index 0000000000..7d60188c94 --- /dev/null +++ b/seq_module.html @@ -0,0 +1,27 @@ +
+ + + + + + + + + + + + + + + + +
This is content
+ + +
+ %for t in items: +
+ ${t[1]['content']} +
+ %endfor +
diff --git a/seq_module.html~ b/seq_module.html~ new file mode 100644 index 0000000000..a50c9b2c8e --- /dev/null +++ b/seq_module.html~ @@ -0,0 +1,7 @@ +
+% for t in items: +
+ ${t[1]['content']} +
+% endfor +
diff --git a/seq_module.js b/seq_module.js new file mode 100644 index 0000000000..040f8ef89d --- /dev/null +++ b/seq_module.js @@ -0,0 +1,43 @@ +var files=["", + %for t in items: + ${t[1]['content']} , + %endfor + "" + ]; + +var loc; + +function goto(i) { + $('#content').html(files[i]); + loc=i; +} + +function setup_click(i) { + $.get(i+'.html', function(data){ + files[i]=data; + }) + $('#tt_'+i).click(function(eo) { goto(i);}); +} + +function next() { + loc=loc+1; + if(loc>10) loc=10; + goto(loc); +} + +function prev() { + loc=loc-1; + if(loc<1) loc=1; + goto(loc); +} + +$(function() { + var i; + for(i=1; i<11; i++) { + setup_click(i); + } + $('#next').click(function(eo) { next();}); + $('#prev').click(function(eo) { prev();}); + }); + +$('#debug').text('loaded'); \ No newline at end of file diff --git a/seq_module.js~ b/seq_module.js~ new file mode 100644 index 0000000000..b38df10a7e --- /dev/null +++ b/seq_module.js~ @@ -0,0 +1,38 @@ +files=["1.html", "2.html", "3.html", "4.html", "5.html", "6.html", "7.html", "8.html", "9.html", "10.html"]; + +var loc; + +function goto(i) { + $('#content').html(files[i]); + loc=i; +} + +function setup_click(i) { + $.get(i+'.html', function(data){ + files[i]=data; + }) + $('#tt_'+i).click(function(eo) { goto(i);}); +} + +function next() { + loc=loc+1; + if(loc>10) loc=10; + goto(loc); +} + +function prev() { + loc=loc-1; + if(loc<1) loc=1; + goto(loc); +} + +$(function() { + var i; + for(i=1; i<11; i++) { + setup_click(i); + } + $('#next').click(function(eo) { next();}); + $('#prev').click(function(eo) { prev();}); + }); + +$('#debug').text('loaded'); \ No newline at end of file From 2fbe6bd34f66e9fe723f7dd6dc1b7fc1e788ad2e Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Fri, 9 Dec 2011 11:45:04 -0500 Subject: [PATCH 004/465] AJAX problems work --- problem.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/problem.html b/problem.html index 0222f57a82..76e56c6311 100644 --- a/problem.html +++ b/problem.html @@ -22,8 +22,9 @@ } }); } else /* if 'Reset' */ { + // Possible cleanup: Move from getJSON to just load $.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) { - location.reload(true); // TODO: Reimplement with AJAX. + $('#main_${ id }').html(json); }); } }); From 7b578b835a2e94e94ef5a1aba7f4fffe8baa8cd6 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Sun, 11 Dec 2011 15:57:23 -0500 Subject: [PATCH 005/465] X Module fully refactored --- create_account.html | 10 ++++++-- problem.html | 2 -- profile.html | 59 ++++++++++++++++++++++++++++++++++++++------- seq_module.html | 27 ++++++--------------- seq_module.js | 8 ++---- video.html | 16 ++++-------- video_init.js | 4 +++ 7 files changed, 76 insertions(+), 50 deletions(-) diff --git a/create_account.html b/create_account.html index 47dceb5159..a210ae4aca 100644 --- a/create_account.html +++ b/create_account.html @@ -9,13 +9,19 @@
-Username E-mail Password +Public Name +
Nickname you'd like to use on forums. We recommend +some variant of your real name (e.g. first name, last initial), but we +allow you to be fully anonymous as well.
+ + Full name