// b. one is a student AND the documents tool is active. Student cannot add documents if the documents tool is inactive (teacher can do this) if ($content == "Document" or empty($content) and (api_is_allowed_to_edit() or in_array(TOOL_DOCUMENT, $active_modules)) and !$_GET['showresources']) { // setting variables for file locations $baseServDir = api_get_path(SYS_PATH); $courseDir = $_course['path'] . "/document"; $baseWorkDir = $baseServDir . $courseDir; // showing the link to move one folder up (when not in the root folder) show_folder_up(); // showing the blue bar with the path in it when we are not in the root if (FileManager::get_levels($folder)) { echo "<table width=\"100%\"><tr><td bgcolor=\"#4171B5\">"; echo "<img src=\"../img/opendir.gif\" alt='directory'><font color=\"#ffffff\"><b>"; echo $folder . "</b></font></td></tr></table>"; } // showing the documents and subfolders of the folder we are in. show_documents($folder); //echo "<hr>"; } /* ----------------------------------------------------------- Ad Valvas ----------------------------------------------------------- */ if ($content == "Ad_Valvas") { $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT); $sql = "SELECT * FROM " . $tbl_announcement . " a, " . $item_property_table . " i WHERE i.tool = '" . TOOL_ANNOUNCEMENT . "' AND a.id=i.ref AND i.visibility='1' AND i.to_group_id = 0 AND i.to_user_id IS NULL ORDER BY a.display_order ASC"; $result = Database::query($sql); while ($myrow = Database::fetch_array($result)) { echo "<table width=\"100%\"><tr><td>"; echo "<img src='../img/valves.gif' alt='advalvas'>"; echo api_convert_and_format_date($myrow["end_date"], DATE_FORMAT_LONG, date_default_timezone_get());
?> </a> </b> <br> <?php echo _('Status in der Veranstaltung:'); ?> <b><?php echo $file['status'] ?: _('unbekannt'); ?> </b> </div> <div style="margin-bottom: 10px;" align="center"> <?php echo Studip\LinkButton::create(_('Herunterladen'), '?download_as_zip=' . $file['id']); ?> </div> <?php echo show_documents(get_user_documents($user_id, $file['id']), $open); ?> </td> </tr> <? endif; ?> </tbody> <? endforeach; ?> </table> <br> <?endforeach; ?>