api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(), 'name' => get_lang('Groups'), ]; $interbreadcrumb[] = [ 'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(), 'name' => get_lang('GroupSpace').' '.$groupProperties['name'], ]; } $interbreadcrumb[] = [ 'url' => "./document.php?id=".$documentId."&".api_get_cidreq(), 'name' => get_lang('Documents'), ]; if (!api_is_allowed_in_course()) { api_not_allowed(true); } $isMySharedFolder = DocumentManager::is_my_shared_folder($userId, Security::remove_XSS($dir), $sessionId); if (!($isAllowedToEdit || $groupRights || $isMySharedFolder)) { api_not_allowed(true); } Event::event_access_tool(TOOL_DOCUMENT); $counter = 0; if (isset($documentData['parents'])) { foreach ($documentData['parents'] as $documentSubData) { //fixing double group folder in breadcrumb if ($groupId) { if ($counter == 0) { $counter++; continue; } } $interbreadcrumb[] = [ 'url' => $documentSubData['document_url'], 'name' => $documentSubData['title'], ]; $counter++; } } $actions = Display::toolbarAction( 'webcam_toolbar', [ Display::url( Display::return_icon( 'back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), [], ICON_SIZE_MEDIUM ), 'document.php?id='.$documentId.'&'.api_get_cidreq() ), ] ); $template = new Template($nameTools); $template->assign('webcam_dir', $webcamdir); $template->assign('user_id', $userId); $template->assign('filename', 'video_clip.jpg'); $content = $template->fetch($template->get_template('document/webcam.tpl')); $template->assign('header', get_lang('TakeYourPhotos')); $template->assign('actions', $actions); $template->assign('content', $content); $template->display_one_col_template();