Commit b45c0c66 authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent d38983f9
......@@ -9,13 +9,13 @@ Plugin for E015 common modules.
Either run
```bash
composer require arter/amos-videoconference
composer require elitedivision/amos-videoconference
```
or add this row
```
"arter/amos-videoconference": "dev-master"
"elitedivision/amos-videoconference": "dev-master"
```
to the require section of your `composer.json` file.
......@@ -27,16 +27,19 @@ to the require section of your `composer.json` file.
<?php
'modules' => [
'videoconference' => [
'class' => 'arter\amos\videoconference\AmosVideoconference',
'class' => 'elitedivision\amos\videoconference\AmosVideoconference',
'rbacEnabled' => false,
'jitsiDomain' => 'jitsi-server.example.com',
],
],
```
Set **jitsiDomain** to the Jitsi server address.
### 3. Apply migrations
```bash
php yii migrate/up --migrationPath=@vendor/arter/amos-videoconference/src/migrations
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-videoconference/src/migrations
```
or add this row to your migrations config in console:
......@@ -44,7 +47,7 @@ or add this row to your migrations config in console:
```php
<?php
return [
'@vendor/arter/amos-videoconference/src/migrations',
'@vendor/elitedivision/amos-videoconference/src/migrations',
];
```
......
{
"name": "arter/amos-videoconference",
"name": "elitedivision/amos-videoconference",
"description": "Amos Videoconference",
"keywords": [
"amos",
"video",
"conference"
],
"homepage": "http://www.arter.it/",
"homepage": "http://www.elitedivision.it/",
"type": "component",
"require": {
"php": ">=5.4.0",
"arter/amos-core": ">=1.9",
"arter/amos-notify": ">=1.4",
"elitedivision/amos-core": ">=1.9",
"elitedivision/amos-notify": ">=1.4",
"softark/yii2-dual-listbox": "^1.0"
},
"autoload": {
"psr-4": {
"arter\\amos\\videoconference\\": "src"
"elitedivision\\amos\\videoconference\\": "src"
}
},
"fxp-asset": {
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference
* @package elitedivision\amos\videoconference
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\videoconference;
namespace elitedivision\amos\videoconference;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\ModuleInterface;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\ModuleInterface;
use Yii;
/**
* Class AmosVideoconference
* @package arter\amos\videoconference
* @package elitedivision\amos\videoconference
*/
class AmosVideoconference extends AmosModule implements ModuleInterface
{
......@@ -38,7 +37,7 @@ class AmosVideoconference extends AmosModule implements ModuleInterface
public $name = 'Videoconference';
public $controllerNamespace = 'arter\amos\videoconference\controllers';
public $controllerNamespace = 'elitedivision\amos\videoconference\controllers';
public $config = [];
......@@ -70,7 +69,7 @@ class AmosVideoconference extends AmosModule implements ModuleInterface
{
parent::init();
\Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
\Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
// initialize the module with the configuration loaded from config.php
$config = require(__DIR__ . DIRECTORY_SEPARATOR . self::$CONFIG_FOLDER . DIRECTORY_SEPARATOR . 'config.php');
Yii::configure($this,$config );
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\moodle\assets
* @package elitedivision\amos\moodle\assets
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\videoconference\assets;
namespace elitedivision\amos\videoconference\assets;
use yii\web\AssetBundle;
use Yii;
/**
* Class VideoconferenceAsset
* @package arter\amos\videoconference\assets
* @package elitedivision\amos\videoconference\assets
*/
class VideoconferenceAsset extends AssetBundle {
/**
* @inheritdoc
*/
public $sourcePath = '@vendor/arter/amos-videoconference/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-videoconference/src/assets/web';
public $publishOptions = [
'forceCopy' => YII_DEBUG,
];
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference
* @package elitedivision\amos\videoconference
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
$jitsiDomain = "meet.test.demotestwip.it";
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\videoconference\controllers;
namespace elitedivision\amos\videoconference\controllers;
//namespace console\controllers;
use arter\amos\admin\models\UserProfile;
use arter\amos\videoconference\AmosVideoconference;
use arter\amos\videoconference\models\Videoconf;
use arter\amos\videoconference\models\VideoconfUsersMm;
use arter\amos\videoconference\utils\EmailUtil;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\videoconference\AmosVideoconference;
use elitedivision\amos\videoconference\models\Videoconf;
use elitedivision\amos\videoconference\models\VideoconfUsersMm;
use elitedivision\amos\videoconference\utils\EmailUtil;
use yii\console\Controller;
use yii\helpers\Console;
use Yii;
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference\controllers
* @package elitedivision\amos\videoconference\controllers
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\videoconference\controllers;
namespace elitedivision\amos\videoconference\controllers;
use arter\amos\dashboard\controllers\base\DashboardController;
use elitedivision\amos\dashboard\controllers\base\DashboardController;
use Yii;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
......@@ -27,7 +26,7 @@ class DefaultController extends DashboardController {
/**
* @var string $layout Layout per la dashboard interna.
*/
public $layout = "@vendor/arter/amos-core/views/layouts/dashboard_interna";
public $layout = "@vendor/elitedivision/amos-core/views/layouts/dashboard_interna";
/**
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\videoconference\controllers;
namespace elitedivision\amos\videoconference\controllers;
use arter\amos\admin\models\UserProfile;
use arter\amos\core\user\User;
use arter\amos\core\utilities\Email;
use arter\amos\notificationmanager\models\NotificationsRead;
use arter\amos\videoconference\models\base\UserProfileForm;
use arter\amos\videoconference\models\VideoconfUsersMm;
use arter\amos\videoconference\utils\EmailUtil;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\core\user\User;
use elitedivision\amos\core\utilities\Email;
use elitedivision\amos\notificationmanager\models\NotificationsRead;
use elitedivision\amos\videoconference\models\base\UserProfileForm;
use elitedivision\amos\videoconference\models\VideoconfUsersMm;
use elitedivision\amos\videoconference\utils\EmailUtil;
use Yii;
use arter\amos\videoconference\models\Videoconf;
use arter\amos\videoconference\models\VideoconfSearch;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\icons\AmosIcons;
use arter\amos\core\helpers\Html;
use arter\amos\core\helpers\T;
use elitedivision\amos\videoconference\models\Videoconf;
use elitedivision\amos\videoconference\models\VideoconfSearch;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\core\helpers\Html;
use elitedivision\amos\core\helpers\T;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\data\ActiveDataProvider;
use arter\amos\videoconference\AmosVideoconference;
use elitedivision\amos\videoconference\AmosVideoconference;
/**
* This is the class for controller "VideoconfController".
......@@ -147,15 +133,15 @@ class VideoconfController extends CrudController
public function actionTest()
{
//$videoconference = new \arter\amos\videoconference\models\Videoconf();
$videoconference = \arter\amos\videoconference\models\Videoconf::findOne(1);
//$videoconference = new \elitedivision\amos\videoconference\models\Videoconf();
$videoconference = \elitedivision\amos\videoconference\models\Videoconf::findOne(1);
// pr($videoconference->toArray(), 'videoconference');//exit;
$users = $videoconference->getVideoconfUsersMms()->all();
// $users = $videoconference->getVideoconfUsers();
foreach ($users as $u) {
pr($u->toArray(), '$u relazione'); //exit;
$userProfile = \arter\amos\admin\models\UserProfile::findOne($u->user_id);
$userProfile = \elitedivision\amos\admin\models\UserProfile::findOne($u->user_id);
// pr($userProfile->toArray(), '$userProfile');//exit;
$user = $userProfile->getUser()->one();
// pr($user->toArray(), '$user');//exit;
......@@ -247,7 +233,7 @@ class VideoconfController extends CrudController
*/
public function actionCreate()
{
$this->layout = "@vendor/arter/amos-core/views/layouts/form";
$this->layout = "@vendor/elitedivision/amos-core/views/layouts/form";
$model = new Videoconf;
//carico i partecipanti ottenendo le variabili $this->model_partecipanti e $this->partecipanti popolate
......@@ -321,7 +307,7 @@ class VideoconfController extends CrudController
*/
public function actionUpdate($id)
{
$this->layout = "@vendor/arter/amos-core/views/layouts/form";
$this->layout = "@vendor/elitedivision/amos-core/views/layouts/form";
$model = $this->findModel($id);
//carico i partecipanti ottenendo le variabili $this->model_partecipanti e $this->partecipanti popolate
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference\i18n\en-GB
* @package elitedivision\amos\videoconference\i18n\en-GB
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
return [
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference\i18n\en-US
* @package elitedivision\amos\videoconference\i18n\en-US
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
return [
......
<?php
namespace arter\amos\videoconference\i18n\grammar;
namespace elitedivision\amos\videoconference\i18n\grammar;
use arter\amos\core\interfaces\ModelGrammarInterface;
use arter\amos\videoconference\AmosVideoconference;
use elitedivision\amos\core\interfaces\ModelGrammarInterface;
use elitedivision\amos\videoconference\AmosVideoconference;
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
......@@ -16,7 +15,7 @@ use arter\amos\videoconference\AmosVideoconference;
*
* @package piattaforma-openinnovation
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
class VideoconferenceGrammar implements ModelGrammarInterface
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\comments\i18n\it-IT
* @package elitedivision\amos\comments\i18n\it-IT
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
return [
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\admin
* @package elitedivision\amos\admin
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
use yii\helpers\Html;
use arter\amos\videoconference\AmosVideoconference;
use elitedivision\amos\videoconference\AmosVideoconference;
/* @var $this yii\web\View */
/* @var $user common\models\User */
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\helpers\Html;
use arter\amos\videoconference\AmosVideoconference;
use elitedivision\amos\videoconference\AmosVideoconference;
?>
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference\migrations
* @package elitedivision\amos\videoconference\migrations
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
use arter\amos\core\migration\AmosMigrationTableCreation;
use elitedivision\amos\core\migration\AmosMigrationTableCreation;
/**
* Class m171204_121534_create_table_videoconf
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
use arter\amos\core\migration\AmosMigrationPermissions;
use elitedivision\amos\core\migration\AmosMigrationPermissions;
use yii\rbac\Permission;
/**
......@@ -42,14 +28,14 @@ class m171204_125957_videoconference_permissions extends AmosMigrationPermission
'name' => 'JoinOwnVideoconference',
'type' => Permission::TYPE_PERMISSION,
'description' => 'Permesso di CREATE sul model Videoconf',
'ruleName' => \arter\amos\videoconference\rules\JoinOwnVideoconference::className(),
'ruleName' => \elitedivision\amos\videoconference\rules\JoinOwnVideoconference::className(),
'parent' => ['ADMIN', 'BASIC_USER', 'AMMINISTRATORE_VIDEOCONF']
],
[
'name' => 'UpdateOwnVideoconference',
'type' => Permission::TYPE_PERMISSION,
'description' => 'Permesso di CREATE sul model Videoconf',
'ruleName' => \arter\amos\videoconference\rules\UpdateOwnVideoconference::className(),
'ruleName' => \elitedivision\amos\videoconference\rules\UpdateOwnVideoconference::className(),
'parent' => ['ADMIN', 'BASIC_USER', 'AMMINISTRATORE_VIDEOCONF']
],
[
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\videoconference\migrations
* @package elitedivision\amos\videoconference\migrations
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
use arter\amos\core\migration\AmosMigrationTableCreation;
use elitedivision\amos\core\migration\AmosMigrationTableCreation;
/**
* Class m171204_135754_create_table_videoconf_users_mm
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
use arter\amos\core\migration\AmosMigrationWidgets;
use arter\amos\dashboard\models\AmosWidgets;
use elitedivision\amos\core\migration\AmosMigrationWidgets;
use elitedivision\amos\dashboard\models\AmosWidgets;
/**
......@@ -30,11 +16,11 @@ class m171207_100000_add_widget_videoconference extends AmosMigrationWidgets
{
$this->widgets = [