@@ -15,180 +15,138 @@ define(
15
15
category : null ,
16
16
data : null ,
17
17
metadata : null ,
18
- /**
19
- * The Studio URL for this xblock, or null if it doesn't have one.
20
- */
18
+ /** The Studio URL for this xblock, or null if it doesn't have one. */
21
19
studio_url : null ,
22
20
/**
23
- * An optional object with information about the children as well as about
24
- * the primary xblock type that is supported as a child.
25
- */
21
+ * An optional object with information about the children as well as about
22
+ * the primary xblock type that is supported as a child.
23
+ */
26
24
child_info : null ,
27
- /**
28
- * An optional object with information about each of the ancestors.
29
- */
25
+ /** An optional object with information about each of the ancestors. */
30
26
ancestor_info : null ,
31
- /**
32
- * Date of the last edit to this xblock or any of its descendants.
33
- */
27
+ /** Date of the last edit to this xblock or any of its descendants. */
34
28
edited_on : null ,
35
29
/**
36
- * User who last edited the xblock or any of its descendants. Will only be present if
37
- * publishing info was explicitly requested.
38
- */
30
+ * User who last edited the xblock or any of its descendants. Will only be present if
31
+ * publishing info was explicitly requested.
32
+ */
39
33
edited_by : null ,
40
- /**
41
- * True iff a published version of the xblock exists.
42
- */
34
+ /** True iff a published version of the xblock exists. */
43
35
published : null ,
44
- /**
45
- * Date of the last publish of this xblock, or null if never published.
46
- */
36
+ /** Date of the last publish of this xblock, or null if never published. */
47
37
published_on : null ,
48
38
/**
49
- * User who last published the xblock, or null if never published. Will only be present if
50
- * publishing info was explicitly requested.
51
- */
39
+ * User who last published the xblock, or null if never published. Will only be present if
40
+ * publishing info was explicitly requested.
41
+ */
52
42
published_by : null ,
53
- /**
54
- * True if the xblock is a parentable xblock.
55
- */
43
+ /** True if the xblock is a parentable xblock. */
56
44
has_children : null ,
57
45
/**
58
- * True if the xblock has changes.
59
- * Note: this is not always provided as a performance optimization. It is only provided for
60
- * verticals functioning as units.
61
- */
46
+ * True if the xblock has changes.
47
+ * Note: this is not always provided as a performance optimization. It is only provided for
48
+ * verticals functioning as units.
49
+ */
62
50
has_changes : null ,
63
51
/**
64
- * Represents the possible publish states for an xblock. See the documentation
65
- * for XBlockVisibility to see a comprehensive enumeration of the states.
66
- */
52
+ * Represents the possible publish states for an xblock. See the documentation
53
+ * for XBlockVisibility to see a comprehensive enumeration of the states.
54
+ */
67
55
visibility_state : null ,
68
56
/**
69
- * True if the release date of the xblock is in the past.
70
- */
57
+ * True if the release date of the xblock is in the past.
58
+ */
71
59
released_to_students : null ,
72
60
/**
73
- * If the xblock is published, the date on which it will be released to students.
74
- * This can be null if the release date is unscheduled.
75
- */
61
+ * If the xblock is published, the date on which it will be released to students.
62
+ * This can be null if the release date is unscheduled.
63
+ */
76
64
release_date : null ,
77
65
/**
78
- * The xblock which is determining the release date. For instance, for a unit,
79
- * this will either be the parent subsection or the grandparent section.
80
- * This can be null if the release date is unscheduled. Will only be present if
81
- * publishing info was explicitly requested.
82
- */
66
+ * The xblock which is determining the release date. For instance, for a unit,
67
+ * this will either be the parent subsection or the grandparent section.
68
+ * This can be null if the release date is unscheduled. Will only be present if
69
+ * publishing info was explicitly requested.
70
+ */
83
71
release_date_from : null ,
84
72
/**
85
- * True if this xblock is currently visible to students. This is computed server-side
86
- * so that the logic isn't duplicated on the client. Will only be present if
87
- * publishing info was explicitly requested.
88
- */
73
+ * True if this xblock is currently visible to students. This is computed server-side
74
+ * so that the logic isn't duplicated on the client. Will only be present if
75
+ * publishing info was explicitly requested.
76
+ */
89
77
currently_visible_to_students : null ,
90
78
/**
91
- * If xblock is graded, the date after which student assessment will be evaluated.
92
- * It has same format as release date, for example: 'Jan 02, 2015 at 00:00 UTC'.
93
- */
79
+ * If xblock is graded, the date after which student assessment will be evaluated.
80
+ * It has same format as release date, for example: 'Jan 02, 2015 at 00:00 UTC'.
81
+ */
94
82
due_date : null ,
95
- /**
96
- * Grading policy for xblock.
97
- */
83
+ /** Grading policy for xblock. */
98
84
format : null ,
99
- /**
100
- * List of course graders names.
101
- */
85
+ /** List of course graders names. */
102
86
course_graders : null ,
103
- /**
104
- * True if this xblock contributes to the final course grade.
105
- */
87
+ /** True if this xblock contributes to the final course grade. */
106
88
graded : null ,
107
- /**
108
- * The same as `release_date` but as an ISO-formatted date string.
109
- */
89
+ /** The same as `release_date` but as an ISO-formatted date string. */
110
90
start : null ,
111
- /**
112
- * The same as `due_date` but as an ISO-formatted date string.
113
- */
91
+ /** The same as `due_date` but as an ISO-formatted date string. */
114
92
due : null ,
115
- /**
116
- * True iff this xblock is explicitly staff locked.
117
- */
93
+ /** True iff this xblock is explicitly staff locked. */
118
94
has_explicit_staff_lock : null ,
119
- /**
120
- * True iff this any of this xblock's ancestors are staff locked.
121
- */
95
+ /** True iff this any of this xblock's ancestors are staff locked. */
122
96
ancestor_has_staff_lock : null ,
123
97
/**
124
- * The xblock which is determining the staff lock value. For instance, for a unit,
125
- * this will either be the parent subsection or the grandparent section.
126
- * This can be null if the xblock has no inherited staff lock. Will only be present if
127
- * publishing info was explicitly requested.
128
- */
98
+ * The xblock which is determining the staff lock value. For instance, for a unit,
99
+ * this will either be the parent subsection or the grandparent section.
100
+ * This can be null if the xblock has no inherited staff lock. Will only be present if
101
+ * publishing info was explicitly requested.
102
+ */
129
103
staff_lock_from : null ,
130
- /**
131
- * True iff this xblock should display a "Contains staff only content" message.
132
- */
104
+ /** True iff this xblock should display a "Contains staff only content" message. */
133
105
staff_only_message : null ,
134
106
/**
135
- * True iff this xblock is a unit, and it has children that are only visible to certain
136
- * user partition groups. Note that this is not a recursive property. Will only be present if
137
- * publishing info was explicitly requested.
138
- */
107
+ * True iff this xblock is a unit, and it has children that are only visible to certain
108
+ * user partition groups. Note that this is not a recursive property. Will only be present if
109
+ * publishing info was explicitly requested.
110
+ */
139
111
has_partition_group_components : null ,
140
112
/**
141
- * actions defines the state of delete, drag and child add functionality for a xblock.
142
- * currently, each xblock has default value of 'True' for keys: deletable, draggable and childAddable.
143
- */
113
+ * actions defines the state of delete, drag and child add functionality for a xblock.
114
+ * currently, each xblock has default value of 'True' for keys: deletable, draggable and childAddable.
115
+ */
144
116
actions : null ,
145
- /**
146
- * Header visible to UI.
147
- */
117
+ /** Header visible to UI. */
148
118
is_header_visible : null ,
149
- /**
150
- * Optional explanatory message about the xblock.
151
- */
119
+ /** Optional explanatory message about the xblock. */
152
120
explanatory_message : null ,
153
121
/**
154
- * The XBlock's group access rules. This is a dictionary keyed to user partition IDs,
155
- * where the values are lists of group IDs.
156
- */
122
+ * The XBlock's group access rules. This is a dictionary keyed to user partition IDs,
123
+ * where the values are lists of group IDs.
124
+ */
157
125
group_access : null ,
158
126
/**
159
- * User partition dictionary. This is pre-processed by Studio, so it contains
160
- * some additional fields that are not stored in the course descriptor
161
- * (for example, which groups are selected for this particular XBlock).
162
- */
127
+ * User partition dictionary. This is pre-processed by Studio, so it contains
128
+ * some additional fields that are not stored in the course descriptor
129
+ * (for example, which groups are selected for this particular XBlock).
130
+ */
163
131
user_partitions : null ,
164
- /**
165
- * This xBlock's Highlights to message to learners.
166
- */
132
+ /** This xBlock's Highlights to message to learners. */
167
133
highlights : [ ] ,
168
134
highlights_enabled : false ,
169
135
highlights_enabled_for_messaging : false ,
170
136
highlights_preview_only : true ,
171
137
highlights_doc_url : '' ,
172
- /**
173
- * True if summary configuration is enabled.
174
- */
138
+ /** True if summary configuration is enabled. */
175
139
summary_configuration_enabled : null ,
176
- /**
177
- * List of tags of the unit. This list is managed by the content_tagging module.
178
- */
179
- tags : null ,
180
- /**
181
- * True if the xblock is not visible to students only via links.
182
- */
183
- hide_from_toc : null ,
184
- /**
185
- * True iff this xblock should display a "Contains staff only content" message.
186
- */
187
- hide_from_toc_message : null ,
140
+ /** List of tags of the unit. This list is managed by the content_tagging module. */
141
+ tags : null ,
142
+ /** True if the xblock is not visible to students only via links. */
143
+ hide_from_toc : null ,
144
+ /** True iff this xblock should display a "Contains staff only content" message. */
145
+ hide_from_toc_message : null ,
188
146
} ,
189
147
190
148
initialize : function ( ) {
191
- // Extend our Model by helper methods.
149
+ // Extend our Model by helper methods.
192
150
_ . extend ( this , this . getCategoryHelpers ( ) ) ;
193
151
} ,
194
152
@@ -245,9 +203,9 @@ define(
245
203
} ,
246
204
247
205
/**
248
- * Return true if action is required e.g. delete, drag, add new child etc or if given key is not present.
249
- * @return {boolean }
250
- */
206
+ * Return true if action is required e.g. delete, drag, add new child etc or if given key is not present.
207
+ * @return {boolean }
208
+ */
251
209
isActionRequired : function ( actionName ) {
252
210
var actions = this . get ( 'actions' ) ;
253
211
if ( actions !== null ) {
@@ -259,9 +217,9 @@ define(
259
217
} ,
260
218
261
219
/**
262
- * Return a list of convenience methods to check affiliation to the category.
263
- * @return {Array }
264
- */
220
+ * Return a list of convenience methods to check affiliation to the category.
221
+ * @return {Array }
222
+ */
265
223
getCategoryHelpers : function ( ) {
266
224
var categories = [ 'course' , 'chapter' , 'sequential' , 'vertical' ] ,
267
225
helpers = { } ;
@@ -276,9 +234,9 @@ define(
276
234
} ,
277
235
278
236
/**
279
- * Check if we can edit current XBlock or not on Course Outline page.
280
- * @return {Boolean }
281
- */
237
+ * Check if we can edit current XBlock or not on Course Outline page.
238
+ * @return {Boolean }
239
+ */
282
240
isEditableOnCourseOutline : function ( ) {
283
241
return this . isSequential ( ) || this . isChapter ( ) || this . isVertical ( ) ;
284
242
}
0 commit comments