Skip to content

Commit

Permalink
Merge branch 'release-4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
zagovorichev committed Jan 18, 2019
2 parents 4cbe205 + d15800f commit 2f62e63
Show file tree
Hide file tree
Showing 56 changed files with 711 additions and 355 deletions.
35 changes: 17 additions & 18 deletions controller/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* Copyright (c) 2013-2014 (original work) Open Assessment Technologies SA
*
*/
Expand All @@ -29,12 +29,15 @@
*/
class Api extends tao_actions_CommonRestModule
{

public function __construct()
/**
* @return CrudGroupsService
*/
protected function getCrudService()
{
parent::__construct();
// The service taht implements or inherits get/getAll/getRootClass ... for that particular type of resources
$this->service = CrudGroupsService::singleton();
if (!$this->service) {
$this->service = CrudGroupsService::singleton();
}
return $this->service;
}

/**
Expand All @@ -50,19 +53,15 @@ protected function getParametersAliases()

/**
* Optionnal Requirements for parameters to be sent on every service
* you may use either the alias or the uri, if the parameter identifier
* is set it will become mandatory for the method/operation in $key
* Default Parameters Requirents are applied
* type by default is not required and the root class type is applied
*
* @example :"post"=> array("login", "password")
*/
protected function getParametersRequirements()
{
return array()/**
* you may use either the alias or the uri, if the parameter identifier
* is set it will become mandatory for the method/operation in $key
* Default Parameters Requirents are applied
* type by default is not required and the root class type is applied
*
* @example :"post"=> array("login", "password")
*/

;
return array();
}
}
?>
}
30 changes: 8 additions & 22 deletions controller/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@
* Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg (under the project TAO & TAO2);
* 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung (under the project TAO-TRANSFER);
* 2009-2012 (update and modification) Public Research Centre Henri Tudor (under the project TAO-SUSTAIN & TAO-DEV);
* 2013-2014 (update and modification) Open Assessment Technologies SA
* 2013-2018 (update and modification) Open Assessment Technologies SA
*/

namespace oat\taoGroups\controller;

use \common_ext_ExtensionsManager;
use \core_kernel_classes_Property;
use \core_kernel_classes_Resource;
use oat\tao\model\resources\ResourceWatcher;
use \tao_actions_SaSModule;
use \tao_actions_form_Instance;
use \tao_helpers_Request;
use \tao_helpers_Uri;
use \tao_helpers_form_GenerisTreeForm;
use \tao_models_classes_dataBinding_GenerisFormDataBinder;
Expand All @@ -43,20 +39,8 @@
* @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php
*/
class Groups extends tao_actions_SaSModule {

/**
* Initialize the service and the default data
*/
public function __construct()
{

parent::__construct();

//the service is initialized by default
$this->service = GroupsService::singleton();
$this->defaultData();
}
class Groups extends tao_actions_SaSModule
{

/**
* (non-PHPdoc)
Expand All @@ -73,6 +57,8 @@ protected function getClassService()
*/
public function editGroup()
{
$this->defaultData();

$clazz = $this->getCurrentClass();
$group = $this->getCurrentInstance();

Expand All @@ -90,15 +76,15 @@ public function editGroup()
}
}

$memberProperty = new core_kernel_classes_Property(GroupsService::PROPERTY_MEMBERS_URI);
$memberProperty = $this->getProperty(GroupsService::PROPERTY_MEMBERS_URI);
$memberForm = tao_helpers_form_GenerisTreeForm::buildReverseTree($group, $memberProperty);
$memberForm->setData('title', __('Select group test takers'));
$this->setData('memberForm', $memberForm->render());

if (common_ext_ExtensionsManager::singleton()->isEnabled('taoDeliveryRdf')) {
if ($this->getServiceLocator()->get(common_ext_ExtensionsManager::SERVICE_ID)->isEnabled('taoDeliveryRdf')) {
$this->setData('deliveryForm', DeliveryWidget::renderDeliveryTree($group));
}
$updatedAt = $this->getServiceManager()->get(ResourceWatcher::SERVICE_ID)->getUpdatedAt($group);
$updatedAt = $this->getServiceLocator()->get(ResourceWatcher::SERVICE_ID)->getUpdatedAt($group);
$this->setData('updatedAt', $updatedAt);
$this->setData('formTitle', __('Edit group'));
$this->setData('myForm', $myForm->render());
Expand Down
22 changes: 11 additions & 11 deletions controller/Main.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php
/**
/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg (under the project TAO & TAO2);
* 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung (under the project TAO-TRANSFER);
* 2009-2012 (update and modification) Public Research Centre Henri Tudor (under the project TAO-SUSTAIN & TAO-DEV);
Expand All @@ -26,13 +26,13 @@

/**
* The Main Module of the taoGroups extension.
*
*
* @package taoGroups
* @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php
*
*
*/
class Main extends tao_actions_Main {
}
?>
class Main extends tao_actions_Main
{

}
29 changes: 12 additions & 17 deletions controller/SaSGroups.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<?php
/**
/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg (under the project TAO & TAO2);
* 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung (under the project TAO-TRANSFER);
* 2009-2012 (update and modification) Public Research Centre Henri Tudor (under the project TAO-SUSTAIN & TAO-DEV);
* 2013-2014 (update and modification) Open Assessment Technologies SA
* 2013-2018 (update and modification) Open Assessment Technologies SA
*/
namespace oat\taoGroups\controller;

use \core_kernel_classes_Property;
use \tao_helpers_form_GenerisTreeForm;
use oat\taoGroups\models\GroupsService;

Expand All @@ -30,23 +29,17 @@
*
* @author Bertrand Chevrier, <[email protected]>
* @package taoGroups
*
*
* @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php
*/
class SaSGroups extends Groups
{

protected function getClassService()
{
return GroupsService::singleton();
}

/**
* overrided to prevent exception:
* if no class is selected, the root class is returned
*
*
* @see TaoModule::getCurrentClass()
* @return core_kernel_class_Class
* @return \core_kernel_classes_Class
*/
protected function getCurrentClass()
{
Expand All @@ -58,11 +51,13 @@ protected function getCurrentClass()

/**
* Render the tree to select the group related subjects
*
*
*/
public function selectSubjects()
{
$memberProperty = new core_kernel_classes_Property(GroupsService::PROPERTY_MEMBERS_URI);
$this->defaultData();

$memberProperty = $this->getProperty(GroupsService::PROPERTY_MEMBERS_URI);
$memberForm = tao_helpers_form_GenerisTreeForm::buildTree($this->getCurrentInstance(), $memberProperty);
$memberForm->setData('title', __('Select group test takers'));
$this->setData('tree', $memberForm->render());
Expand Down
36 changes: 26 additions & 10 deletions locales/ar-arb/messages.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: TAO 3.1.0-sprint15\n"
"PO-Revision-Date: 2015-12-23T13:12:16\n"
"Project-Id-Version: TAO 3.3.0-sprint92.1\n"
"PO-Revision-Date: 2019-01-18T12:46:10\n"
"Last-Translator: TAO Translation Team <[email protected]>\n"
"MIME-Version: 1.0\n"
"Language: ar-arb\n"
Expand All @@ -16,6 +16,10 @@ msgstr ""
msgid "Add to group"
msgstr ""

#, tao-public
msgid "Copy To"
msgstr ""

#, tao-public
msgid "Delete"
msgstr ""
Expand All @@ -31,17 +35,16 @@ msgstr ""
msgid "Export"
msgstr "تصدير"

#, tao-public
msgid "Filter"
msgstr ""

msgid "Group saved"
msgstr "مجموعة محفوظة"

#, tao-public
msgid "Group test takers according to global features and classifications."
msgstr ""

msgid "Group uri is not valid"
msgstr ""

#, tao-public
msgid "Groups"
msgstr "مجموعات"
Expand All @@ -54,14 +57,25 @@ msgstr "مكتبة المجموعات"
msgid "Import"
msgstr "استراد"

msgid "Last updated on %2s"
msgstr ""

#, tao-public
msgid "Manage groups"
msgstr "إدارة المجموعات"

#, tao-public
msgid "Manage Schema"
msgstr ""

#, tao-public
msgid "Move"
msgstr "حرك"

#, tao-public
msgid "Move To"
msgstr ""

#, tao-public
msgid "New class"
msgstr "صنف جديد"
Expand All @@ -74,13 +88,15 @@ msgstr "مجموعة جديدة"
msgid "Properties"
msgstr ""

#, tao-public
msgid "Search"
msgstr "بحث"

msgid "Select group test takers"
msgstr "اختر مواضيع المجموعة"

msgid "The Groups module allows to group Test takers according to global features and classifications."
msgstr ""

msgid "Unable to create new group"
msgstr ""

msgid "Unable to delete group"
msgstr ""

4 changes: 2 additions & 2 deletions locales/ar-arb/taogroup.rdf.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: TAO 3.1.0-sprint15\n"
"PO-Revision-Date: 2015-12-23T13:12:16\n"
"Project-Id-Version: TAO 3.3.0-sprint92.1\n"
"PO-Revision-Date: 2019-01-18T12:46:10\n"
"Last-Translator: TAO Translation Team <[email protected]>\n"
"MIME-Version: 1.0\n"
"Language: ar-arb\n"
Expand Down
Loading

0 comments on commit 2f62e63

Please sign in to comment.