-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstudentmatrix-installwizard.js
More file actions
165 lines (154 loc) · 7.59 KB
/
studentmatrix-installwizard.js
File metadata and controls
165 lines (154 loc) · 7.59 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/**
* @file
* Menu entries for step-by-step set up of StudentMatrix.
*/
StudentMatrix.plugins.installwizard = {
name : 'Installation wizard',
description : 'Adds menu entries for step by step installation.',
version : '1.2',
updateUrl : 'https://raw.github.com/Itangalo/studentmatrix/3.x/studentmatrix-installwizard.js',
cell : 'D9',
dependencies : {
core : '3.2',
modules : {
settings : '1.0',
menu : '1.3',
infopages : '1.0',
},
},
menuEntries : {
install1 : {
name : 'Step 1: Choose plugins and modules',
weight : -7,
},
installwizard_break : {
name : null,
weight : -1,
}
},
infoPages : {
install1 : {
title : 'Step 1: Choose plugins and modules',
content : function(container) {
var app = UiApp.getActiveApplication();
container.add(app.createHTML('StudentMatrix is a tool for making it easier to digitally manage student data. With StudentMatrix you can select a number of students, and do things like send customized e-mail, share files, or create and update spreadsheets with assessment information.<br /><br />'));
container.add(app.createHTML('What you can and cannot do with your students depend on which plugins you have enabled. First step is to choose which plugins you want to use.<br /><br />'));
container.add(app.createHTML('Hint 1: If the settings are confusing, you can just leave all plugins on, and change them later on from the settings menu.<br /><br />'));
container.add(app.createHTML('Hint 2: Once you have clicked the button below, a "step 2" option in the menu will appear. Try it!<br /><br />'));
},
doneText : 'Show the list of plugins',
afterProcess : function() {
StudentMatrix.setProperty(StudentMatrix.plugins.installwizard.menuEntries.install1, 'StudentMatrixMenu', 'install1');
var entry = {
callback : 'modules.infopages.showPage',
arguments : ['install2'],
name : 'Step 2: Set up columns',
weight : -5,
};
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'install2');
StudentMatrix.modules.menu.buildMenuEntries();
StudentMatrix.modules.settings.showSettings(null, 'Plugin and module management');
},
},
install2 : {
title : 'Step 2: Set up columns',
content : function(container) {
var app = UiApp.getActiveApplication();
container.add(app.createHTML('StudentMatrix will be reading data from a list of students that you enter in the spreadsheet. Depending on what plugins you are using, different columns will be used to read and write data about the students.<br /><br />'));
container.add(app.createHTML('You can change the name of the columns if you like, and you can your own columns with data too.<br /><br />'));
container.add(app.createHTML('If you want to see which columns are used by plugins, or change which are being used, visit the settings. (You can also change what tab is used to read your student list, if you like.)<br /><br />'));
},
doneText : 'Create the necessary columns',
afterProcess : function() {
var entry = {
callback : 'modules.infopages.showPage',
arguments : ['install3'],
name : 'Step 3: Add students',
weight : -3,
};
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'install3');
StudentMatrix.modules.menu.buildMenuEntries();
StudentMatrix.setUpColumns();
},
},
install3 : {
title : 'Step 3: Add your students',
content : function(container) {
var app = UiApp.getActiveApplication();
container.add(app.createHTML('All right! All the difficult parts are done. Before you start working with StudentMatrix, though, you need to add a list of students.<br /><br />'));
container.add(app.createHTML('Add names in the names column, and e-mail addresses in the column for that.<br /><br />'));
container.add(app.createHTML('Hint 1: Many StudentMatrix plugins assume that the e-mail address is a Google account.<br /><br />'));
container.add(app.createHTML('Hint 2: The "process" column is used to mark which students should or should not be processed, when you perform actions on the student rows. If you get tired of clicking check boxes in the student actions settings, you can just enter 1 in rows that should be processed instead.<br /><br />'));
},
doneText : 'Got it! Let me add my students.',
afterProcess : function() {
var entry = {
callback : 'modules.infopages.showPage',
arguments : ['install4'],
name : 'Step 4: Check the settings',
weight : -3,
};
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'install4');
StudentMatrix.modules.menu.buildMenuEntries();
StudentMatrix.setUpColumns();
},
},
install4 : {
title : 'Step 4: Check the settings',
content : function(container) {
var app = UiApp.getActiveApplication();
container.add(app.createHTML('That\'s it! But before you start working with StudentMatrix, it makes sense to have a look at the settings.<br /><br />'));
container.add(app.createHTML('(For example: If you want to use StudentMatrix for spreadsheets with assessment information, you have to specify a spreadsheet template. Check the "student sheet setup" settings for this.)<br /><br />'));
},
doneText : 'Show me the settings',
afterProcess : function() {
var entry = {
callback : 'modules.infopages.showPage',
arguments : ['install5'],
name : 'Step 5: How to get further help',
weight : -2,
};
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'install5');
StudentMatrix.modules.menu.buildMenuEntries();
StudentMatrix.modules.settings.settingsDialog();
},
},
install5 : {
title : 'Step 5: How to get furter help',
content : function(container) {
var app = UiApp.getActiveApplication();
container.add(app.createHTML('You have now set up StudentMatrix. Congratulations!<br /><br />'));
container.add(app.createHTML('You can find links to video guides and more in the "help" section in the menu. Good luck!<br /><br />'));
},
doneText : 'I\'m done, remove the installation from the menu',
afterProcess : function() {
var entry = StudentMatrix.getProperty('StudentMatrixMenu', 'installwizard_break');
entry.disabled = true;
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'installwizard_break');
entry = StudentMatrix.getProperty('StudentMatrixMenu', 'install1');
entry.disabled = true;
StudentMatrix.setProperty(entry, 'StudentMatrixMenu', 'install1');
StudentMatrix.deleteProperty('StudentMatrixMenu', 'install2');
StudentMatrix.deleteProperty('StudentMatrixMenu', 'install3');
StudentMatrix.deleteProperty('StudentMatrixMenu', 'install4');
StudentMatrix.deleteProperty('StudentMatrixMenu', 'install5');
StudentMatrix.modules.menu.buildMenuEntries();
},
},
},
};
function StudentMatrixMenu_install1() {
StudentMatrix.modules.infopages.showPage('install1');
}
function StudentMatrixMenu_install2() {
StudentMatrix.modules.menu.callMenuItem('install2');
}
function StudentMatrixMenu_install3() {
StudentMatrix.modules.menu.callMenuItem('install3');
}
function StudentMatrixMenu_install4() {
StudentMatrix.modules.menu.callMenuItem('install4');
}
function StudentMatrixMenu_install5() {
StudentMatrix.modules.menu.callMenuItem('install5');
}