| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 | 2×
2×
2×
2×
2×
2×
2×
2×
8×
8×
8×
8×
8×
8×
8×
8×
8×
8×
8×
8×
8×
8×
| var BS, CourseGroupingLabel, React, TITLE, TutorInput, _;
React = require('react');
BS = require('react-bootstrap');
_ = require('underscore');
TutorInput = require('../tutor-input').TutorInput;
CourseGroupingLabel = require('../course-grouping-label');
TITLE = 'Get Student Enrollment Code';
module.exports = React.createClass({
displayName: 'PeriodEnrollmentCode',
propTypes: {
activeTab: React.PropTypes.object.isRequired,
periods: React.PropTypes.array.isRequired,
bookUrl: React.PropTypes.string.isRequired,
bookName: React.PropTypes.string.isRequired
},
getEnrollmentCode: function(name, periods) {
var period;
period = _.findWhere(periods, {
name: name
});
return period.enrollment_code;
},
getInstructions: function(code) {
var bookName, bookUrl, msg, ref, url;
ref = this.props, bookUrl = ref.bookUrl, bookName = ref.bookName;
url = bookUrl + ':3';
msg = "As you read your OpenStax textbook online, you will come across embedded Concept Coach question sets to help you understand and retain what you’ve read.\n\nFollow the steps below to register for Concept Coach:\n\n1. Paste this link in your web browser to visit the class textbook:\n" + url + "\n\n2. Click on section 1.1 in the book. Scroll to the bottom of the section and click on the Concept Coach button.\n\n3. On the right side of the screen, enter your two-word enrollment code:\n" + code + "\n\n4. On the next screen, click “Click to begin login.” Then click “Sign up” and follow the prompts to create your free account.\n\n5. Continue to your Concept Coach questions!";
return React.createElement("div", null, React.createElement("div", {
"className": 'summary'
}, React.createElement("p", null, "The two-word enrollment code for this section is:"), React.createElement("p", {
"className": 'code'
}, code), React.createElement("p", null, "Each section of your course will have a\ndifferent two-word enrollment code.")), React.createElement("div", {
"className": 'callout'
}, React.createElement("p", null, React.createElement("span", {
"className": 'emphasis'
}, "Copy the example message below "), "to post in your Learning Management System or to email your students:")), React.createElement("textarea", {
"readOnly": true,
"onClick": this.selectText,
"value": msg
}));
},
selectText: function(ev) {
return ev.target.select();
},
renderForm: function() {
var activeTab, codeInstructions, enrollmentCode, periods, ref;
ref = this.props, activeTab = ref.activeTab, periods = ref.periods;
enrollmentCode = this.getEnrollmentCode(activeTab.name, periods);
codeInstructions = this.getInstructions(enrollmentCode);
return React.createElement(BS.Modal, React.__spread({}, this.props, {
"title": TITLE,
"className": "teacher-edit-period-modal"
}), React.createElement("div", {
"className": 'modal-body teacher-enrollment-code-modal'
}, React.createElement("div", {
"className": 'enrollment-code'
}, codeInstructions)));
},
render: function() {
return React.createElement(BS.OverlayTrigger, {
"ref": 'overlay',
"rootClose": true,
"trigger": 'click',
"overlay": this.renderForm()
}, React.createElement(BS.Button, {
"bsStyle": 'link',
"className": 'show-enrollment-code'
}, React.createElement("i", {
"className": 'fa fa-qrcode'
}), " ", TITLE));
}
});
|