Data chiusura corsi

Plugins, funzionalità sviluppate dagli utenti, patch, fix...
Post Reply
User avatar
alberto
FormaLms Guru
Posts: 1134
Joined: Fri Mar 02, 2012 9:18 am
Contact:

Data chiusura corsi

Post by alberto »

Per default i corsi sulla pagina “i miei corsi” non si chiudono automaticamente alla data di chiusura. Perchè funzioni e compaia correttamente il lucchetto è sufficiente togliere il commento allla funzione che controlla lo stato sulla data nel file /doceboLms/lib/lib.course.php

Code: Select all


// control if the course is elapsed
		/*if($course['date_begin'] != '0000-00-00') {

			$time_begin = fromDatetimeToTimestamp($course['date_begin']);

			if($now < $time_begin) return array('can' => false, 'reason' => 'course_date', 'expiring_in' => $expiring);
		}
		if($course['date_end'] != '0000-00-00') {

			$time_end = fromDatetimeToTimestamp($course['date_end']);

			if($now > $time_end) return array('can' => false, 'reason' => 'course_date', 'expiring_in' => $expiring);
		}
		if($course['valid_time'] != '0' && $course['valid_time'] != '' && $course['date_first_access'] != '') {

			$time_first_access = fromDatetimeToTimestamp($course['date_first_access']);

			if($now > ( $time_first_access + ($course['valid_time'] * 24 * 3600 ) )) return array('can' => true, 'reason' => 'course_valid_time', 'expiring_in' => $expiring);
		}*/

Post Reply