Skip to content

Commit

Permalink
Merge pull request #2 from ILIAS-eLearning/release_6
Browse files Browse the repository at this point in the history
update release_6
  • Loading branch information
Uwe Tesche authored Jan 18, 2021
2 parents 16224f4 + 55d53c6 commit 0ce5406
Show file tree
Hide file tree
Showing 605 changed files with 30,806 additions and 18,523 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ addons:
packages:
- unzip
install:
- composer self-update --1
- composer install
env:
global:
Expand Down
2 changes: 1 addition & 1 deletion Modules/Blog/templates/default/tpl.blog_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<br class="ilClearFloat" />
<!-- END prtf_edit_bl -->
<!-- BEGIN month_bl -->
<h3 class="ilHeader">{TXT_CURRENT_MONTH}</h3>
<h2 class="ilHeader">{TXT_CURRENT_MONTH}</h2>
<div class="ilBlogList">
<!-- BEGIN posting -->
<div class="ilBlogListItem{DRAFT_CLASS}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ protected function fillRow($a_set)
if ($has_booking) {
$booking_possible = false;
}
if ($a_set["nr_items"] <= $cnt
|| empty(ilBookingParticipant::getAssignableParticipants($a_set["booking_object_id"]))) {
if ($a_set["nr_items"] <= $cnt) {
$assign_possible = false;
}
} elseif (!$this->may_edit) {
Expand Down Expand Up @@ -392,13 +391,17 @@ protected function fillRow($a_set)
}

if ($this->may_assign && $assign_possible) {
if (is_object($this->filter['period']['from'])) {
$ilCtrl->setParameter($this->parent_obj, 'sseed', $this->filter['period']['from']->get(IL_CAL_DATE));
}
if (!empty(ilBookingParticipant::getAssignableParticipants($a_set["booking_object_id"]))) {
if (is_object($this->filter['period']['from'])) {
$ilCtrl->setParameterByClass("ilbookingprocessgui", 'sseed',
$this->filter['period']['from']->get(IL_CAL_DATE));
}

$items[] = $this->ui_factory->button()->shy($lng->txt('book_assign_participant'), $ilCtrl->getLinkTarget($this->parent_obj, 'assignParticipants'));
$items[] = $this->ui_factory->button()->shy($lng->txt('book_assign_participant'),
$ilCtrl->getLinkTargetByClass("ilbookingprocessgui", 'assignParticipants'));

$ilCtrl->setParameter($this->parent_obj, 'sseed', '');
$ilCtrl->setParameterByClass("ilbookingprocessgui", 'sseed', '');
}
}

if ($a_set['info_file']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function executeCommand()
switch ($next_class) {
default:
if (in_array($cmd, array("log", "logDetails", "changeStatusObject", "rsvConfirmCancelUser", "rsvCancelUser",
"applyLogFilter", "resetLogFilter", "rsvConfirmCancel", "rsvCancel", "back"))) {
"applyLogFilter", "resetLogFilter", "rsvConfirmCancel", "rsvCancel", "back", "rsvConfirmDelete", "rsvDelete"))) {
$this->$cmd();
}
}
Expand Down Expand Up @@ -542,4 +542,68 @@ public function rsvCancel()
$this->log();
return "";
}

public function rsvConfirmDelete()
{
global $DIC;
if (!$this->checkPermissionBool("write")) {
ilUtil::sendFailure($this->lng->txt('permission_denied'), true);
$this->ctrl->redirect($this, 'log');
}

$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget(
$this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "log")
);

$conf = new ilConfirmationGUI();
$conf->setFormAction($this->ctrl->getFormAction($this, 'rsvDelete'));
$conf->setHeaderText($this->lng->txt('book_confirm_delete'));
$conf->setConfirm($this->lng->txt('book_set_delete'), 'rsvDelete');
$conf->setCancel($this->lng->txt('cancel'), 'log');

list($obj_id, $user_id, $from, $to) = explode("_", $DIC->http()->request()->getQueryParams()['reservation_id']);
$ids = ilBookingReservation::getCancelDetails($obj_id, $user_id, $from, $to);
$rsv = new ilBookingReservation($ids[0]);
$obj = new ilBookingObject($rsv->getObjectId());

$details = sprintf($this->lng->txt('X_reservations_of'), count($ids)) . ' ' . $obj->getTitle();
if ($this->pool->getScheduleType() != ilObjBookingPool::TYPE_NO_SCHEDULE) {
$details .= ", " . ilDatePresentation::formatPeriod(
new ilDateTime($rsv->getFrom(), IL_CAL_UNIX),
new ilDateTime($rsv->getTo() + 1, IL_CAL_UNIX)
);
}

$conf->addItem('rsv_ids', implode(',', $ids), $details);
$this->tpl->setContent($conf->getHTML());
}

public function rsvDelete()
{
global $DIC;
$get = $DIC->http()->request()->getParsedBody()['rsv_ids'];
if ($get) {
foreach (explode(',', $get) as $id) {
$res = new ilBookingReservation($id);
$obj = new ilBookingObject($res->getObjectId());
if ($obj->getPoolId() != $this->pool->getId() || !$this->checkPermissionBool("write")) {
ilUtil::sendFailure($this->lng->txt('permission_denied'), true);
$this->ctrl->redirect($this, 'log');
}
if ($this->pool->getScheduleType() != ilObjBookingPool::TYPE_NO_SCHEDULE) {
$cal_entry_id = $res->getCalendarEntry();
if ($cal_entry_id) {
include_once 'Services/Calendar/classes/class.ilCalendarEntry.php';
$entry = new ilCalendarEntry($cal_entry_id);
$entry->delete();
}
}
$res->delete();
}
}
ilUtil::sendSuccess($this->lng->txt('reservation_deleted'), true);
$this->ctrl->redirect($this, 'log');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,18 @@ protected function fillRow($a_set)
$this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, 'rsvConfirmCancel'));
$ilCtrl->setParameter($this->parent_obj, 'reservation_id', "");
$this->tpl->setVariable("TXT_ACTION", $lng->txt('book_set_cancel'));
$this->tpl->setCurrentBlock("action");
$this->tpl->parseCurrentBlock();
}


if($ilAccess->checkAccess('write', '', $this->ref_id)) {
$ilCtrl->setParameter($this->parent_obj, 'reservation_id', $a_set['booking_reservation_id']);
$this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, 'rsvConfirmDelete'));
$ilCtrl->setParameter($this->parent_obj, 'reservation_id', "");
$this->tpl->setVariable("TXT_ACTION", $lng->txt('delete'));
$this->tpl->setCurrentBlock("action");
$this->tpl->parseCurrentBlock();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
</td>
<!-- END user_col -->
<td class="std">
<!-- BEGIN action -->
<a href="{URL_ACTION}">{TXT_ACTION}</a>
<!-- END action -->
</td>
</tr>
6 changes: 2 additions & 4 deletions Modules/Category/classes/class.ilCategoryXmlWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,15 @@ protected function buildTranslations()
$this->xmlStartTag('Translations');

$translations = $this->getCategory()->getObjectTranslation()->getLanguages();


foreach ((array) $translations as $translation) {
$this->xmlStartTag(
'Translation',
array(
'default' => (int) $translation['lang_default'],
'language' => $translation['lang'])
'language' => $translation['lang_code'])
);
$this->xmlElement('Title', array(), $translation['title']);
$this->xmlElement('Description', array(), $translation['desc']);
$this->xmlElement('Description', array(), $translation['description']);
$this->xmlEndTag('Translation');
}
$this->xmlEndTag('Translations');
Expand Down
20 changes: 19 additions & 1 deletion Modules/Chatroom/chat/Model/Conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,25 @@ var Conversation = function Conversation(id, participants)
id = val.getId();
}

if (id.toString() === participant.getId().toString()) {
if (typeof id === "undefined") {
return false;
}

if (typeof participant.getId !== 'function') {
Container.getLogger().warn(
"Invalid participant object: Type = %s / Variable = %s",
typeof participant,
JSON.stringify(participant)
);
return false;
}

let participantId = participant.getId();
if (typeof participantId === "undefined") {
return false;
}

if (id.toString() === participantId.toString()) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function showMessages($messages, $durationForm, $export = false, $psessi

// should be able to grep templates
if ($export) {
$roomTpl = new iGlobalTemplate('tpl.history_export.html', true, true, 'Modules/Chatroom');
$roomTpl = new ilGlobalTemplate('tpl.history_export.html', true, true, 'Modules/Chatroom');
} else {
$roomTpl = new ilTemplate('tpl.history.html', true, true, 'Modules/Chatroom');
}
Expand Down
9 changes: 7 additions & 2 deletions Modules/Cloud/js/ilCloudFileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ function ilCloudFileList(url_get_block, url_create_folder, url_upload_file, url_
$('#xcld_block_' + id).hide();
}

// is currently loading
this.isLoading = function () {
return $("#loading_div_background").is(':visible');
}

//show Block with Id
this.removeBlock = function (id) {
$('#xcld_block_' + id).remove();
Expand Down Expand Up @@ -370,10 +375,10 @@ function ilCloudFileList(url_get_block, url_create_folder, url_upload_file, url_
});

$.address.change(function (event) {
if (event.pathNames[0] == "delete_item") {
if (event.pathNames[0] === "delete_item") {
self.deleteItem(event.parameters.id);
}
else if (uploading == false) {
else if (uploading === false && !self.isLoading()) {
self.hideBlock(current_id);
event.parameters.current_id ? current_id = event.parameters.current_id : current_id = current_id;
event.parameters.current_path ? current_path = decodeURIComponent((event.parameters.current_path + '').replace(/\+/g, '%20')) : current_path = current_path;
Expand Down
Loading

0 comments on commit 0ce5406

Please sign in to comment.