@@ -48,6 +48,22 @@ public function initialize()
4848 $ this ->defineField ('sections_as_chapters ' , \Mooc \SCOPE_BLOCK , false );
4949
5050 $ this ->defineField ('scrollytelling ' , \Mooc \SCOPE_BLOCK , false );
51+
52+ $ this ->defineField ('certificate ' , \Mooc \SCOPE_BLOCK , false );
53+ $ this ->defineField ('certificate_limit ' , \Mooc \SCOPE_BLOCK , 100 );
54+ $ this ->defineField ('certificate_image_id ' , \Mooc \SCOPE_BLOCK , '' );
55+
56+ $ this ->defineField ('reminder ' , \Mooc \SCOPE_BLOCK , false );
57+ $ this ->defineField ('reminder_message ' , \Mooc \SCOPE_BLOCK , '' );
58+ $ this ->defineField ('reminder_interval ' , \Mooc \SCOPE_BLOCK , 0 );
59+ $ this ->defineField ('reminder_start_date ' , \Mooc \SCOPE_BLOCK , 0 );
60+ $ this ->defineField ('reminder_end_date ' , \Mooc \SCOPE_BLOCK , '' );
61+
62+ $ this ->defineField ('resetter ' , \Mooc \SCOPE_BLOCK , false );
63+ $ this ->defineField ('resetter_message ' , \Mooc \SCOPE_BLOCK , '' );
64+ $ this ->defineField ('resetter_interval ' , \Mooc \SCOPE_BLOCK , 0 );
65+ $ this ->defineField ('resetter_start_date ' , \Mooc \SCOPE_BLOCK , '' );
66+ $ this ->defineField ('resetter_end_date ' , \Mooc \SCOPE_BLOCK , '' );
5167 }
5268
5369 public function student_view ($ context = array ())
@@ -130,6 +146,7 @@ public function student_view($context = array())
130146 'show_section_nav ' => $ this ->show_section_nav ,
131147 'sections_as_chapters ' => $ this ->sections_as_chapters ,
132148 'scrollytelling ' => $ this ->scrollytelling ,
149+ 'certificate ' => $ this ->certificate ,
133150 'isSequential ' => $ this ->progression == 'seq ' ,
134151 'active_section ' => $ active_section ,
135152 'cw_title ' => $ courseware ->title ,
@@ -437,6 +454,136 @@ public function getScrollytelling()
437454 return $ this ->scrollytelling ;
438455 }
439456
457+ public function setCertificate ($ state )
458+ {
459+ $ this ->certificate = $ state ;
460+ }
461+
462+ public function getCertificate ()
463+ {
464+ return $ this ->certificate ;
465+ }
466+
467+ public function setCertificateLimit ($ state )
468+ {
469+ $ this ->certificate_limit = $ state ;
470+ }
471+
472+ public function getCertificateLimit ()
473+ {
474+ return $ this ->certificate_limit ;
475+ }
476+
477+ public function setCertificateImageId ($ state )
478+ {
479+ $ this ->certificate_image_id = $ state ;
480+ }
481+
482+ public function getCertificateImageId ()
483+ {
484+ return $ this ->certificate_image_id ;
485+ }
486+
487+ public function setReminder ($ state )
488+ {
489+ $ this ->reminder = $ state ;
490+ }
491+
492+ public function getReminder ()
493+ {
494+ return $ this ->reminder ;
495+ }
496+
497+ public function setReminderInterval ($ state )
498+ {
499+ $ this ->reminder_interval = $ state ;
500+ }
501+
502+ public function getReminderInterval ()
503+ {
504+ return $ this ->reminder_interval ;
505+ }
506+
507+ public function setReminderMessage ($ state )
508+ {
509+ $ this ->reminder_message = $ state ;
510+ }
511+
512+ public function getReminderMessage ()
513+ {
514+ return $ this ->reminder_message ;
515+ }
516+
517+ public function setReminderStartDate ($ state )
518+ {
519+ $ this ->reminder_start_date = $ state ;
520+ }
521+
522+ public function getReminderStartDate ()
523+ {
524+ return $ this ->reminder_start_date == '' ? '' : date ('d.m.Y ' , (int ) $ this ->reminder_start_date );
525+ }
526+
527+ public function setReminderEndDate ($ state )
528+ {
529+ $ this ->reminder_end_date = $ state ;
530+ }
531+
532+ public function getReminderEndDate ()
533+ {
534+ return $ this ->reminder_end_date == '' ? '' : date ('d.m.Y ' , (int ) $ this ->reminder_end_date );
535+ }
536+
537+ public function setResetter ($ state )
538+ {
539+ $ this ->resetter = $ state ;
540+ }
541+
542+ public function getResetter ()
543+ {
544+ return $ this ->resetter ;
545+ }
546+
547+ public function setResetterInterval ($ state )
548+ {
549+ $ this ->resetter_interval = $ state ;
550+ }
551+
552+ public function getResetterInterval ()
553+ {
554+ return $ this ->resetter_interval ;
555+ }
556+
557+ public function setResetterStartDate ($ state )
558+ {
559+ return $ this ->resetter_start_date = $ state ;
560+ }
561+
562+ public function getResetterStartDate ()
563+ {
564+ return $ this ->resetter_start_date == '' ? '' : date ('d.m.Y ' , (int ) $ this ->resetter_start_date );
565+ }
566+
567+ public function setResetterEndDate ($ state )
568+ {
569+ return $ this ->resetter_end_date = $ state ;
570+ }
571+
572+ public function getResetterEndDate ()
573+ {
574+ return $ this ->resetter_end_date == '' ? '' : date ('d.m.Y ' , (int ) $ this ->resetter_end_date );
575+ }
576+
577+ public function setResetterMessage ($ state )
578+ {
579+ $ this ->resetter_message = $ state ;
580+ }
581+
582+ public function getResetterMessage ()
583+ {
584+ return $ this ->resetter_message ;
585+ }
586+
440587 ///////////////////////
441588 // PRIVATE FUNCTIONS //
442589 ///////////////////////
@@ -784,4 +931,4 @@ private function getFilesForSubChapter(\Mooc\DB\Block $subChapter)
784931
785932 return $ files ;
786933 }
787- }
934+ }
0 commit comments