Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
3afb1e6
Coordinator Model proposal
Amstutz May 24, 2018
31b82a9
added constraints to the password-input
nhaagen Jun 4, 2018
35e63f8
merge
nhaagen Jun 4, 2018
df22b7c
convenience-function to quickly get constraints for a pass-field
nhaagen Jun 4, 2018
2c0083f
DBUPDATE new test setting (follow up question previous answer fixation)
bheyser Jun 13, 2018
7f8f023
restructured settings for instant feedback and answer fixation, incl.…
bheyser Jun 13, 2018
f15c42a
changed existing settings conflict handling to alert instead of reset…
bheyser Jun 14, 2018
72a9725
populated followup qst fixation flag to player edit control js engine…
bheyser Jun 14, 2018
3d3c160
connected new confirmation modals for followup qst answer locking to …
bheyser Jun 15, 2018
08ed44a
dbupdate adding table for presented questions managed by ilTestSequence
bheyser Jun 15, 2018
51a25f2
backend changes for keyfeature: sidelist disabled links, avoid save s…
bheyser Jun 15, 2018
d0fc55e
Merge branch 'UI_Input_Password' into UI_Input_Password_Constraints
nhaagen Jun 15, 2018
9f5cd05
non linked links for question summary list page in test player on fol…
bheyser Jun 15, 2018
c86149a
fixed wrong field names in general settings forms after followup rest…
bheyser Jun 15, 2018
31da820
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
nhaagen Jun 18, 2018
c3a5392
typo
nhaagen Jun 18, 2018
91bab2b
Docs: Worked in Feedback from TB
Amstutz Jun 19, 2018
0e3f3f3
possible fix for mantis bug 0023096, in combination with client ini s…
Elwe-Thingol Jun 19, 2018
0cfbda8
Doc: Coordinator Model space fixed.
Amstutz Jun 20, 2018
9d8f454
Doc: Coordinator Model space fixed II
Amstutz Jun 20, 2018
f5b721d
ContentPage: Added translations
mjansenDatabay Jun 27, 2018
7b56452
ContentPage: Added translations
mjansenDatabay Jun 27, 2018
bc64eb0
ContentPage: Added translations
mjansenDatabay Jun 27, 2018
afdb429
ContentPage: Added new object type, refactored custom icons
mjansenDatabay Jun 27, 2018
ab04da8
ContentPage: Added translations
mjansenDatabay Jun 28, 2018
2229d26
ContentPage: Added translations
mjansenDatabay Jun 28, 2018
e627ae0
ContentPage: Enabled learning progress for ilInfoScreenGUI below 'Lea…
mjansenDatabay Jun 28, 2018
ad3ad5f
ContentPage: Export/Import
mjansenDatabay Jun 28, 2018
155f271
ContentPage: Changed position for "Add new Item" menu
mjansenDatabay Jun 28, 2018
1fce6e7
Merge branch 'trunk' into feature-content-page-object
mjansenDatabay Jun 28, 2018
f3c82e1
ContentPage: Database updates
mjansenDatabay Jun 28, 2018
fbb1237
ContentPage: Added translations
mjansenDatabay Jun 28, 2018
acd4fb0
ContentPage: Page editor settings
mjansenDatabay Jun 28, 2018
e1837fc
ContentPage: Internal links for page editor content
mjansenDatabay Jun 28, 2018
dd8d594
ContentPage: Added translations
mjansenDatabay Jun 29, 2018
b7e230e
ContentPage: Respected initial permission guideline
mjansenDatabay Jun 29, 2018
7997192
ContentPage: Internal links for page editor content
mjansenDatabay Jun 29, 2018
ac81556
ContentPage: Internal links for page editor content
mjansenDatabay Jun 29, 2018
00b81a4
ContentPage: Respected initial permission guideline
mjansenDatabay Jun 29, 2018
d835e4e
fix indents
nhaagen Jun 29, 2018
00e1bec
added basic tests for password constraints
nhaagen Jun 29, 2018
99ce702
ContentPage: Composer files
mjansenDatabay Jul 2, 2018
24c2bae
ContentPage: Added another definition key to identify roles by id, no…
mjansenDatabay Jul 3, 2018
79ade0b
ContentPage: Fixed copy dialogue
mjansenDatabay Jul 5, 2018
5877938
ContentPage: Page styles
mjansenDatabay Jul 6, 2018
9d5c781
ContentPage: Fixed placeholders in database query
mjansenDatabay Jul 6, 2018
3d94299
ContentPage: Page styles
mjansenDatabay Jul 6, 2018
129c47b
Merge branch 'trunk' into feature-content-page-object
mjansenDatabay Jul 11, 2018
28ba460
ContentPage: Added 'copa' as possible precondition trigger
mjansenDatabay Jul 12, 2018
79d90ae
Merge branch 'trunk' into fix/0023096/trunk/cyrillic-filename-bug
chfsx Jul 12, 2018
9a485a8
not possible to use isDependencyAvailable
chfsx Jul 12, 2018
cae727e
WIP
chfsx Jul 12, 2018
16fbc8e
moved ilFileUtil::deliverFile to ilFiledelivery
chfsx Jul 12, 2018
1241627
correct handling of filename-conversion
chfsx Jul 12, 2018
797acc3
removed WIP code
chfsx Jul 12, 2018
e9fd20f
[FIX] 23244: wrong varibable call
chfsx Jul 12, 2018
385a694
Chatroom: Fixed tabs
mjansenDatabay Jul 13, 2018
7b9c251
0021286: Session with Waiting list: "With Auto-Fill" - Get mail when
smeyer-ilias Jul 13, 2018
b654890
Fixed 0022169: Kurs mit LZO-Ansicht - Zuordnung von Online-Tests als
smeyer-ilias Jul 13, 2018
b333dfb
23308, Fixes: Course Icons are blocked for a regular user
alex40724 Jul 13, 2018
9b72de5
Moved phantomjs to optional dependencies
gpkvt Jul 13, 2018
70cf391
Merge branch 'trunk' into feature-content-page-object
mjansenDatabay Jul 16, 2018
052fa19
Added accidentally deleted lang var and improved label
matthiaskunkel Jul 16, 2018
91455e2
Re-introduced missing lang var (due to wrong 'deprecated' setting)
matthiaskunkel Jul 16, 2018
f30e4b6
Removed duplicate entry for #ecs_member_auth_type#
matthiaskunkel Jul 16, 2018
d2ab7ff
Merge pull request #1116 from gpkvt/patch-10
gvollbach Jul 17, 2018
d9d2cd6
Doc: Updated coordinator readme according JF
Amstutz Jul 17, 2018
d3a7e35
Merge pull request #1096 from Amstutz/coordinator_model
Amstutz Jul 17, 2018
ec4458a
Merge branch 'fix/0023096/trunk/cyrillic-filename-bug' of https://git…
chfsx Jul 18, 2018
0fd8e2e
[FIX] 0023096: Bug with cyrillic filename Part 2
chfsx Jul 18, 2018
9a5cbdf
Content Page: Implemented new learning progress mode / Streamline 'Co…
mjansenDatabay Jul 18, 2018
6657fe7
Merge branch 'trunk' into feature-content-page-object
mjansenDatabay Jul 18, 2018
181d780
merge trunk
nhaagen Jul 18, 2018
00eaf61
Merge branch 'UI_Input_Password' of github.com:nhaagen/ILIAS into UI_…
nhaagen Jul 18, 2018
56646b2
[Fix 22653]Booking pool not visible using external links if it's offl…
xus Jul 18, 2018
1e791c4
User: Fixed 'ilAuth' access (not defined) on DIC
mjansenDatabay Jul 18, 2018
f0b4396
Content Page: Changed learning progress mode translations
mjansenDatabay Jul 18, 2018
cc7b1d5
Content Page: Possible fix for learning progress determination
mjansenDatabay Jul 18, 2018
16ba353
Chatroom: Removed obsolete library
mjansenDatabay Jul 19, 2018
98b1b60
Chat Server: Incremented package version
mjansenDatabay Jul 19, 2018
01a3f36
Merge pull request #1095 from nhaagen/UI_Input_Password
Amstutz Jul 20, 2018
da58236
Content Page: Refactorings
mjansenDatabay Jul 20, 2018
9cf773d
Content Page: Refactorings
mjansenDatabay Jul 20, 2018
73969ea
Content Page: Got rid of exit(); to prevent architectural violations
mjansenDatabay Jul 20, 2018
8c957f8
Merge pull request #1107 from mjansenDatabay/feature-content-page-object
mjansenDatabay Jul 23, 2018
fefbe30
0023251: -rbac_log_operation_rmv- not translated
smeyer-ilias Jul 23, 2018
5f3f191
Mail: Adds type hint
mjansenDatabay Jul 23, 2018
cc2469f
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
mjansenDatabay Jul 23, 2018
fa4c34d
Changed Maintainer for WebDAV from smeyer to rheer
Jul 23, 2018
797867e
WebDAV: First implementation of new WebDAV
rsheer Jul 18, 2018
2d498fc
Fixed typo
Jul 24, 2018
c22b423
Minor table style fix
smeyer-ilias Jul 24, 2018
9fbf3fd
Removed unused method
smeyer-ilias Jul 24, 2018
742bc87
Fixed locator in administration section
smeyer-ilias Jul 24, 2018
f126d17
Fixed locator for repository role location
smeyer-ilias Jul 24, 2018
bcd81e0
Fixed tab activation for role templates
smeyer-ilias Jul 24, 2018
621dd85
fixed 0017789: DigiLib Book is back!
smeyer-ilias Jul 24, 2018
6cf08b2
Tweak style fix
smeyer-ilias Jul 24, 2018
45b745c
Mail: Adds type hints and return types / Removed require_once directives
mjansenDatabay Jul 24, 2018
5680d6e
Lang files changes cherry-picked from release_53
matthiaskunkel Jul 25, 2018
29b1ac2
0007383: Closed, temporarily available but visible groups: learner can
smeyer-ilias Jul 25, 2018
a9140db
0008873: Membership limitations regarding groups are called "Course
smeyer-ilias Jul 25, 2018
84d962b
Fixed 0009229: Different messages in group and course
smeyer-ilias Jul 25, 2018
704478e
OnScreenChat: Fixed #23343
mjansenDatabay Jul 25, 2018
35086cd
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
mjansenDatabay Jul 25, 2018
5ec87a8
Mail: Adds type hints and return types / Removed require_once directives
mjansenDatabay Jul 25, 2018
41c669f
OnScreenChat: Fixed #23344 (jQuery include has to be before bootstrap…
mjansenDatabay Jul 25, 2018
567ecc6
OnScreenChat: Added help message according to #23347
mjansenDatabay Jul 26, 2018
183c16b
OnScreenChat: Added tooltip for chat participants in menu overlay
mjansenDatabay Jul 26, 2018
a35c583
Fixed typo
Jul 26, 2018
579c9a0
OnScreenChat: Fixed #23351
mjansenDatabay Jul 26, 2018
12bde7f
Updated composer classmap
mjansenDatabay Jul 26, 2018
0ad9686
SAML: Changes regarding single logout
mjansenDatabay Jul 26, 2018
19c8dd8
dbupdates for cloze question's specific feedback extension, migration…
bheyser Jul 27, 2018
008c044
extension of feedback object graph for handling sub questions per que…
bheyser Jul 27, 2018
1a2f788
fixed bug in results tab
bheyser Jul 27, 2018
d9c8cb6
removed old media element dirs
alex40724 Jul 27, 2018
74a203d
removed reference to old tiny
alex40724 Jul 27, 2018
6171a22
[HUN] 20180728
KissDaniGH Jul 28, 2018
3122409
[HUN] 20180728
KissDaniGH Jul 28, 2018
f59442d
fixed wrong datatype for update of feedback_mode
bheyser Jul 30, 2018
eb19844
fixed mantis 0022229: Lückentextfrage - pdf Export
bheyser Jul 30, 2018
551815b
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
bheyser Jul 30, 2018
6fc5b96
added comment about additional check
alex40724 Jul 31, 2018
a01c4a3
Fixed 0021981: Failed test: Einstiegstests pro Lernziel durchführen
smeyer-ilias Jul 31, 2018
ea8731e
fixed bug #19922: Timeline creeps back
alex40724 Jul 31, 2018
eac7a72
fixed null variable and forgotten parameter completion in LongMenu du…
bheyser Jul 31, 2018
f77bb35
0023045: filtering "Memberships in Groups" in one course leads to a set
smeyer-ilias Jul 31, 2018
0b925d3
fixed bug #20285: style omitted when copying a course
alex40724 Jul 31, 2018
9f22a69
switched delimiter for question/answeroption ident on cloze test item…
bheyser Jul 31, 2018
17ee124
Merge branch '54clozeGapOptionFeedback' into trunk
bheyser Jul 31, 2018
abbeb42
transfered dbupdates from feature branch update script to common setu…
bheyser Jul 31, 2018
e979740
fixed bug #22587: No fixed position for public submissions
alex40724 Jul 31, 2018
01e04ae
fixed bug 22626: no custom icon in pop up
alex40724 Jul 31, 2018
e0ac99d
completed import/export with feedback_mode
bheyser Jul 31, 2018
14f876f
Merge branch '54clozeGapOptionFeedback' into trunk
bheyser Jul 31, 2018
e107e70
Merge pull request #1121 from rsheer/trunk
rsheer Jul 31, 2018
85cc12a
fixed wrong export order due to shuffling of answer options for cloze…
bheyser Aug 1, 2018
b7c7cc2
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
bheyser Aug 1, 2018
c8f09ec
0023265: Custom metadata is not indexed by Lucene
smeyer-ilias Aug 1, 2018
42ab8ea
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
smeyer-ilias Aug 1, 2018
fb214a4
fixed bug 22632: Responsive Video (in Page Editor); fixed youtu.be li…
alex40724 Aug 1, 2018
86e01dd
fixed question preview and specific feedback output, was not respecti…
bheyser Aug 1, 2018
6faeded
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
bheyser Aug 1, 2018
34d3bb5
fixed mantis 0023360: Print View in Test Module leads to php-error (O…
bheyser Aug 1, 2018
90e2820
initial default value for feedback_mode of cloze test qst
bheyser Aug 1, 2018
2317d3a
Merge branch '54clozeGapOptionFeedback' into trunk
bheyser Aug 1, 2018
2166553
Chatroom: Set imported chat objects to 'offline'
mjansenDatabay Aug 2, 2018
d7391c0
Chatroom: Set imported chat objects to 'offline'
mjansenDatabay Aug 2, 2018
07f750f
fixed bug #22718: Can't edit ILIAS-learning modules imported via new …
alex40724 Aug 2, 2018
674c91f
removed duplicate logging tag
alex40724 Aug 2, 2018
9ab1728
Merge branch '54keyFeatureTest' into trunk
bheyser Aug 2, 2018
76ea4ed
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
bheyser Aug 2, 2018
e0c3452
transfered dbupdate from dedicated feature update script to common se…
bheyser Aug 2, 2018
4338b1b
fixed registration of forced_feedback_navigation_url by centralizing …
bheyser Aug 2, 2018
f385417
Fixed \IllegalStateException for PhraseQueries
smeyer-ilias Aug 2, 2018
06fc04e
fixed bug #22932: Survey Import leads to the following error!
alex40724 Aug 2, 2018
d02ad3c
additional db update that set all answer indexes for gapquestion feed…
bheyser Aug 4, 2018
544e600
fixed duplicate entries for cop feedback mode - gapQuestion and gapAn…
bheyser Aug 4, 2018
d564f03
hide numeric range feedback field when upper/lower bound equals to pr…
bheyser Aug 4, 2018
f519750
Merge branch '54clozeGapOptionFeedback' into trunk
bheyser Aug 4, 2018
01cf39e
Merge branch 'trunk' of https://github.com/ILIAS-eLearning/ILIAS into…
bheyser Aug 4, 2018
150f090
transfered additional db update for cloze test answer feedback
bheyser Aug 4, 2018
81f6144
fixed occuring postpone action in testplayer although setting is disa…
bheyser Aug 4, 2018
8476d84
fixed missing forced fb response modal due to missing tpl block after…
bheyser Aug 4, 2018
346689c
fixed non linked entry in question dashboard when presented prior to …
bheyser Aug 4, 2018
ac49e33
feedback_mode fallback value for old import files
bheyser Aug 5, 2018
f399e57
Merge branch '54clozeGapOptionFeedback' into trunk
bheyser Aug 5, 2018
46f7c51
fixed mantis 0023167: cloze question w/ gap combination : best soluti…
bheyser Aug 5, 2018
56a94f6
fixed mantis 0023167: cloze question w/ gap combination : best soluti…
bheyser Aug 5, 2018
8ffd91e
fixed mantis 0023167: cloze question w/ gap combination : best soluti…
bheyser Aug 5, 2018
dfeff61
Cron: Fixed #23391
mjansenDatabay Aug 6, 2018
dc2aaeb
Cron: Fixed #23389
mjansenDatabay Aug 6, 2018
391820b
BP: Add assign to Participants action
xus Aug 7, 2018
9ab4876
Add participants
xus Aug 7, 2018
4ab21dd
booking pool participants, table lists + filters
xus Aug 8, 2018
1074443
Bpool more fixes participants lists + filters
xus Aug 8, 2018
67e971d
fix booking obj filter in participants tab
xus Aug 9, 2018
282b678
remove sql and
xus Aug 9, 2018
a3b0b86
add object titles in table columns
xus Aug 9, 2018
8e21289
bp dealing with filters and new tables
xus Aug 10, 2018
0844399
Table assignable users to bp object + lang vars
xus Aug 14, 2018
d27213e
assign participants: remove tabs + add back target
xus Aug 14, 2018
11378b3
BP reservation: add user and assigner behavior
xus Aug 15, 2018
240ef0b
bp: table to assign objects to an user
xus Aug 15, 2018
69d5a7e
Save participant when booking object
xus Aug 15, 2018
83305b2
use lang vars
xus Aug 16, 2018
bb89cbd
getAssignableParticipants does not need to deal with actions
xus Aug 16, 2018
2252b10
tpl setcurrentblock outside foreach
xus Aug 16, 2018
dc8f613
uncommit me
xus Aug 16, 2018
4965704
remove db table il_ prefix
xus Aug 17, 2018
139d130
participants list: filter by title/description + sql left join for ob…
xus Aug 17, 2018
2926802
obj table list: show/hide links depending on object availability
xus Aug 17, 2018
dc62214
Fix query: assignable participants are also who canceled the reservat…
xus Aug 17, 2018
284a3ee
Participants list with filter object, deasign (cancel reservation)
xus Aug 17, 2018
f8efe9d
Assing objects to an user list - show only the objects without previo…
xus Aug 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<?php
/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */

/**
* List objects / booking pool assignment.
*
* @author Jesús López <lopez@leifos.com>
* @version $Id$
*
* @ingroup ModulesBookingManager
*/
class ilBookingAssignObjectsTableGUI extends ilTable2GUI
{
/**
* @var ilAccessHandler
*/
protected $access;

/**
* @var ilObjUser
*/
protected $user;

/**
* @var int
*/
protected $ref_id;

/**
* @var int
*/
protected $pool_id;

/**
* @var int
*/
protected $user_id_to_book;

/**
* @var ilObjBookingPool
*/
//protected $bp_object;

/**
* @var int
*/
protected $current_bookings; // [int]

/**
* @var array
*/
protected $filter; // [array]

/**
* @var array
*/
protected $objects; // array

//TODO clean unused vars.
protected $has_schedule; // [bool]
protected $may_edit; // [bool]
protected $may_assign; // [bool]
protected $overall_limit; // [int]
protected $reservations = array(); // [array]

/**
* Constructor
* @param ilBookingParticipantGUI $a_parent_obj
* @param string $a_parent_cmd
* @param int $a_ref_id
* @param int $a_pool_id
* @param int $a_user_id // user id to be assigned
*/
function __construct(ilBookingParticipantGUI $a_parent_obj, $a_parent_cmd, $a_ref_id, $a_pool_id)
{
global $DIC;

$this->ctrl = $DIC->ctrl();
$this->lng = $DIC->language();
$this->user = $DIC->user();
$this->access = $DIC->access();
$this->ref_id = $a_ref_id;

$this->pool_id = $a_pool_id;

if($_GET['bkusr'])
{
$this->user_id_to_book = (int)$_GET['bkusr'];
if(!ilObjUser::_exists($this->user_id_to_book)) {
$this->ctrl->redirect($a_parent_obj, $a_parent_cmd);
}
$user_name_data = ilObjUser::_lookupName($this->user_id_to_book);
$user_name = $user_name_data['lastname'].", ".$user_name_data['firstname'];
} else {
$this->ctrl->redirect($a_parent_obj, 'render');
}

$this->setId("bkaobj".$a_ref_id);

parent::__construct($a_parent_obj, $a_parent_cmd);

$this->setTitle($this->lng->txt("book_assign_object").": ".$user_name);

$this->addColumn("", "");
$this->addColumn($this->lng->txt("title"), "title");
$this->addColumn($this->lng->txt("description"));
$this->addColumn($this->lng->txt("availability"));
$this->addColumn($this->lng->txt("action"));

//Fix this order field
//$this->setDefaultOrderField("title");
//$this->setDefaultOrderDirection("asc");

$this->setEnableHeader(true);
//$this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
$this->setRowTemplate("tpl.booking_assign_object_row.html", "Modules/BookingManager");
//$this->setResetCommand("resetParticipantsFilter");
//$this->setFilterCommand("applyParticipantsFilter");
//$this->setDisableFilterHiding(true);

//$this->initFilter();

$this->getItems($this->getCurrentFilter());

}

//TODO implement the filters if any.
function initFilter()
{
return array();
}

/**
* Get current filter settings
* @return array
*/
function getCurrentFilter()
{
$filter = array();
// filter for object if needed.
/*if($this->filter["user_id"])
{
$filter["user_id"] = $this->filter["user_id"];
}*/

return $filter;
}

/**
* Gather data and build rows
* @param array $filter
*/
function getItems(array $filter = null)
{
$data = array();
$obj_items = ilBookingObject::getList($this->pool_id);
foreach($obj_items as $item)
{
if(empty(ilBookingReservation::getObjectReservationForUser($item['booking_object_id'], $this->user_id_to_book)))
{
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'bkusr', $this->user_id_to_book);
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'object_id', $item['booking_object_id']);
$data[] = array(
'object_id' => $item['booking_object_id'],
'title' => $item['title'],
'description' => $item['description'],
'nr_items' => $item['nr_items'],
'url_assign'=> $this->ctrl->getLinkTargetByClass("ilbookingobjectgui", 'book')
);
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'bkusr', '');
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'object_id', '');
}
}
$this->setData($data);
}

/**
* Fill table row
* @param array $a_set
*/
protected function fillRow($a_set)
{
$this->tpl->setVariable("TXT_TITLE", $a_set['title']);
$this->tpl->setVariable("TXT_DESCRIPTION", $a_set['description']);
$this->tpl->setVariable("TXT_AVAILABLE", $a_set['nr_items']);
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("book_assign"));
$this->tpl->setVariable("URL_ACTION", $a_set['url_assign']);
}
}

?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?php
/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */

/**
* List participant / booking pool assignment.
*
* @author Jesús López <lopez@leifos.com>
* @version $Id$
*
* @ingroup ModulesBookingManager
*/
class ilBookingAssignParticipantsTableGUI extends ilTable2GUI
{
/**
* @var ilAccessHandler
*/
protected $access;

/**
* @var ilObjUser
*/
protected $user;

/**
* @var int
*/
protected $ref_id;

/**
* @var int
*/
protected $pool_id;

/**
* @var int
*/
protected $bp_object_id;

/**
* @var ilObjBookingPool
*/
protected $bp_object;

/**
* @var int
*/
protected $current_bookings; // [int]

/**
* @var array
*/
protected $filter; // [array]

/**
* @var array
*/
protected $objects; // array

//TODO clean unused vars.
protected $has_schedule; // [bool]
protected $may_edit; // [bool]
protected $may_assign; // [bool]
protected $overall_limit; // [int]
protected $reservations = array(); // [array]

/**
* Constructor
* @param ilBookingObjectGUI $a_parent_obj
* @param string $a_parent_cmd
* @param int $a_ref_id
* @param int $a_pool_id
* @param int $a_booking_obj_id //booking object to assign users.
*/
function __construct(ilBookingObjectGUI $a_parent_obj, $a_parent_cmd, $a_ref_id, $a_pool_id, $a_booking_obj_id)
{
global $DIC;

$this->ctrl = $DIC->ctrl();
$this->lng = $DIC->language();
$this->user = $DIC->user();
$this->access = $DIC->access();
$this->ref_id = $a_ref_id;
$this->bp_object_id = $a_booking_obj_id;
$this->pool_id = $a_pool_id;
$this->bp_object = new ilBookingObject($a_booking_obj_id);

$this->setId("bkaprt".$a_ref_id);

parent::__construct($a_parent_obj, $a_parent_cmd);

$this->setTitle($this->lng->txt("book_assign_participant").": ".$this->bp_object->getTitle());

$this->addColumn("", "");
$this->addColumn($this->lng->txt("name"), "name");
$this->addColumn($this->lng->txt("book_bobj"));
$this->addColumn($this->lng->txt("action"));

$this->setDefaultOrderField("name");
$this->setDefaultOrderDirection("asc");

$this->setEnableHeader(true);
$this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
$this->setRowTemplate("tpl.booking_assign_participant_row.html", "Modules/BookingManager");
//$this->setResetCommand("resetParticipantsFilter");
//$this->setFilterCommand("applyParticipantsFilter");
//$this->setDisableFilterHiding(true);

$this->initFilter();

$this->getItems($this->getCurrentFilter());

}

//TODO implement the filters if any.
function initFilter()
{
return array();
}

/**
* Get current filter settings
* @return array
*/
function getCurrentFilter()
{
$filter = array();

if($this->filter["user_id"])
{
$filter["user_id"] = $this->filter["user_id"];
}

return $filter;
}

/**
* Gather data and build rows
* @param array $filter
*/
function getItems(array $filter = null)
{
include_once "Modules/BookingManager/classes/class.ilBookingParticipant.php";
$data = ilBookingParticipant::getAssignableParticipants($this->bp_object_id);
$this->setMaxCount(sizeof($data));
$this->setData($data);
}

/**
* Fill table row
* @param array $a_set
*/
protected function fillRow($a_set)
{
$this->tpl->setVariable("TXT_NAME", $a_set['name']);
$this->tpl->setCurrentBlock('object_titles');
foreach($a_set['object_title'] as $obj_title)
{
$this->tpl->setVariable("TXT_OBJECT", $obj_title);
$this->tpl->parseCurrentBlock();
}

$this->ctrl->setParameter($this->parent_obj, 'bkusr', $a_set['user_id']);
$this->ctrl->setParameter($this->parent_obj, 'object_id', $this->bp_object_id);

$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("book_assign"));
$this->tpl->setVariable("URL_ACTION", $this->ctrl->getLinkTarget($this->parent_obj, 'book'));

$this->ctrl->setParameter($this->parent_obj, 'bkusr', '');
$this->ctrl->setParameter($this->parent_obj, 'object_id', '');

}
}

?>
Loading