@@ -173,7 +173,7 @@ exports.request = function(req, res) {
173
173
} else if ( concern . q14_value ) {
174
174
callback ( null , client , done , document , course , revision , description , concern , 3 ) ;
175
175
} else {
176
- // Check if document has been already in review
176
+ // Check if document has already been in review
177
177
if ( document . status === 5 ) {
178
178
callback ( null , client , done , document , course , revision , description , concern , 3 ) ;
179
179
} else {
@@ -258,129 +258,130 @@ exports.request = function(req, res) {
258
258
}
259
259
} ,
260
260
function ( client , done , document , course , revision , description , concern , author , members , callback ) {
261
+
261
262
// Check status to notify members, in case of a review
262
263
if ( document . status === 2 ) {
263
264
callback ( null , 204 , null ) ;
264
265
} else {
265
266
266
267
// Formatting
267
268
if ( concern . q01_value ) {
268
- concern . q01_label = "badge-danger " ;
269
+ concern . q01_label = "badge-warning " ;
269
270
concern . q01_sign = "yes" ;
270
271
} else {
271
- concern . q01_label = "badge-success " ;
272
+ concern . q01_label = "badge-default " ;
272
273
concern . q01_sign = "no" ;
273
274
}
274
275
275
276
if ( concern . q02_value ) {
276
- concern . q02_label = "badge-danger " ;
277
+ concern . q02_label = "badge-warning " ;
277
278
concern . q02_sign = "yes" ;
278
279
} else {
279
- concern . q02_label = "badge-success " ;
280
+ concern . q02_label = "badge-default " ;
280
281
concern . q02_sign = "no" ;
281
282
}
282
283
283
284
if ( concern . q03_value ) {
284
- concern . q03_label = "badge-danger " ;
285
+ concern . q03_label = "badge-warning " ;
285
286
concern . q03_sign = "yes" ;
286
287
} else {
287
- concern . q03_label = "badge-success " ;
288
+ concern . q03_label = "badge-default " ;
288
289
concern . q03_sign = "no" ;
289
290
}
290
291
291
292
if ( concern . q04_value ) {
292
- concern . q04_label = "badge-danger " ;
293
+ concern . q04_label = "badge-warning " ;
293
294
concern . q04_sign = "yes" ;
294
295
} else {
295
- concern . q04_label = "badge-success " ;
296
+ concern . q04_label = "badge-default " ;
296
297
concern . q04_sign = "no" ;
297
298
}
298
299
299
300
if ( concern . q05_value ) {
300
- concern . q05_label = "badge-danger " ;
301
+ concern . q05_label = "badge-warning " ;
301
302
concern . q05_sign = "yes" ;
302
303
} else {
303
- concern . q05_label = "badge-success " ;
304
+ concern . q05_label = "badge-default " ;
304
305
concern . q05_sign = "no" ;
305
306
}
306
307
307
308
if ( concern . q06_value ) {
308
- concern . q06_label = "badge-danger " ;
309
+ concern . q06_label = "badge-warning " ;
309
310
concern . q06_sign = "yes" ;
310
311
} else {
311
- concern . q06_label = "badge-success " ;
312
+ concern . q06_label = "badge-default " ;
312
313
concern . q06_sign = "no" ;
313
314
}
314
315
315
316
if ( concern . q07_value ) {
316
- concern . q07_label = "badge-danger " ;
317
+ concern . q07_label = "badge-warning " ;
317
318
concern . q07_sign = "yes" ;
318
319
} else {
319
- concern . q07_label = "badge-success " ;
320
+ concern . q07_label = "badge-default " ;
320
321
concern . q07_sign = "no" ;
321
322
}
322
323
323
324
if ( concern . q08_value ) {
324
- concern . q08_label = "badge-danger " ;
325
+ concern . q08_label = "badge-warning " ;
325
326
concern . q08_sign = "yes" ;
326
327
} else {
327
- concern . q08_label = "badge-success " ;
328
+ concern . q08_label = "badge-default " ;
328
329
concern . q08_sign = "no" ;
329
330
}
330
331
331
332
if ( concern . q09_value ) {
332
- concern . q09_label = "badge-danger " ;
333
+ concern . q09_label = "badge-warning " ;
333
334
concern . q09_sign = "yes" ;
334
335
} else {
335
- concern . q09_label = "badge-success " ;
336
+ concern . q09_label = "badge-default " ;
336
337
concern . q09_sign = "no" ;
337
338
}
338
339
339
340
if ( concern . q10_value ) {
340
- concern . q10_label = "badge-danger " ;
341
+ concern . q10_label = "badge-warning " ;
341
342
concern . q10_sign = "yes" ;
342
343
} else {
343
- concern . q10_label = "badge-success " ;
344
+ concern . q10_label = "badge-default " ;
344
345
concern . q10_sign = "no" ;
345
346
}
346
347
347
348
if ( concern . q11_1_value ) {
348
- concern . q11_1_label = "badge-danger " ;
349
+ concern . q11_1_label = "badge-warning " ;
349
350
concern . q11_1_sign = "yes" ;
350
351
} else {
351
- concern . q11_1_label = "badge-success " ;
352
+ concern . q11_1_label = "badge-default " ;
352
353
concern . q11_1_sign = "no" ;
353
354
}
354
355
355
356
if ( concern . q11_2_value ) {
356
- concern . q11_2_label = "badge-danger " ;
357
+ concern . q11_2_label = "badge-warning " ;
357
358
concern . q11_2_sign = "yes" ;
358
359
} else {
359
- concern . q11_2_label = "badge-success " ;
360
+ concern . q11_2_label = "badge-default " ;
360
361
concern . q11_2_sign = "no" ;
361
362
}
362
363
363
364
if ( concern . q12_value ) {
364
- concern . q12_label = "badge-danger " ;
365
+ concern . q12_label = "badge-warning " ;
365
366
concern . q12_sign = "yes" ;
366
367
} else {
367
- concern . q12_label = "badge-success " ;
368
+ concern . q12_label = "badge-default " ;
368
369
concern . q12_sign = "no" ;
369
370
}
370
371
371
372
if ( concern . q13_value ) {
372
- concern . q13_label = "badge-danger " ;
373
+ concern . q13_label = "badge-warning " ;
373
374
concern . q13_sign = "yes" ;
374
375
} else {
375
- concern . q13_label = "badge-success " ;
376
+ concern . q13_label = "badge-default " ;
376
377
concern . q13_sign = "no" ;
377
378
}
378
-
379
+
379
380
if ( concern . q14_value ) {
380
- concern . q14_label = "badge-danger " ;
381
+ concern . q14_label = "badge-warning " ;
381
382
concern . q14_sign = "yes" ;
382
383
} else {
383
- concern . q14_label = "badge-success " ;
384
+ concern . q14_label = "badge-default " ;
384
385
concern . q14_sign = "no" ;
385
386
}
386
387
@@ -411,17 +412,18 @@ exports.request = function(req, res) {
411
412
address : process . env . SENDER_EMAIL_ADDRESS
412
413
} ,
413
414
to : member . email_address ,
414
- subject : "[Ethics-App] A Study needs your review - Study Title : " + description . en_title ,
415
+ subject : "[Ethics-App] A document needs your review - Study title : " + description . en_title ,
415
416
text : text ,
416
417
html : output ,
417
418
messageId :
document . document_id + "[email protected] "
418
419
} , function ( err , info ) {
419
420
if ( err ) {
420
421
callback ( err ) ;
421
422
} else {
422
- callback ( ) ;
423
+ callback ( null ) ;
423
424
}
424
425
} ) ;
426
+ callback ( null ) ;
425
427
426
428
} , function ( err ) {
427
429
callback ( null , 204 , null ) ;
0 commit comments