parent
5a225eb247
commit
db43bfe368
@ -0,0 +1,18 @@ |
||||
oneup_flysystem: |
||||
adapters: |
||||
courses_adapter: |
||||
local: |
||||
directory: '%kernel.project_dir%/var/courses' |
||||
|
||||
# s3.adapter: |
||||
# awss3v3: |
||||
# client: s3_client # add service "s3_client" |
||||
# bucket: ~ |
||||
# prefix: ~ |
||||
filesystems: |
||||
courses: |
||||
adapter: courses_adapter |
||||
visibility: private |
||||
cache: ~ |
||||
alias: ~ |
||||
mount: ~ |
@ -0,0 +1,44 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\CourseBundle\Event; |
||||
|
||||
use Symfony\Component\EventDispatcher\Event; |
||||
use Chamilo\UserBundle\Entity\User; |
||||
use Chamilo\CoreBundle\Entity\Course; |
||||
|
||||
/** |
||||
* Class CourseAccess |
||||
* @package Chamilo\CourseBundle\Event |
||||
*/ |
||||
class CourseAccess extends Event |
||||
{ |
||||
protected $user; |
||||
protected $course; |
||||
|
||||
/** |
||||
* @param $user |
||||
* @param $course |
||||
*/ |
||||
public function __construct($user, $course) |
||||
{ |
||||
$this->user = $user; |
||||
$this->course = $course; |
||||
} |
||||
|
||||
/** |
||||
* @return User |
||||
*/ |
||||
public function getUser() |
||||
{ |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @return Course |
||||
*/ |
||||
public function getCourse() |
||||
{ |
||||
return $this->course; |
||||
} |
||||
} |
@ -0,0 +1,51 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\CourseBundle\Event; |
||||
|
||||
use Chamilo\CoreBundle\Entity\Course; |
||||
use Chamilo\CoreBundle\Entity\Session; |
||||
use Chamilo\UserBundle\Entity\User; |
||||
use Symfony\Component\EventDispatcher\Event; |
||||
|
||||
/** |
||||
* Class SessionAccess |
||||
* @package Chamilo\CourseBundle\Event |
||||
*/ |
||||
class SessionAccess extends Event |
||||
{ |
||||
protected $user; |
||||
protected $course; |
||||
protected $session; |
||||
|
||||
public function __construct($user, $course, $session) |
||||
{ |
||||
$this->user = $user; |
||||
$this->course = $course; |
||||
$this->session = $session; |
||||
} |
||||
|
||||
/** |
||||
* @return User |
||||
*/ |
||||
public function getUser() |
||||
{ |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @return Course |
||||
*/ |
||||
public function getCourse() |
||||
{ |
||||
return $this->course; |
||||
} |
||||
|
||||
/** |
||||
* @return Session |
||||
*/ |
||||
public function getSession() |
||||
{ |
||||
return $this->session; |
||||
} |
||||
} |
Loading…
Reference in new issue