Commit cc094443 by Victor Shnayder

Merge remote-tracking branch 'origin/master' into feature/kfiedler/ocw-links

parents fd63818d d1599d39
......@@ -53,7 +53,7 @@ def index(request):
"""
courses = modulestore().get_items(['i4x', None, None, 'course', None])
return render_to_response('index.html', {
'courses': [(course.metadata['display_name'],
'courses': [(course.metadata.get('display_name'),
reverse('course_index', args=[
course.location.org,
course.location.course,
......
......@@ -14,9 +14,11 @@ $yellow: #fff8af;
$cream: #F6EFD4;
$border-color: #ddd;
// edX colors
$blue: rgb(29,157,217);
$pink: rgb(182,37,104);
$error-red: rgb(253, 87, 87);
@mixin hide-text {
background-color: transparent;
......
......@@ -330,11 +330,6 @@ section.cal {
&:hover {
opacity: 1;
width: flex-grid(5) + flex-gutter();
+ section.main-content {
width: flex-grid(7);
}
}
> header {
......
......@@ -5,4 +5,8 @@ django admin pages for courseware model
from external_auth.models import *
from django.contrib import admin
admin.site.register(ExternalAuthMap)
class ExternalAuthMapAdmin(admin.ModelAdmin):
search_fields = ['external_id','user__username']
date_hierarchy = 'dtcreated'
admin.site.register(ExternalAuthMap, ExternalAuthMapAdmin)
'''
django admin pages for courseware model
'''
from track.models import *
from django.contrib import admin
admin.site.register(TrackingLog)
......@@ -11,13 +11,11 @@ importAll("xproblem");
generatorModulePath = process.argv[2];
dependencies = JSON.parse(process.argv[3]);
seed = process.argv[4];
seed = JSON.parse(process.argv[4]);
params = JSON.parse(process.argv[5]);
if(seed==null){
seed = 4;
}else{
seed = parseInt(seed);
}
for(var i = 0; i < dependencies.length; i++){
......
......@@ -408,7 +408,7 @@ class JavascriptResponse(LoncapaResponse):
output = self.call_node([generator_file,
self.generator,
json.dumps(self.generator_dependencies),
json.dumps(str(self.system.seed)),
json.dumps(str(self.context['the_lcp'].seed)),
json.dumps(self.params)]).strip()
return json.loads(output)
......
......@@ -507,8 +507,12 @@ class CapaModule(XModule):
# 'success' will always be incorrect
event_info['correct_map'] = correct_map.get_dict()
event_info['success'] = success
event_info['attempts'] = self.attempts
self.system.track_function('save_problem_check', event_info)
if hasattr(self.system,'psychometrics_handler'): # update PsychometricsData using callback
self.system.psychometrics_handler(self.get_instance_state())
# render problem into HTML
html = self.get_problem_html(encapsulate=False)
......
......@@ -99,7 +99,14 @@ class CourseDescriptor(SequenceDescriptor):
def definition_from_xml(cls, xml_object, system):
textbooks = []
for textbook in xml_object.findall("textbook"):
textbooks.append(cls.Textbook.from_xml_object(textbook))
try:
txt = cls.Textbook.from_xml_object(textbook)
except:
# If we can't get to S3 (e.g. on a train with no internet), don't break
# the rest of the courseware.
log.exception("Couldn't load textbook")
continue
textbooks.append(txt)
xml_object.remove(textbook)
#Load the wiki tag if it exists
......
......@@ -32,7 +32,7 @@ nav.sequence-nav {
.sequence-list-wrapper {
position: relative;
z-index: 9999;
z-index: 99;
border: 1px solid #ccc;
height: 44px;
margin: 0 30px;
......
......@@ -2023,7 +2023,16 @@ function add_schematic_handler(other_onload) {
update_schematics();
}
}
window.onload = add_schematic_handler(window.onload);
/*
* THK: Attaching update_schematic to window.onload is rather presumptuous...
* The function is called for EVERY page load, whether in courseware or in
* course info, in 6.002x or the public health course. It is also redundant
* because courseware includes an explicit call to update_schematic after
* each ajax exchange. In this case, calling update_schematic twice appears
* to contribute to a bug in Firefox that does not render the schematic
* properly depending on timing.
*/
//window.onload = add_schematic_handler(window.onload);
// ask each schematic input widget to update its value field for submission
function prepare_schematics() {
......
......@@ -75,7 +75,7 @@ class SequenceModule(XModule):
contents = []
for child in self.get_display_items():
progress = child.get_progress()
contents.append({
childinfo = {
'content': child.get_html(),
'title': "\n".join(
grand_child.display_name.strip()
......@@ -85,7 +85,10 @@ class SequenceModule(XModule):
'progress_status': Progress.to_js_status_str(progress),
'progress_detail': Progress.to_js_detail_str(progress),
'type': child.get_icon_class(),
})
}
if childinfo['title']=='':
childinfo['title'] = child.metadata.get('display_name','')
contents.append(childinfo)
params = {'items': contents,
'element_id': self.location.html_id(),
......
......@@ -29,7 +29,7 @@ from nose.plugins.skip import SkipTest
from mock import Mock
i4xs = ModuleSystem(
ajax_url='/',
ajax_url='courses/course_id/modx/a_location',
track_function=Mock(),
get_module=Mock(),
render_template=Mock(),
......
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/sound.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/plotter.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/circuit.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/mosfet_amplifier.js"></script>
<h2>LAB 5B: MOSFET AMPLIFIER EXPERIMENT</h2>
<section class="problem">
<startouttext />
<p>Note: This part of the lab is just to develop your intuition about
amplifiers and biasing, and to have fun with music! There are no responses
that need to be checked.</p>
<p>The graph plots the selected voltages from the amplifier circuit below. You
can also listen to various signals by selecting from the radio buttons to
the right of the graph. This way you can both see and hear various signals.
You can use the sliders to the right of the amplifier circuit to control
various parameters of the MOSFET and the amplifier. The parameter \(V_{MAX}\)
sets the maximum range on the plots. You can also select an input voltage
type (e.g., sine wave, square wave, various types of music) using the drop
down menu to the right of the graph. When describing AC signals, the
voltages on the sliders refer to peak-to-peak values.</p>
<p>1. To begin your first experiment, go ahead and use the pull down menu to
select a sine wave input. Then, adjust the sliders to an approximate
baseline setting shown below.</p>
<p>Baseline setting of sliders:
<br />
\(V_{S}=1.6V\), \(v_{IN}=3V\), \(Frequency=1000Hz\), \(V_{BIAS}=2.5V\), \(R=10K\Omega\), \(k=1mA/V^{2}\), \(V_{T}=1V\), \(V_{MAX}=2V\).</p>
<p>You will observe in the plot that the baseline setting of the sliders for
the various amplifiers parameters produces a distorted sine wave signal for
\(v_{OUT}\). Next, go ahead and select one of the music signals as the input and
listen to each of \(v_{IN}\) and \(v_{OUT}\), and confirm for yourself that the
output sounds distorted for the chosen slider settings. You will notice
that the graph now plots the music signal waveforms. Think about all the
reasons why the amplifier is producing a distorted output.</p>
<p>2. For the second experiment, we will study the amplifier's small signal
behavior. Select a sine wave as the input signal. To study the small
signal behavior, reduce the value of \(v_{IN}\) to 0.1V (peak-to-peak) by
using the \(v_{IN}\) slider. Keeping the rest of the parameters at their
baseline settings, derive an appropriate value of \(V_{BIAS}\) that will ensure
saturation region operation for the MOSFET for the 0.1V peak-to-peak swing
for \(v_{IN}\). Make sure to think about both positive and negative excursions
of the signals.</p>
</p>Next, use the \(V_{BIAS}\) slider to choose your computed value for \(V_{BIAS}\) and
see if the observed plot of \(v_{OUT}\) is more or less distortion free. If
your calculation was right, then the output will indeed be distortion free.</p>
<p>Next, select one of the music signals as the input and listen to each of
\(v_{IN}\) and \(v_{OUT}\), and confirm for yourself that the output sounds much
better than in Step 1. Also, based on sound volume, confirm that \(v_{OUT}\) is
an amplified version of \(v_{IN}\).</p>
<p>3. Now go ahead and experiment with various other settings while listening
to the music signal at \(v_{OUT}\). Observe the plots and listen to \(v_{OUT}\) as
you change, for example, the bias voltage \(V_{BIAS}\). You will notice that
the amplifier distorts the input signal when \(V_{BIAS}\) becomes too small, or
when it becomes too large. You can also experiment with various values of
\(v_{IN}\), \(R_{L}\), etc., and see how they affect the amplification and distortion.</p>
<endouttext />
</section>
<section class="tool-wrapper">
<div id="controlls-container">
<div class="graph-controls">
<div class="music-wrapper">
<select id="musicTypeSelect" size="1">
<option value = "0">Zero Input</option>
<option value = "1">Unit Impulse</option>
<option value = "2">Unit Step</option>
<option selected="selected" value = "3">Sine Wave</option>
<option value = "4">Square Wave</option>
<option value = "5">Classical Music</option>
<option value = "6">Folk Music</option>
<option value = "7">Jazz Music</option>
<option value = "8">Reggae Music</option>
</select>
<input id="playButton" type="button" value="Play" />
</div>
<div class="inputs-wrapper">
<div id="graph-output">
<p>Graph:</p>
<ul>
<li><label for="vinCheckbox"><input id="vinCheckbox" type="checkbox" checked="yes"/>v<sub>IN</sub></label></li>
<li><label for="voutCheckbox"><input id="voutCheckbox" type="checkbox" checked="yes"/>v<sub>OUT</sub></label> </li>
<li><label for="vrCheckbox"><input id="vrCheckbox" type="checkbox"/>v<sub>R</sub></label></li>
</ul>
</div>
<div id="graph-listen">
<p>Listen to:</p>
<ul>
<li><label for="vinRadioButton"><input id="vinRadioButton" type="radio" checked="yes" name="listenToWhat"/>v<sub>IN</sub></label></li>
<li><label for="voutRadioButton"><input id="voutRadioButton" type="radio" name="listenToWhat"/>v<sub>OUT</sub></label></li>
<li><label for="vrRadioButton"><input id="vrRadioButton" type="radio" name="listenToWhat"/>v<sub>R</sub></label></li>
</ul>
</div>
</div>
</div>
<div class="schematic-sliders">
<div class="slider-label" id="vs"></div>
<div class="slider" id="vsSlider"></div>
<div class="slider-label" id="vin"></div>
<div class="slider" id="vinSlider"></div>
<div class="slider-label" id="freq"></div>
<div class="slider" id="freqSlider"></div>
<div class="slider-label" id="vbias"></div>
<div class="slider" id="vbiasSlider"></div>
<div class="slider-label" id="r"></div>
<div class="slider" id="rSlider"></div>
<div class="slider-label" id="k"></div>
<div class="slider" id="kSlider"></div>
<div class="slider-label" id="vt"></div>
<div class="slider" id="vtSlider"></div>
<div class="slider-label" id="vmax"></div>
<div class="slider" id="vmaxSlider"></div>
</div>
</div>
<div id="graph-container">
<canvas id="graph" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
<canvas id="diag1" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
</div>
</section>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/sound.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/plotter.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/circuit.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/rc_filters.js"></script>
<h2>LAB 10B: RC FILTERS WITH FREQUENCY RESPONSE EXPERIMENT</h2>
<section class="problem">
<startouttext />
<p>Note: Use this part of the lab to build your intuition about filters and frequency response, and to have fun with music! There are no responses that need to be checked.</p>
<p>Recall from the audio lab in Week 5 that the graph plots the selected voltages from the circuit shown below. This week the circuit is an RC filter. You can also listen to various signals by selecting from the radio buttons to the right of the graph. This way you can both see and hear various signals. You can use the sliders to the right of the circuit to control various circuit and input signal parameters. (Note that you can get finer control of some of the slider values by clicking on the slider and using the arrow keys). Recall that the parameter \(V_{MAX}\) sets the maximum range on the graph. You can also select an input voltage type (e.g., sine wave, square wave, various types of music) using the drop down menu to the right of the graph. When describing AC signals, the voltages on the sliders refer to peak-to-peak values.</p>
<p>1. To begin your first experiment, use the pull down menu to select a sine wave input. Then, adjust the sliders to these approximate baseline settings:
<br />
\(v_{IN} = 3V\), \(Frequency = 1000 Hz\), \(V_{BIAS} = 0V\), \(R = 1K\Omega\), \(v_C(0) = 0V\), \(C = 110nF\), \(V_{MAX} = 2V\).
<br />
Observe the waveforms for \(v_{IN}\) and \(v_C\) in the graph. You can also listen to \(v_{IN}\) and \(v_C\). You will observe that the amplitude of \(v_C\) is slightly smaller than the amplitude of \(v_{IN}\).
<br />
Compute the break frequency of the filter circuit for the given circuit parameters. (Note that the break frequency is also called the cutoff frequency or the corner frequency).
<br />
Change the frequency of the sinusoid so that it is approximately 3 times the break frequency.
<br />
Observe the waveforms for \(v_{IN}\) and \(v_C\) in the graph. Also listen to \(v_{IN}\) and \(v_C\). Think about why the sinusoid at \(v_C\) is significantly more attenuated than the original 1KHz sinusoid.
<br />
Keeping the input signal unchanged, observe the waveforms for \(v_{IN}\) and \(v_R\) in the graph. Also listen to \(v_{IN}\) and \(v_R\). Think about why the sinusoid at \(v_R\) is significantly louder than the sinusoid at \(v_C\).</p>
<p>2. Next, use the pull down menu to select a music signal of your choice. Adjust the sliders to the approximate baseline settings:
<br />
\(v_{IN} = 3V\), \(V_{BIAS} = 0V\), \(R = 1K\Omega\), \(v_C(0) = 0V\), \(C = 110nF\), \(V_{MAX} = 2V\).
<br />
Listen to the signals at \(v_{IN}\) and \(v_C\). Notice any difference between the signals?
<br />
Next, increase the capacitance value and observe the difference in the sound of \(v_{IN}\) and \(v_C\) as the capacitance increases. You should notice that the higher frequency components of \(v_C\) are attenuated as the capacitance is increased.
Convince yourself that when the signal is taken at \(v_C\), the circuit behaves like a low-pass filter.</p>
<p>3. Re-adjust the sliders to the approximate baseline settings:
<br />
\(v_{IN} = 3V\), \(V_{BIAS} = 0V\), \(R = 1K\Omega\), \(v_C(0) = 0V\), \(C = 110nF\), \(V_{MAX} = 2V\).
<br />
Try to create a high-pass filter from the same circuit by taking the signal output across a different element and possibly changing some of the element values.
</p>
<endouttext />
</section>
<section class="tool-wrapper">
<div id="controlls-container">
<div class="graph-controls">
<div class="music-wrapper">
<select id="musicTypeSelect" size="1">
<option value = "0">Zero Input</option>
<option value = "1">Unit Impulse</option>
<option value = "2">Unit Step</option>
<option selected="selected" value = "3">Sine Wave</option>
<option value = "4">Square Wave</option>
<option value = "5">Classical Music</option>
<option value = "6">Folk Music</option>
<option value = "7">Jazz Music</option>
<option value = "8">Reggae Music</option>
</select>
<input id="playButton" type="button" value="Play" />
</div>
<div class="inputs-wrapper">
<div id="graph-output">
<p>Graph:</p>
<ul>
<li><label for="vinCheckbox"><input id="vinCheckbox" type="checkbox" checked="yes"/>v<sub>IN</sub></label></li>
<li><label for="vcCheckbox"><input id="vcCheckbox" type="checkbox" checked="yes"/>v<sub>C</sub></label> </li>
<li><label for="vrCheckbox"><input id="vrCheckbox" type="checkbox"/>v<sub>R</sub></label></li>
</ul>
</div>
<div id="graph-listen">
<p>Listen to:</p>
<ul>
<li><label for="vinRadioButton"><input id="vinRadioButton" type="radio" checked="yes" name="listenToWhat"/>v<sub>IN</sub></label></li>
<li><label for="vcRadioButton"><input id="vcRadioButton" type="radio" name="listenToWhat"/>v<sub>C</sub></label></li>
<li><label for="vrRadioButton"><input id="vrRadioButton" type="radio" name="listenToWhat"/>v<sub>R</sub></label></li>
</ul>
</div>
</div>
</div>
<div class="schematic-sliders">
<div class="slider-label" id="fc">f<sub>C</sub> = </div>
<div class="slider-label" id="vin"></div>
<div class="slider" id="vinSlider"></div>
<div class="slider-label" id="freq"></div>
<div class="slider" id="freqSlider"></div>
<div class="slider-label" id="vbias"></div>
<div class="slider" id="vbiasSlider"></div>
<div class="slider-label" id="r"></div>
<div class="slider" id="rSlider"></div>
<div class="slider-label" id="vc0"></div>
<div class="slider" id="vc0Slider"></div>
<div class="slider-label" id="c"></div>
<div class="slider" id="cSlider"></div>
<div class="slider-label" id="vmax"></div>
<div class="slider" id="vmaxSlider"></div>
</div>
</div>
<div id="graph-container">
<div id="graphTabs">
<ul>
<li><a href="#time">Time</a></li>
<li><a href="#magnitude">Magnitude</a></li>
<li><a href="#phase">Phase</a></li>
</ul>
<canvas id="time" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
<canvas id="magnitude" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
<canvas id="phase" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
</div>
<canvas id="diag2" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
</div>
</section>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/sound.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/plotter.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/circuit.js"></script>
<script type="text/javascript" src="/static/courses/6002/js/sound_labs/series_rlc.js"></script>
<h2>SERIES RLC CIRCUIT WITH FREQUENCY RESPONSE EXPERIMENT</h2>
<section class="problem">
<startouttext />
<p>\(I(s) = \frac{1}{R + Ls + 1/Cs}V_{in}(s) = \frac{s/L}{s^2 + sR/L + 1/LC}V_{in}(s)\)</p>
<p>\(I(s) = \frac{s/L}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s)\)</p>
<p>\(\omega_0 = \frac{1}{\sqrt{LC}} , \alpha = \frac{R}{2L}\)</p>
<p>Band-Pass Filter:</p>
<p>\(V_r(s) = RI(s) = \frac{sR/L}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s) = \frac{2\alpha s}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s) = \frac{2\alpha s}{(s-s_1)(s-s_2)}V_{in}(s)\)</p>
<p>Gain magnitude: \(G_R = \frac{2\alpha w}{|j\omega - s_1||j\omega - s_2|}\)</p>
<p>Phase: \(\Phi_R = \pi/2-\Phi(j\omega - s_1) -\Phi(j\omega - s_2)\)</p>
<p>Low-Pass Filter:</p>
<p>\(V_c(s) = I(s)/sC = \frac{1/LC}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s) = \frac{\omega_0^2}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s) = \frac{\omega_0^2}{(s-s_1)(s-s_2)}V_{in}(s)\)</p>
<p>Gain magnitude: \(G_C = \frac{\omega_0^2}{|j\omega - s_1||j\omega - s_2|}\)</p>
<p>Phase: \(\Phi_C = -\Phi(j\omega - s_1) -\Phi(j\omega - s_2)\)</p>
<p>High-Pass Filter:</p>
<p>\(V_l(s) = sLI(s) = \frac{s^2}{s^2 + 2\alpha s + \omega_0^2}V_{in}(s) = \frac{s^2}{(s-s_1)(s-s_2)}V_{in}(s)\)</p>
<p>Gain magnitude: \(G_L = \frac{\omega^2}{|j\omega - s_1||j\omega - s_2|}\)</p>
<p>Phase: \(\Phi_L = -\Phi(j\omega - s_1) -\Phi(j\omega - s_2)\)</p>
<br />
<p>Under-Damped: \(\alpha < \omega_0\)</p>
<p>Complex roots: \(s_{1,2} = -\alpha \pm j\sqrt{\omega_0^2 - \alpha^2}\)</p>
<p>Critically-Damped: \(\alpha = \omega_0\)</p>
<p>Double real root: \(s_{1,2} = -\alpha\)</p>
<p>Over-Damped: \(\alpha > \omega_0\)</p>
<p>Real roots: \(s_{1,2} = -\alpha \pm\sqrt{\alpha^2 - \omega_0^2}\)</p>
<endouttext />
</section>
<section class="tool-wrapper">
<div id="controlls-container">
<div class="graph-controls">
<div class="music-wrapper">
<select id="musicTypeSelect" size="1">
<option value = "0">Zero Input</option>
<option value = "1">Unit Impulse</option>
<option value = "2">Unit Step</option>
<option selected="selected" value = "3">Sine Wave</option>
<option value = "4">Square Wave</option>
<option value = "5">Classical Music</option>
<option value = "6">Folk Music</option>
<option value = "7">Jazz Music</option>
<option value = "8">Reggae Music</option>
</select>
<input id="playButton" type="button" value="Play" />
</div>
<div class="inputs-wrapper">
<div id="graph-output">
<p>Graph:</p>
<ul>
<li><label for="vinCheckbox"><input id="vinCheckbox" type="checkbox" checked="yes"/>v<sub>IN</sub></label></li>
<li><label for="vrCheckbox"><input id="vrCheckbox" type="checkbox"/>v<sub>R</sub></label></li>
<li><label for="vlCheckbox"><input id="vlCheckbox" type="checkbox"/>v<sub>L</sub></label></li>
<li><label for="vcCheckbox"><input id="vcCheckbox" type="checkbox" checked="yes"/>v<sub>C</sub></label> </li>
</ul>
</div>
<div id="graph-listen">
<p>Listen to:</p>
<ul>
<li><label for="vinRadioButton"><input id="vinRadioButton" type="radio" checked="yes" name="listenToWhat"/>v<sub>IN</sub></label></li>
<li><label for="vrRadioButton"><input id="vrRadioButton" type="radio" name="listenToWhat"/>v<sub>R</sub></label></li>
<li><label for="vlRadioButton"><input id="vlRadioButton" type="radio" name="listenToWhat"/>v<sub>L</sub></label></li>
<li><label for="vcRadioButton"><input id="vcRadioButton" type="radio" name="listenToWhat"/>v<sub>C</sub></label></li>
</ul>
</div>
</div>
</div>
<div class="schematic-sliders">
<div class="slider-label" id="vin"></div>
<div class="slider" id="vinSlider"></div>
<div class="slider-label" id="freq"></div>
<div class="slider" id="freqSlider"></div>
<div class="slider-label" id="vbias"></div>
<div class="slider" id="vbiasSlider"></div>
<div class="slider-label" id="r"></div>
<div class="slider" id="rSlider"></div>
<div class="slider-label" id="l"></div>
<div class="slider" id="lSlider"></div>
<div class="slider-label" id="c"></div>
<div class="slider" id="cSlider"></div>
<div class="slider-label" id="vc0"></div>
<div class="slider" id="vc0Slider"></div>
<div class="slider-label" id="i0"></div>
<div class="slider" id="i0Slider"></div>
<div class="slider-label" id="vmax"></div>
<div class="slider" id="vmaxSlider"></div>
</div>
</div>
<div id="graph-container">
<div id="graphTabs">
<ul>
<li><a href="#time">Time</a></li>
<li><a href="#magnitude">Magnitude</a></li>
<li><a href="#phase">Phase</a></li>
</ul>
<canvas id="time" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
<canvas id="magnitude" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
<canvas id="phase" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
</div>
<canvas id="diag3" width="500" height="500">Your browser must support the Canvas element and have JavaScript enabled to view this tool.</canvas>
</div>
</section>
......@@ -299,7 +299,7 @@ This is a sketch ("tue" is not a valid start date), that should help illustrate
## Specifying metadata in the xml file
Metadata can also live in the xml files, but anything defined in the policy file overrides anything in the xml. This is primarily for backwards compatibility, and you should probably not use both. If you do leave some metadata tags in the xml, you should be consistent (e.g. if `display_name`s stay in xml, they should all stay in xml).
Metadata can also live in the xml files, but anything defined in the policy file overrides anything in the xml. This is primarily for backwards compatibility, and you should probably not use both. If you do leave some metadata tags in the xml, you should be consistent (e.g. if `display_name`s stay in xml, they should all stay in xml. Note `display_name` should be specified in the problem xml definition itself, ie, <problem display_name="Title"> Problem Text </problem>, in file ProblemFoo.xml).
- note, some xml attributes are not metadata. e.g. in `<video youtube="xyz987293487293847"/>`, the `youtube` attribute specifies what video this is, and is logically part of the content, not the policy, so it should stay in the xml.
Another example policy file:
......
......@@ -16,6 +16,7 @@ from capa.xqueue_interface import XQueueInterface
from courseware.access import has_access
from mitxmako.shortcuts import render_to_string
from models import StudentModule, StudentModuleCache
from psychometrics.psychoanalyze import make_psychometrics_data_update_handler
from static_replace import replace_urls
from xmodule.errortracker import exc_info_to_str
from xmodule.exceptions import NotFoundError
......@@ -230,6 +231,9 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
# pass position specified in URL to module through ModuleSystem
system.set('position', position)
system.set('DEBUG', settings.DEBUG)
if settings.MITX_FEATURES.get('ENABLE_PSYCHOMETRICS') and instance_module is not None:
system.set('psychometrics_handler', # set callback for updating PsychometricsData
make_psychometrics_data_update_handler(instance_module))
try:
module = descriptor.xmodule_constructor(system)(instance_state, shared_state)
......
......@@ -222,16 +222,9 @@ class PageLoader(ActivateLoginTestCase):
handling.
"""
resp = self.client.get(url)
# HACK: workaround the bug that returns 200 instead of 404.
# TODO (vshnayder): once we're returning 404s, get rid of this if.
if code != 404:
self.assertEqual(resp.status_code, code)
# And 'page not found' shouldn't be in the returned page
self.assertTrue(resp.content.lower().find('page not found') == -1)
else:
# look for "page not found" instead of the status code
#print resp.content
self.assertTrue(resp.content.lower().find('page not found') != -1)
self.assertEqual(resp.status_code, code,
"got code {0} for url '{1}'. Expected code {2}"
.format(resp.status_code, url, code))
def check_pages_load(self, course_name, data_dir, modstore):
......
......@@ -9,7 +9,9 @@ from django.utils import simplejson
from django.db import connection
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django_comment_client.permissions import check_permissions_by_view
from django_comment_client.models import Role
from mitxmako import middleware
import logging
......@@ -226,11 +228,15 @@ def permalink(content):
args=[content['course_id'], content['commentable_id'], content['thread_id']]) + '#' + content['id']
def extend_content(content):
user = User.objects.get(pk=content['user_id'])
roles = dict(('name', role.name.lower()) for role in user.roles.filter(course_id=content['course_id']))
content_info = {
'displayed_title': content.get('highlighted_title') or content.get('title', ''),
'displayed_body': content.get('highlighted_body') or content.get('body', ''),
'raw_tags': ','.join(content.get('tags', [])),
'permalink': permalink(content),
'roles': roles,
'updated': content['created_at']!=content['updated_at'],
}
return merge_dict(content, content_info)
......
......@@ -27,6 +27,7 @@ from django.views.decorators.cache import cache_control
from courseware import grades
from courseware.access import has_access, get_access_group_name
from courseware.courses import (get_course_with_access, get_courses_by_university)
from psychometrics import psychoanalyze
from student.models import UserProfile
from student.models import UserTestGroup, CourseEnrollment
......@@ -51,7 +52,18 @@ def instructor_dashboard(request, course_id):
instructor_access = has_access(request.user, course, 'instructor') # an instructor can manage staff lists
msg = ''
# msg += ('POST=%s' % dict(request.POST)).replace('<','&lt;')
#msg += ('POST=%s' % dict(request.POST)).replace('<','&lt;')
problems = []
plots = []
# the instructor dashboard page is modal: grades, psychometrics, admin
# keep that state in request.session (defaults to grades mode)
idash_mode = request.POST.get('idash_mode','')
if idash_mode:
request.session['idash_mode'] = idash_mode
else:
idash_mode = request.session.get('idash_mode','Grades')
def escape(s):
"""escape HTML special characters in string"""
......@@ -149,6 +161,9 @@ def instructor_dashboard(request, course_id):
track.views.server_track(request, 'dump-answer-dist-csv', {}, page='idashboard')
return return_csv('answer_dist_%s.csv' % course_id, get_answers_distribution(request, course_id))
#----------------------------------------
# Admin
elif 'List course staff' in action:
group = get_staff_group(course)
msg += 'Staff group = %s' % group.name
......@@ -187,14 +202,31 @@ def instructor_dashboard(request, course_id):
user.groups.remove(group)
track.views.server_track(request, 'remove-staff %s' % user, {}, page='idashboard')
# For now, mostly a static page
#----------------------------------------
# psychometrics
elif action == 'Generate Histogram and IRT Plot':
problem = request.POST['Problem']
nmsg, plots = psychoanalyze.generate_plots_for_problem(problem)
msg += nmsg
track.views.server_track(request, 'psychometrics %s' % problem, {}, page='idashboard')
if idash_mode=='Psychometrics':
problems = psychoanalyze.problems_with_psychometric_data(course_id)
#----------------------------------------
# context for rendering
context = {'course': course,
'staff_access': True,
'admin_access': request.user.is_staff,
'instructor_access': instructor_access,
'datatable': datatable,
'msg': msg,
'modeflag': {idash_mode: 'selectedmode'},
'problems': problems, # psychometrics
'plots': plots, # psychometrics
'course_errors': modulestore().get_item_errors(course.location),
'djangopid' : os.getpid(),
}
return render_to_response('courseware/instructor_dashboard.html', context)
......
......@@ -35,7 +35,17 @@ def getip(request):
ip = request.META.get('REMOTE_ADDR','None')
return ip
def manage_modulestores(request,reload_dir=None):
def get_commit_id(course):
return course.metadata.get('GIT_COMMIT_ID','No commit id')
# getattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID','No commit id')
def set_commit_id(course,commit_id):
course.metadata['GIT_COMMIT_ID'] = commit_id
# setattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID', new_commit_id)
def manage_modulestores(request, reload_dir=None, commit_id=None):
'''
Manage the static in-memory modulestores.
......@@ -52,8 +62,9 @@ def manage_modulestores(request,reload_dir=None):
ip = getip(request)
if LOCAL_DEBUG:
html += '<h3>IP address: %s ' % ip
html += '<h3>User: %s ' % request.user
html += '<h3>IP address: %s <h3>' % ip
html += '<h3>User: %s </h3>' % request.user
html += '<h3>My pid: %s</h3>' % os.getpid()
log.debug('request from ip=%s, user=%s' % (ip,request.user))
if not (ip in ALLOWED_IPS or 'any' in ALLOWED_IPS):
......@@ -66,14 +77,36 @@ def manage_modulestores(request,reload_dir=None):
return HttpResponse(html, status=403)
#----------------------------------------
# reload course if specified
# reload course if specified; handle optional commit_id
if reload_dir is not None:
if reload_dir not in def_ms.courses:
html += '<h2 class="inline-error">Error: "%s" is not a valid course directory</h2>' % reload_dir
else:
html += '<h2>Reloaded course directory "%s"</h2>' % reload_dir
def_ms.try_load_course(reload_dir)
# reloading based on commit_id is needed when running mutiple worker threads,
# so that a given thread doesn't reload the same commit multiple times
current_commit_id = get_commit_id(def_ms.courses[reload_dir])
log.debug('commit_id="%s"' % commit_id)
log.debug('current_commit_id="%s"' % current_commit_id)
if (commit_id is not None) and (commit_id==current_commit_id):
html += "<h2>Already at commit id %s for %s</h2>" % (commit_id, reload_dir)
track.views.server_track(request,
'reload %s skipped already at %s (pid=%s)' % (reload_dir,
commit_id,
os.getpid(),
),
{}, page='migrate')
else:
html += '<h2>Reloaded course directory "%s"</h2>' % reload_dir
def_ms.try_load_course(reload_dir)
gdir = settings.DATA_DIR / reload_dir
new_commit_id = os.popen('cd %s; git log -n 1 | head -1' % gdir).read().strip().split(' ')[1]
set_commit_id(def_ms.courses[reload_dir], new_commit_id)
html += '<p>commit_id=%s</p>' % new_commit_id
track.views.server_track(request, 'reloaded %s now at %s (pid=%s)' % (reload_dir,
new_commit_id,
os.getpid()), {}, page='migrate')
#----------------------------------------
......@@ -94,6 +127,8 @@ def manage_modulestores(request,reload_dir=None):
html += '<hr width="100%"/>'
html += '<h2>Course: %s (%s)</h2>' % (course.display_name,cdir)
html += '<p>commit_id=%s</p>' % get_commit_id(course)
for field in dumpfields:
data = getattr(course,field)
html += '<h3>%s</h3>' % field
......
'''
django admin pages for courseware model
'''
from psychometrics.models import *
from django.contrib import admin
admin.site.register(PsychometricData)
#!/usr/bin/python
#
# generate pyschometrics data from tracking logs and student module data
import os, sys, string
import datetime
import json
from courseware.models import *
from track.models import *
from psychometrics.models import *
from xmodule.modulestore import Location
from django.conf import settings
from django.core.management.base import BaseCommand
#db = "ocwtutor" # for debugging
#db = "default"
db = getattr(settings,'DATABASE_FOR_PSYCHOMETRICS','default')
class Command(BaseCommand):
help = "initialize PsychometricData tables from StudentModule instances (and tracking data, if in SQL)."
help += "Note this is done for all courses for which StudentModule instances exist."
def handle(self, *args, **options):
# delete all pmd
#PsychometricData.objects.all().delete()
#PsychometricData.objects.using(db).all().delete()
smset = StudentModule.objects.using(db).exclude(max_grade=None)
for sm in smset:
url = sm.module_state_key
location = Location(url)
if not location.category=="problem":
continue
try:
state = json.loads(sm.state)
done = state['done']
except:
print "Oops, failed to eval state for %s (state=%s)" % (sm,sm.state)
continue
if done: # only keep if problem completed
try:
pmd = PsychometricData.objects.using(db).get(studentmodule=sm)
except PsychometricData.DoesNotExist:
pmd = PsychometricData(studentmodule=sm)
pmd.done = done
pmd.attempts = state['attempts']
# get attempt times from tracking log
uname = sm.student.username
tset = TrackingLog.objects.using(db).filter(username=uname, event_type__contains='save_problem_check')
tset = tset.filter(event_source='server')
tset = tset.filter(event__contains="'%s'" % url)
checktimes = [x.dtcreated for x in tset]
pmd.checktimes = checktimes
if not len(checktimes)==pmd.attempts:
print "Oops, mismatch in number of attempts and check times for %s" % pmd
#print pmd
pmd.save(using=db)
print "%d PMD entries" % PsychometricData.objects.using(db).all().count()
#
# db model for psychometrics data
#
# this data is collected in real time
#
from django.db import models
from courseware.models import StudentModule
class PsychometricData(models.Model):
"""
This data is a table linking student, module, and module performance,
including number of attempts, grade, max grade, and time of checks.
Links to instances of StudentModule, but only those for capa problems.
Note that StudentModule.module_state_key is nominally a Location instance (url string).
That means it is of the form {tag}://{org}/{course}/{category}/{name}[@{revision}]
and for capa problems, category = "problem".
checktimes is extracted from tracking logs, or added by capa module via psychometrics callback.
"""
studentmodule = models.ForeignKey(StudentModule, db_index=True, unique=True) # contains student, module_state_key, course_id
done = models.BooleanField(default=False)
attempts = models.IntegerField(default=0) # extracted from studentmodule.state
checktimes = models.TextField(null=True, blank=True) # internally stored as list of datetime objects
# keep in mind
# grade = studentmodule.grade
# max_grade = studentmodule.max_grade
# student = studentmodule.student
# course_id = studentmodule.course_id
# location = studentmodule.module_state_key
def __unicode__(self):
sm = self.studentmodule
return "[PsychometricData] %s url=%s, grade=%s, max=%s, attempts=%s, ct=%s" % (sm.student,
sm.module_state_key,
sm.grade,
sm.max_grade,
self.attempts,
self.checktimes)
......@@ -6,6 +6,7 @@
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.conf import settings
from django.http import HttpResponseNotFound, HttpResponseServerError
from django_future.csrf import ensure_csrf_cookie
from util.cache import cache_if_anonymous
......@@ -40,9 +41,9 @@ def render(request, template):
def render_404(request):
return render_to_response('static_templates/404.html', {})
return HttpResponseNotFound(render_to_string('static_templates/404.html', {}))
def render_500(request):
return render_to_response('static_templates/server-error.html', {})
return HttpResponseServerError(render_to_string('static_templates/server-error.html', {}))
......@@ -71,6 +71,8 @@ MITX_FEATURES = {
'ENABLE_DISCUSSION' : False,
'ENABLE_DISCUSSION_SERVICE': True,
'ENABLE_PSYCHOMETRICS': False, # real-time psychometrics (eg item response theory analysis in instructor dashboard)
'ENABLE_SQL_TRACKING_LOGS': False,
'ENABLE_LMS_MIGRATION': False,
'ENABLE_MANUAL_GIT_RELOAD': False,
......@@ -267,12 +269,22 @@ STATICFILES_DIRS = [
PROJECT_ROOT / "askbot" / "skins",
]
if os.path.isdir(DATA_DIR):
# Add the full course repo if there is no static directory
STATICFILES_DIRS += [
# TODO (cpennington): When courses are stored in a database, this
# should no longer be added to STATICFILES
(course_dir, DATA_DIR / course_dir)
for course_dir in os.listdir(DATA_DIR)
if os.path.isdir(DATA_DIR / course_dir)
if (os.path.isdir(DATA_DIR / course_dir) and
not os.path.isdir(DATA_DIR / course_dir / 'static'))
]
# Otherwise, add only the static directory from the course dir
STATICFILES_DIRS += [
# TODO (cpennington): When courses are stored in a database, this
# should no longer be added to STATICFILES
(course_dir, DATA_DIR / course_dir / 'static')
for course_dir in os.listdir(DATA_DIR)
if (os.path.isdir(DATA_DIR / course_dir / 'static'))
]
# Locale/Internationalization
......@@ -609,6 +621,7 @@ INSTALLED_APPS = (
'util',
'certificates',
'instructor',
'psychometrics',
#For the wiki
'wiki', # The new django-wiki from benjaoming
......
......@@ -20,6 +20,8 @@ MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains-
MITX_FEATURES['SUBDOMAIN_BRANDING'] = True
MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST)
MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] = True
MITX_FEATURES['ENABLE_PSYCHOMETRICS'] = False # real-time psychometrics (eg item response theory analysis in instructor dashboard)
WIKI_ENABLED = True
......
......@@ -46,6 +46,7 @@ DATA_DIR = COURSES_ROOT
LOGGING = get_logger_config(TEST_ROOT / "log",
logging_env="dev",
tracking_filename="tracking.log",
dev_env=True,
debug=True)
COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data"
......
......@@ -374,6 +374,9 @@ if Backbone?
MathJax.Hub.Queue ["Typeset", MathJax.Hub, $contentBody.attr("id")]
initTimeago: ->
@$("span.timeago").each (index, element) ->
elem = $(element)
elem.html("posted on #{$.timeago.parse(elem.html()).toLocaleString()}")
@$("span.timeago").timeago()
renderPartial: ->
......
......@@ -390,6 +390,14 @@ $tag-text-color: #5b614f;
color: #dea03e;
}
}
.author-moderator:after{
content: " (moderator)"
}
.author-administrator:after{
content: " (instructor)"
}
}
.discussion-content {
......@@ -415,6 +423,13 @@ $tag-text-color: #5b614f;
}
}
// Role based styles
.role-moderator{
background-color: #eafcfc;
}
.role-administrator{
background-color: #eafcea;
}
//COMMENT STYLES
.comments {
overflow: hidden;
......
......@@ -25,11 +25,6 @@ div.info-wrapper {
margin-bottom: lh();
padding-bottom: lh(.5);
&:first-child {
margin: 0 (-(lh(.5))) lh();
padding: lh(.5);
}
ol, ul {
margin: 0;
list-style-type: disk;
......
......@@ -80,7 +80,6 @@ div.course-wrapper {
}
.histogram {
display: none;
width: 200px;
height: 150px;
}
......@@ -117,6 +116,7 @@ div.course-wrapper {
margin: 0;
@include clearfix();
padding: 0;
list-style: none;
li {
width: flex-grid(3, 9);
......
......@@ -21,6 +21,7 @@
## <script type="text/javascript" src="${static.url('js/vendor/CodeMirror-2.25/mode/xml/xml.js')}"></script>
## <script type="text/javascript" src="${static.url('js/vendor/CodeMirror-2.25/mode/python/python.js')}"></script>
<%static:js group='courseware'/>
<%static:js group='discussion'/>
......@@ -35,6 +36,22 @@
<script type="text/javascript">
var $$course_id = "${course.id}";
$(function(){
$(".ui-accordion-header a").each(function() {
var wordArray = $(this).text().split(" ");
var finalTitle = "";
for (i=0;i<=wordArray.length-1;i++) {
finalTitle += wordArray[i];
if (i == (wordArray.length-2)) {
finalTitle += "&nbsp;";
} else {
finalTitle += " ";
}
}
$(this).html(finalTitle);
});
});
</script>
</%block>
......
......@@ -4,6 +4,8 @@
<%block name="headextra">
<%static:css group='course'/>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.axislabels.js')}"></script>
</%block>
<%include file="/courseware/course_navigation.html" args="active_page='instructor'" />
......@@ -31,54 +33,112 @@ table.stat_table td {
border-color: #666666;
background-color: #ffffff;
}
a.selectedmode { background-color: yellow; }
</style>
<script language="JavaScript" type="text/javascript">
function goto( mode)
{
document.idashform.idash_mode.value = mode;
document.idashform.submit() ;
}
</script>
<section class="container">
<div class="instructor-dashboard-wrapper">
<section class="instructor-dashboard-content">
<h1>Instructor Dashboard</h1>
<form method="POST">
<h2>[ <a href="#" onclick="goto('Grades');" class="${modeflag.get('Grades')}">Grades</a> |
%if settings.MITX_FEATURES.get('ENABLE_PSYCHOMETRICS'):
<a href="#" onclick="goto('Psychometrics');" class="${modeflag.get('Psychometrics')}">Psychometrics</a> |
%endif
<a href="#" onclick="goto('Admin');" class="${modeflag.get('Admin')}">Admin</a> ]
</h2>
<div style="text-align:right" id="djangopid">${djangopid}</div>
<form name="idashform" method="POST">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
<input type="hidden" name="idash_mode" value="">
##-----------------------------------------------------------------------------
%if modeflag.get('Grades'):
<p>
<a href="${reverse('gradebook', kwargs=dict(course_id=course.id))}">Gradebook</a>
</p>
<p>
<a href="${reverse('grade_summary', kwargs=dict(course_id=course.id))}">Grade summary</a>
</p>
<p>
<input type="submit" name="action" value="Dump list of enrolled students">
</p>
<p>
<input type="submit" name="action" value="Dump Grades for all students in this course">
<input type="submit" name="action" value="Download CSV of all student grades for this course">
</p>
<p>
<input type="submit" name="action" value="Dump all RAW grades for all students in this course">
<input type="submit" name="action" value="Download CSV of all RAW grades">
</p>
<p>
<input type="submit" name="action" value="Download CSV of answer distributions">
</p>
%endif
%if instructor_access:
##-----------------------------------------------------------------------------
%if modeflag.get('Psychometrics'):
<p>Select a problem and an action:
</p>
<p>
<select name="Problem">
%for problem, count in sorted(problems.items(), key=lambda x: x[0]):
<option value="${problem}">${problem} [${count}]</option>
%endfor
</select>
</p>
<p>
<input type="submit" name="action" value="Generate Histogram and IRT Plot">
</p>
<p></p>
%endif
##-----------------------------------------------------------------------------
%if modeflag.get('Admin'):
%if instructor_access:
<hr width="40%" style="align:left">
<p>
<input type="submit" name="action" value="List course staff members">
<input type="submit" name="action" value="List course staff members">
<p>
<input type="text" name="staffuser"> <input type="submit" name="action" value="Remove course staff">
<input type="submit" name="action" value="Add course staff">
<input type="text" name="staffuser"> <input type="submit" name="action" value="Remove course staff">
<input type="submit" name="action" value="Add course staff">
<hr width="40%" style="align:left">
%endif
%if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] and admin_access:
%endif
%if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] and admin_access:
<p>
<input type="submit" name="action" value="Reload course from XML files">
<input type="submit" name="action" value="GIT pull and Reload course">
<input type="submit" name="action" value="Reload course from XML files">
<input type="submit" name="action" value="GIT pull and Reload course">
%endif
%endif
</form>
##-----------------------------------------------------------------------------
%if modeflag.get('Psychometrics') is None:
<br/>
<br/>
<p>
......@@ -99,24 +159,61 @@ table.stat_table td {
%endfor
</table>
</p>
%endif
##-----------------------------------------------------------------------------
%if modeflag.get('Psychometrics'):
%for plot in plots:
<br/>
<h3>${plot['title']}</h3>
<br/>
<p>${plot['info']}</p>
<br/>
<div id="plot_${plot['id']}" style="width:600px;height:300px;"></div>
<script type="text/javascript">
$(function () {
${plot['data']}
$.plot($("#plot_${plot['id']}"), ${plot['cmd']} );
});
</script>
<br/>
<br/>
%endfor
%endif
##-----------------------------------------------------------------------------
## always show msg
%if msg:
<p>${msg}</p>
<p>${msg}</p>
%endif
% if course_errors is not UNDEFINED:
##-----------------------------------------------------------------------------
%if modeflag.get('Admin'):
% if course_errors is not UNDEFINED:
<h2>Course errors</h2>
<div id="course-errors">
%if not course_errors:
None
%else:
<ul>
% for (summary, err) in course_errors:
<li>${summary | h}
% if err:
<ul><li><pre>${err | h}</pre></li></ul>
% else:
<p>&nbsp;</p>
% endif
</li>
% endfor
</ul>
%endif
</div>
% endif
% endif
%endif
</section>
</div>
</section>
<h2>${chapter_module.display_name}</h2>
<p>You were last in <a href="${prev_section_url}">${prev_section.display_name}</a>. If you're done with that, choose another section on the left.</p>
\ No newline at end of file
<p>You were most recently in <a href="${prev_section_url}">${prev_section.display_name}</a>. If you're done with that, choose another section on the left.</p>
<div class="discussion-content local">
<div class="discussion-content local{{#content.roles}} role-{{name}}{{/content.roles}}">
<div class="discussion-content-wrapper">
<div class="discussion-votes">
<a class="discussion-vote discussion-vote-up" href="javascript:void(0)" value="up">&#9650;</a>
......@@ -34,12 +34,15 @@
</div>
<div class="info">
<div class="comment-time">
<span class="timeago" title="{{content.updated_at}}">sometime</span> by
{{#content.updated}}
updated
{{/content.updated}}
<span class="timeago" title="{{content.updated_at}}">{{content.created_at}}</span> by
{{#content.anonymous}}
anonymous
{{/content.anonymous}}
{{^content.anonymous}}
<a href="{{##url_for_user}}{{content.user_id}}{{/url_for_user}}">{{content.username}}</a>
<a href="{{##url_for_user}}{{content.user_id}}{{/url_for_user}}" class="{{#content.roles}}author-{{name}} {{/content.roles}}">{{content.username}}</a>
{{/content.anonymous}}
</div>
<div class="show-comments-wrapper">
......
......@@ -76,7 +76,11 @@
<div id="register_message"></div>
%endif
%else:
<a href="#signup-modal" class="register" rel="leanModal" data-notice='You must Sign Up or <a href="#login-modal" rel="leanModal">Log In</a> to enroll.'>Register for ${course.number}</a>
<a href="#signup-modal" class="register" rel="leanModal" data-notice='You must Sign Up
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
or <a href="#login-modal" rel="leanModal">Log In</a>
% endif
to enroll.'>Register for ${course.number}</a>
%endif
</div>
......
[
{
"title": "Is MIT Giving Away the Farm?",
"url": "http://www.technologyreview.com/mitnews/428698/is-mit-giving-away-the-farm/",
"author": "Larry Hardesty",
"image": "techreview_logo_178x138.jpg",
"deck": "The surprising logic of MIT's free online education program.",
"publication": "Technology Review",
"publish_date": "September/October 2012"
},
{
"title": "School’s Out, Forever",
"url": "http://www.bostonmagazine.com/articles/2012/08/edx-online-classes-schools-ou
t-forever/",
"author": "Chris Vogel",
"image": "bostonmag_logo_178x138.jpg",
"deck": "A new online education program from Harvard and MIT is poised to transform what it means to go to college.",
"publication": "Boston Magazine",
"publish_date": "September 2012"
},
{
"title": "Q&A: Anant Agarwal, edX’s president and first professor",
"url": "http://www.bostonmagazine.com/articles/2012/08/edx-online-classes-schools-ou
t-forever/",
"author": " Molly Petrilla ",
"image": "smartplanet_logo_178x138.jpg",
"deck": "",
"publication": "Smart Planet",
"publish_date": "September 3, 2012"
},
{
"title": "EdX To Offer Proctored Final Exam For One Course",
"url": "http://www.thecrimson.com/article/2012/9/7/edx-offer-proctored-exams/",
"author": "Samuel Y. Weinstock",
"image": "harvardcrimson_logo_178x138.jpeg",
"deck": "",
"publication": "Harvard Crimson",
"publish_date": "September 7, 2012"
},
{
"title": "MOOCing On Site",
"url": "http://www.insidehighered.com/news/2012/09/07/site-based-testing-deals-strengthen-case-granting-credit-mooc-students",
"author": "Steve Kolowich ",
"image": "insidehighered_logo_178x138.jpg",
"deck": "",
"publication": "Inside Higher Education",
"publish_date": "September 7, 2012"
},
{
"title": "edX Curbs the Downfalls of Online Education By Announcing Supervised Final Exams",
"url": "http://bostinno.com/2012/09/07/edx-pearson-proctored-exams/",
"author": "Lauren Landry",
"image": "bostinno_logo_178x138.jpg",
"deck": "",
"publication": "Bostinno",
"publish_date": "September 7, 2012"
},
{
"title": "Harvard and MIT online courses get 'real world' exams",
"url": "http://www.bbc.co.uk/news/education-19505776",
"author": "Sean Coughlan",
"image": "bbc_logo_178x138.jpeg",
"deck": "",
"publication": "BBC",
"publish_date": "September 6, 2012"
},
{
"title": "Harvard-MIT Online School EdX to Offer Supervised Final Exams",
"url": "http://www.businessweek.com/news/2012-09-06/harvard-mit-online-school-edx-to-offer-supervised-final-exams",
"author": "Oliver Staley",
"image": "bloomberg_logo_178x138.jpeg",
"deck": "",
"publication": "Bloomberg Business Week",
"publish_date": "September 6, 2012"
},
{
"title": "Colorado State to Offer Credits for Online Class",
"url": "http://www.nytimes.com/2012/09/07/education/colorado-state-to-offer-credits-for-online-class.html?_r=3",
"author": "Tamar Lewin",
"image": "nyt_logo_178x138.jpeg",
"deck": "",
"publication": "New York Times",
"publish_date": "September 6, 2012"
},
{
"title": "edX Offers Proctored Exams for Open Online Course",
"url": "http://chronicle.com/blogs/wiredcampus/edx-offers-proctored-exams-for-open-online-course/39656",
"author": " Marc Parry",
"image": "chroniclehighered_logo_178x138.jpeg",
"deck": "",
"publication": "Chronicle of Higher Education",
"publish_date": "September 6, 2012"
},
{
"title": "edX Offers Proctored Exams for Open Online Course",
"url": "http://itbriefing.net/modules.php?op=modload&name=News&file=article&sid=323229&newlang=eng&topic=15&catid=37",
"author": "",
"image": "itbriefing_logo_178x138.jpg",
"deck": "",
"publication": "ITBriefing.net",
"publish_date": "September 6, 2012"
},
{
"title": "Student Loans: Debt for Life",
"url": "http://www.businessweek.com/articles/2012-09-06/student-loans-debt-for-life#p3",
"author": "Peter Coy",
"image": "bloomberg_logo_178x138.jpeg",
"deck": "",
"publication": "Bloomberg Business Week",
"publish_date": "September 6, 2012"
},
{
"title": "Straighterline wants to help professors expand reach, while students save",
"url": "http://www.baltimoresun.com/business/technology/blog/bs-bz-straighterline-college-professors-20120904,0,6114022.story",
"author": "Gus G. Sentementes",
"image": "baltsun_logo_178x138.jpg",
"deck": "",
"publication": "The Baltimore Sun",
"publish_date": "September 4, 2012"
},
{
"title": "Want to be a reporter? Learn to code",
"url": "http://gigaom.com/cloud/want-to-be-a-reporter-learn-to-code/",
"author": "Barb Darrow",
"image": "gigaom_logo_178x138.jpeg",
"deck": "",
"publication": "GigaOM",
"publish_date": "September 4, 2012"
},
{
"title": "MOOC Brigade: Will Massive, Open Online Courses Revolutionize Higher Education?",
"url": "http://nation.time.com/2012/09/04/mooc-brigade-will-massive-open-online-courses-revolutionize-higher-education/",
"author": "Kayla Webley",
"image": "time_logo_178x138.jpg",
"deck": "",
"publication": "Time",
"publish_date": "September 4, 2012"
},
{
"title": "Ivy walls lower with free online classes from Coursera and edX ",
"url": "http://www.csmonitor.com/Innovation/Pioneers/2012/0903/Ivy-walls-lower-with-free-online-classes-from-Coursera-and-edX",
"author": "Chris Gaylord",
"image": "csmonitor_logo_178x138.jpg",
"deck": "",
"publication": "Christian Science Monitor",
"publish_date": "September 3, 2012"
},
{
"title": "Summer recap. RLADs, new edX partner, Institute files amicus brief",
"url": "http://tech.mit.edu/V132/N34/summer.html",
"author": "",
"image": "thetech_logo_178x138.jpg",
"deck": "",
"publication": "The Tech",
"publish_date": "September 4, 2012"
},
{
"title": "Into the Future With MOOC's",
"url": "http://chronicle.com/article/Into-the-Future-With-MOOCs/134080/",
"author": "Kevin Carey",
"image": "chroniclehighered_logo_178x138.jpeg",
"deck": "",
"publication": "The Chronicle of Higher Education",
"publish_date": "September 3, 2012"
},
{
"title": "The Future Of Higher Education",
"url": "http://radioboston.wbur.org/2012/08/20/higher-education-online",
"author": "",
"image": "radioboston_logo_178x138.jpg",
"deck": "",
"publication": "NPR/Radio Boston",
"publish_date": "August 20, 2012"
},
{
"title": "Berkeley Joins edX",
"url": "http://www.insidehighered.com/quicktakes/2012/07/24/berkeley-joins-edx",
"author": "Tamar Lewin",
"image": "insidehighered_logo_178x138.jpg",
"deck": "",
"publication": "Inside Higher Ed",
"publish_date": "July 24, 2012"
},
{
"title": "Berkeley to Join the Free Online Learning Partnership EdX",
"url": "http://www.nytimes.com/2012/07/24/education/berkeley-to-offer-free-online-classes-on-edx.html?_r=1",
......
......@@ -37,4 +37,3 @@
% endfor
</section>
</section>
......@@ -237,6 +237,7 @@ if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'):
urlpatterns += (
url(r'^migrate/modules$', 'lms_migration.migrate.manage_modulestores'),
url(r'^migrate/reload/(?P<reload_dir>[^/]+)$', 'lms_migration.migrate.manage_modulestores'),
url(r'^migrate/reload/(?P<reload_dir>[^/]+)/(?P<commit_id>[^/]+)$', 'lms_migration.migrate.manage_modulestores'),
url(r'^gitreload$', 'lms_migration.migrate.gitreload'),
url(r'^gitreload/(?P<reload_dir>[^/]+)$', 'lms_migration.migrate.gitreload'),
)
......
......@@ -227,3 +227,13 @@ namespace :cms do
end
end
end
desc "Build a properties file used to trigger autodeploy builds"
task :autodeploy_properties do
File.open("autodeploy.properties", "w") do |file|
file.puts("UPSTREAM_NOOP=false")
file.puts("UPSTREAM_BRANCH=#{BRANCH}")
file.puts("UPSTREAM_JOB=#{PACKAGE_NAME}")
file.puts("UPSTREAM_REVISION=#{COMMIT}")
end
end
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