diff --git a/Makefile b/Makefile index 894275037..27ff17615 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_announcement.o \ swad_enrollment.o swad_exam.o \ swad_file.o swad_file_browser.o swad_follow.o swad_forum.o \ swad_global.o swad_group.o \ - swad_help.o swad_holiday.o \ + swad_help.o swad_hierarchy.o swad_holiday.o \ swad_icon.o swad_ID.o swad_image.o swad_indicator.o \ swad_info.o swad_institution.o \ swad_layout.o swad_link.o swad_logo.o \ diff --git a/css/swad16.59.css b/css/swad16.59.css deleted file mode 100644 index 4047a0165..000000000 --- a/css/swad16.59.css +++ /dev/null @@ -1,2680 +0,0 @@ -/* swad_desktop.css:style-sheet for desktop layout of SWAD */ - -/* - SWAD (Shared Workspace At a Distance), - is a web platform developed at the University of Granada (Spain), - and used to support university teaching. - - This file is part of SWAD core. - Copyright (C) 1999-2016 Antonio Cañas Vargas - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General 3 License as - published by the Free Software Foundation,either version 3 of the - License,or (at your option) any later version. - - 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not,see . -*/ - -/********************************* Body **************************************/ -body - { - margin:0; - background-color:white; - font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size:1em; - } -input - { - font-size:12pt; - vertical-align:middle; - } -select - { - font-size:12pt; - } -textarea - { - font-size:13pt; - font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; - } -table - { - box-sizing:border-box; - border-width:0; - border-style:none; - border-spacing:0; - } -table th - { - box-sizing:border-box; - padding:0; - color:#4D88A1; - font-size:12pt; - font-weight:bold; - } -table td - { - box-sizing:border-box; - padding:0; - } -img - { - border-width:0; - border-style:none; - } -form - { - display:inline; - margin:0; - } -hr.WHITE_SEPARA {height:0; border-top:0; border-bottom:#707070 dotted 1px;} -hr.GREY_SEPARA {height:0; border-top:0; border-bottom:#707070 dotted 1px;} -hr.BLUE_SEPARA {height:0; border-top:0; border-bottom:#4D88A1 dotted 1px;} -hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} - -/*********************** Text decoration of links ****************************/ -a - { - color:#4D88A1; - } -a:link, a:visited, a:active - { - text-decoration:none; - } -a:hover /* Default ==> underlined */ - { - text-decoration:underline; - } -.TAB_OFF a, .TAB_ON a, .MENU_LIST_ITEM a /* Tabs and menus are the exceptions */ - { - text-decoration:none; - } - -/****************** Layout (the whole page with a background) ****************/ -#whole_page - { - display:table; - box-sizing:border-box; - width:100%; - /* - background-color:black; - background-image:url('/swad/background.jpg'); - background-repeat:no-repeat; - background-size:100%; - */ - } - -/************************* Layout (first heading row) ************************/ -#head_row_1 - { - display:table; - box-sizing:border-box; - width:100%; - height:40px; - } -.HEAD_ROW_1_WHITE - { - background-color:black; - } -.HEAD_ROW_1_GREY - { - background-image:linear-gradient(#383838 0,#383838 26px,#404040 100%); - background-repeat:no-repeat; - } -.HEAD_ROW_1_BLUE - { - background-image:linear-gradient(#5fa5df 0,#4f90c8 26px,#4f90c8 100%); - background-repeat:no-repeat; - } -.HEAD_ROW_1_YELLOW - { - background-color:#201420; - } - -#head_row_1_left - { - display:table-cell; - text-align:left; - vertical-align:middle; - } -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - #head_row_1_logo_small - { - display:inline-block; - } - #head_row_1_logo_big - { - display:none; - } - #head_row_1_tagline - { - display:none; - } - } -@media only screen and (min-width: 900px) - { /* For tablets and desktop */ - #head_row_1_logo_small - { - display:none; - } - #head_row_1_logo_big - { - display:inline-block; - } - #head_row_1_tagline - { - display:inline-block; - box-sizing:border-box; - padding:0 4px; - font-size:11pt; - font-weight:bold; - line-height:110%; - white-space:nowrap; - text-align:left; - vertical-align:middle; - } - } -.WHITE_TAGLINE {color:#B0B0B0;} -.GREY_TAGLINE {color:#E0E0E0;} -.BLUE_TAGLINE {color:#BAD2DA;} -.YELLOW_TAGLINE {color:#B3B0B3;} - -#head_row_1_search - { - display:inline-block; - padding:0 10px; - } -@media only screen and (max-width: 1279px) - { /* For mobile phones and tablets */ - #head_search_text - { - display:none; - } - } - -#head_row_1_right - { - display:table-cell; - text-align:right; - vertical-align:middle; - } -#login_box - { - display:inline; - padding:0 20px; - } -@media only screen and (max-width: 1279px) - { /* For mobile phones and tablets */ - #login_txt - { - display:none; - } - } -.WHITE_HEAD {color:#E0E0E0; font-size:12pt; white-space:nowrap;} -.GREY_HEAD {color:#E0E0E0; font-size:12pt; white-space:nowrap;} -.BLUE_HEAD {color:white; font-size:12pt; white-space:nowrap;} -.YELLOW_HEAD {color:#B3B0B3; font-size:12pt; white-space:nowrap;} - -/************************ Layout (second heading row) ************************/ -#head_row_2 - { - display:table; - box-sizing:border-box; - width:100%; - height:80px; - vertical-align:top; - } -.HEAD_ROW_2_WHITE - { - background-image:linear-gradient(#cfcfce 0,white 40px,white 100%); - } -.HEAD_ROW_2_GREY - { - background-color:#404040; - } -.HEAD_ROW_2_BLUE - { - background-color:#4f90c8; - } -.HEAD_ROW_2_YELLOW - { - background-color:#201420; - } - -/******************************* Current time ********************************/ -#head_row_2_time - { - display:table-cell; - box-sizing:border-box; - width:160px; - text-align:center; - vertical-align:top; - } -.WHITE_CUR_TIME {color:#808080; font-size:14pt; font-weight:bold;} -.GREY_CUR_TIME {color:#E0E0E0; font-size:14pt; font-weight:bold;} -.BLUE_CUR_TIME {color:#BAD2DA; font-size:14pt; font-weight:bold;} -.YELLOW_CUR_TIME {color:#B3B0B3; font-size:14pt; font-weight:bold;} -@media only screen and (max-width: 1023px) - { /* For mobile phones */ - #head_row_2_time - { - display:none; - } - } -@media only screen and (min-width: 1024px) and (max-width: 1279px) - { /* For tablets */ - #current_date - { - display:none; - } - } - -/****** Breadcrumb (platform/country/institution/centre/degree/course) *******/ -#head_row_2_hierarchy - { - display:table-cell; - text-align:center; - vertical-align:middle; - padding-top:6px; - } -.TOP_LOGO /* Institution / Centre / Degree logo in top title */ - { - height:40px; - margin-right:10px; - text-align:left; - vertical-align:top !important; - } -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - #breadcrumb - { - font-size:9pt; - font-weight:bold; - white-space:nowrap; - } - } -@media only screen and (min-width: 900px) and (max-width: 1023px) - { /* For tablets */ - #breadcrumb - { - font-size:12pt; - font-weight:bold; - white-space:nowrap; - } - } -@media only screen and (min-width: 1024px) - { /* For desktop */ - #breadcrumb - { - font-size:14pt; - font-weight:bold; - white-space:nowrap; - } - } - -.BC_SEMIOFF - { - opacity:0.33; - } -.BC_OFF - { - opacity:0.25; - } - -.BC_WHITE {color:#707070;} -.BC_GREY {color:#FFB42E;} -.BC_BLUE {color:#FFE880;} -.BC_YELLOW {color:#FFC040;} - -/******** Big name of country, institution, centre, degree or course *********/ -#main_title - { - margin:0; - padding:0; - font-size:24pt; - font-weight:normal; - line-height:100%; - white-space:nowrap; - } -#big_name_container - { - display:inline-block; - } -@media only screen and (max-width: 1023px) - { /* For mobile-phones */ - #big_short_name - { - display:table-cell; - max-width:560px; - height:40px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - margin:0 auto; - vertical-align:middle; - } - #big_full_name - { - display:none; - } - } -@media only screen and (min-width: 1024px) - { /* For tablets and desktop */ - #big_short_name - { - display:none; - } - #big_full_name - { - display:table-cell; - max-width:899px; - height:40px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - margin:0 auto; - vertical-align:middle; - } - } -.WHITE_COURSE {color:#4D88A1;} -.GREY_COURSE {color:#F7F6F5;} -.BLUE_COURSE {color:white;} -.YELLOW_COURSE {color:white;} - -/***************************** Notifications *********************************/ -#msg /* Notifications, used for AJAX based refresh */ - { - display:table-cell; - box-sizing:border-box; - width:160px; - text-align:center; - vertical-align:top; - padding-top:10px; - } -@media only screen and (max-width: 1023px) - { /* For mobile phones */ - #msg - { - display:none; - } - } -@media only screen and (min-width: 1024px) and (max-width: 1279px) - { /* For tablets */ - #notif_all - { - display:none; - } - } -.WHITE_NOTIF {color:#707070; font-size:12pt; white-space:nowrap;} -.GREY_NOTIF {color:#E0E0E0; font-size:12pt; white-space:nowrap;} -.BLUE_NOTIF {color:white; font-size:12pt; white-space:nowrap;} -.YELLOW_NOTIF {color:#B3B0B3; font-size:12pt; white-space:nowrap;} - -/******************* Layout (third heading row with tabs) ********************/ -.HEAD_ROW_3_WHITE - { - background-color:white; - } -.HEAD_ROW_3_GREY - { - background-image:linear-gradient(#404040 0,#404040 64px,white 64px,white 100%); - } -.HEAD_ROW_3_BLUE - { - background-image:linear-gradient(#4f90c8 0,#4f90c8 64px,white 64px,white 100%); - } -.HEAD_ROW_3_YELLOW - { - background-image:linear-gradient(#201420 0,#201420 64px,white 64px,white 100%); - } -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - #tabs - { - display:table; - box-sizing:border-box; - width:568px; /* 74px*7 + 8px */ - height:70px; - margin:0 auto; - border-spacing:1px; - } - .TAB_OFF - { - display:table-cell; - box-sizing:border-box; - width:80px; - height:68px; - margin:0; - padding:0; - border-radius:5px 5px 0 0; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - overflow:hidden; - } - .TAB_ON - { - display:table-cell; - box-sizing:border-box; - width:80px; - height:68px; - margin:0; - padding:0; - border-radius:5px 5px 0 0; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - overflow:hidden; - } - .TAB_TXT - { - font-size:9pt; - font-weight:bold; - line-height:100%; - width:70px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - margin:0 auto; - } - } -@media only screen and (min-width: 900px) - { /* For tablets and desktop */ - #tabs - { - display:table; - box-sizing:border-box; - width:778px; /* 110px*7 + 8px */ - height:70px; - margin:0 auto; - border-spacing:1px; - } - .TAB_OFF - { - display:table-cell; - box-sizing:border-box; - width:110px; - height:68px; - margin:0; - padding:0; - border-radius:5px 5px 0 0; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - overflow:hidden; - } - .TAB_ON - { - display:table-cell; - box-sizing:border-box; - width:110px; - height:68px; - margin:0; - padding:0; - border-radius:5px 5px 0 0; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - overflow:hidden; - } - .TAB_TXT - { - font-size:9pt; - font-weight:bold; - line-height:100%; - white-space:nowrap; - overflow:hidden; - } - } -.TAB_OFF a:hover, .TAB_ON a:hover - { - text-decoration:none; - } - -.TAB_ON_WHITE {background-color:rgba(247, 246, 245, 0.99);} -.TAB_ON_GREY {background-color:rgba(247, 246, 245, 0.99);} -.TAB_ON_BLUE {background-color:rgba(232, 243, 246, 0.99);} -.TAB_ON_YELLOW {background-color:rgba(255, 242, 189, 0.99);} - -.TAB_OFF_WHITE {background-color:#D4D4D4;} -.TAB_OFF_GREY {background-color:#AEA79F;} -.TAB_OFF_BLUE {background-color:#CAE1E8;} -.TAB_OFF_YELLOW {background-color:#FADE94;} - -.WHITE_TAB_OFF {color:#707070;} -.GREY_TAB_OFF {color:#505050;} -.BLUE_TAB_OFF {color:#365E6E;} -.YELLOW_TAB_OFF {color:#4A2E19;} - -.WHITE_TAB_ON {color:#4D88A1;} -.GREY_TAB_ON {color:#606060;} -.BLUE_TAB_ON {color:#4D88A1;} -.YELLOW_TAB_ON {color:#BD4815;} - -/*********************** Layout (fourth row, main zone) **********************/ -#main_zone - { - display:table; - box-sizing:border-box; - width:100%; - } -.LEFT_RIGHT_CELL - { - padding:0 6px 6px 6px; - text-align:center; - vertical-align:top; - } -.LEFT_RIGHT_CONTENT_WIDTH - { - box-sizing:border-box; - width:148px; - } - -@media only screen and (max-width: 1279px) - { /* For mobile phones and tablets */ - #main_zone_central_none, #main_zone_central_left, #main_zone_central_right, #main_zone_central_both - { - display:table-cell; - text-align:center; - vertical-align:top; - } - #left_col - { - display:none; - } - #right_col - { - display:none; - } - } -@media only screen and (min-width: 1280px) - { /* For desktop */ - #main_zone_central_none /* Hide left and right columns */ - { - display:table-cell; - text-align:center; - vertical-align:top; - } - #main_zone_central_left /* Show left column, hide right column */ - { - display:table-cell; - text-align:center; - vertical-align:top; - } - #main_zone_central_right /* Hide left column, show right column */ - { - display:table-cell; - text-align:center; - vertical-align:top; - padding-right:160px; - } - #main_zone_central_both /* Show both columns */ - { - display:table-cell; - text-align:center; - vertical-align:top; - padding-right:160px; - } - #left_col - { - display:table-cell; - box-sizing:border-box; - width:160px; - text-align:center; - vertical-align:top; - } - #right_col - { - display:table-cell; - box-sizing:border-box; - width:160px; - text-align:center; - vertical-align:top; - position:absolute; - right:0; - } - } - -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - #main_zone_central_container - { - box-sizing:border-box; - margin:-8px 0 0 0; - padding:8px 0; - border-radius:6px; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - position:relative; - } - } -@media only screen and (min-width: 900px) - { /* For tablets and desktop */ - #main_zone_central_container - { - box-sizing:border-box; - min-height:900px; - margin:-8px 0 0 0; - padding:8px 0; - border-radius:6px; - box-shadow:inset 0 -1px 1px 0 rgba(50,50,50,0.2); - text-align:center; - vertical-align:top; - position:relative; - } - } - -/************* Main central zone with horizontal menu and canvas *************/ -#main_horizontal - { - box-sizing:border-box; - width:100%; - } -#main_horizontal .MENU_LIST_CONTAINER - { - width:100%; - } -#main_horizontal .MENU_LIST - { - display:table; - box-sizing:border-box; - height:60px; - margin:0 auto; - padding:0 8px; - list-style-type:none; - } -#main_horizontal .MENU_LIST_ITEM - { - display:table-cell; - width:128px; - height:60px; - margin:0 auto; - text-align:center; - vertical-align:middle; - } -#main_horizontal .MENU_OPT_OFF - { - opacity:0.67; - } -#main_horizontal .MENU_OPT_OFF:hover, #main_horizontal .MENU_OPT_ON - { - opacity:1; - transform:scale(1.25,1.25); - } -#main_horizontal .MENU_ICO - { - box-sizing:border-box; - padding:32px 0 0 0; - background-size:32px 32px; - background-repeat:no-repeat; - background-position:center top; - } -#main_horizontal .MAIN_ZONE_CANVAS /* Where content for each action is written */ - { - box-sizing:border-box; - width:100%; - padding:8px 16px; - margin:0 auto; - text-align:left; - vertical-align:top; - } - -/************** Main central zone with vertical menu and canvas **************/ -@media only screen and (max-width: 1023px) - { /* For mobile phones */ - /* Mobile phone will display menu always in horizontal - so the CSS must draw menu really in horizontal */ - #main_vertical - { - box-sizing:border-box; - width:100%; - } - #main_vertical .MENU_LIST_CONTAINER - { - width:100%; - } - #main_vertical .MENU_LIST - { - display:table; - box-sizing:border-box; - height:60px; - margin:0 auto; - padding:0 8px; - list-style-type:none; - } - #main_vertical .MENU_LIST_ITEM - { - display:table-cell; - width:128px; - height:60px; - margin:0 auto; - text-align:center; - vertical-align:middle; - } - #main_vertical .MENU_OPT_OFF - { - opacity:0.67; - } - #main_vertical .MENU_OPT_OFF:hover, #main_vertical .MENU_OPT_ON - { - opacity:1; - transform:scale(1.2,1.2); - } - #main_vertical .MENU_ICO - { - box-sizing:border-box; - padding:32px 0 0 0; - background-size:32px 32px; - background-repeat:no-repeat; - background-position:center top; - } - #main_vertical .MAIN_ZONE_CANVAS /* Where content for each action is written */ - { - box-sizing:border-box; - width:100%; - padding:8px 16px; - margin:0 auto; - text-align:left; - vertical-align:top; - } - #action_title /* Do not display action title */ - { - display:none; - } - } - -@media only screen and (min-width: 1024px) - { /* For tablets and desktop */ - #main_vertical - { - display:table; - box-sizing:border-box; - width:100%; - } - #main_vertical .MENU_LIST_CONTAINER - { - display:table-cell; - box-sizing:border-box; - width:180px; - } - #main_vertical .MENU_LIST - { - display:table; - margin:0; - padding-left:8px; - list-style-type:none; - } - #main_vertical .MENU_LIST_ITEM - { - text-align:left; - } - #main_vertical .MENU_OPT_OFF - { - opacity:0.67; - } - #main_vertical .MENU_OPT_OFF:hover, #main_vertical .MENU_OPT_ON - { - opacity:1; - } - #main_vertical .MENU_ICO - { - display:table-cell; - height:42px; - vertical-align:middle; - padding:2px 2px 2px 50px; - background-size:40px 40px; - background-repeat:no-repeat; - background-position:2px 2px; - } - #main_vertical .MAIN_ZONE_CANVAS /* Where content for each action is written */ - { - display:table-cell; - box-sizing:border-box; - padding:8px 16px; - margin:0 auto; - text-align:left; - vertical-align:top; - } - #action_title - { - box-sizing:border-box; - width:400px; - min-height:70px; - clear:both; - margin:0 auto; - text-align:left; - background-size:64px 64px; - background-position:0 0; - background-repeat:no-repeat; - padding:4px 12px 12px 70px; - overflow:hidden; - } - } - -/********************************* Menu fonts ********************************/ -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - .MENU_TEXT - { - font-size:12pt; - font-weight:bold; - line-height:110%; - white-space:nowrap; - overflow:hidden; - width:48px; - margin:0 auto; - } - } -@media only screen and (min-width: 900px) - { /* For tablets and desktop */ - .MENU_TEXT - { - font-size:12pt; - font-weight:bold; - line-height:110%; - margin:0 auto; - } - } - -.WHITE_MENU_OFF {color:#4D88A1;} -.GREY_MENU_OFF {color:#707070;} -.BLUE_MENU_OFF {color:#4D88A1;} -.YELLOW_MENU_OFF {color:#BD4815;} - -.WHITE_MENU_ON {color:#4D88A1;} -.GREY_MENU_ON {color:#606060;} -.BLUE_MENU_ON {color:#4D88A1;} -.YELLOW_MENU_ON {color:#BD4815;} - -/****************** Title of current action in main block ********************/ -.WHITE_TITLE_ACTION {color:#606060; font-size:20pt;} -.GREY_TITLE_ACTION {color:#606060; font-size:20pt;} -.BLUE_TITLE_ACTION {color:#4D88A1; font-size:20pt;} -.YELLOW_TITLE_ACTION {color:#BD4815; font-size:20pt;} - -.WHITE_SUBTITLE_ACTION {color:#606060; font-size:12pt;} -.GREY_SUBTITLE_ACTION {color:#606060; font-size:12pt;} -.BLUE_SUBTITLE_ACTION {color:#4D88A1; font-size:12pt;} -.YELLOW_SUBTITLE_ACTION {color:#BD4815; font-size:12pt;} - -/************************* Users connected globally **************************/ -.CONNECTED - { - box-sizing:border-box; - margin:0 auto; - background:white; - border-style:solid; - border-width:1px; - border-color:#80C040; - padding:5px; - border-radius:4px; - font-size:12pt; - color:#398000; - overflow:hidden; - } -.CONNECTED_LIST - { - box-sizing:border-box; - margin-top:2px; - padding-top:2px; - border-style:solid; - border-width:1px 0 0 0; - border-color:#BFDF9F; - } - -/*************************** Most frequent actions ***************************/ -#MFU_actions - { - box-sizing:border-box; - width:148px; - margin:0; - background:white; - border-style:solid; - border-width:1px; - border-color:#8CBCCE; - padding:5px; - border-radius:4px; - font-size:11pt; - color:#4D88A1; - } -#MFU_actions ul - { - box-sizing:border-box; - width:138px; - margin-top:2px; - padding-top:2px; - border-style:solid; - border-width:1px 0 0 0; - border-color:#DDECF1; - } -#MFU_actions li - { - width:138px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - } -#MFU_actions img - { - width:20px; - height:20px; - margin:1px; - vertical-align:middle; - } - -#MFU_actions_big - { - padding:5px; - } -#MFU_actions_big img - { - width:40px; - height:40px; - margin:1px 4px 1px 0; - vertical-align:middle; - } - -/*********************************** Month ***********************************/ -.MONTH_CONTAINER - { - box-sizing:border-box; - width:148px; - margin:0; - padding:5px; - background:white; - border-style:solid; - border-width:1px; - border-color:#8CBCCE; - border-radius:4px; - text-align:center; - overflow:hidden; - } -.MONTH_TABLE_DAYS - { - box-sizing:border-box; - width:138px; - margin-top:2px; - padding-top:2px; - border-style:solid; - border-width:1px 0 0 0; - border-color:#DDECF1; - } -.MONTH - { - color:#4D88A1; - font-size:9pt; - white-space:nowrap; - } -.DAY_WRK_HEAD - { - color:#4D88A1; - font-size:9pt; - text-align:center; - } -.DAY_NO_WRK_HEAD - { - color:red; - font-size:9pt; - text-align:center; - } -.DAY_WRK - { - color:#202020; - font-size:9pt; - text-align:center; - } -.DAY_NO_WORK - { - color:#C04080; - font-size:9pt; - text-align:center; - } -.DAY_HLD - { - color:red; - font-size:9pt; - text-align:center; - } -.DAY_WRK_LIGHT - { - color:#E0E0E0; - font-size:9pt; - text-align:center; - } -.DAY_NO_WORK_LIGHT - { - color:#FFE0FF; - font-size:9pt; - text-align:center; - } -.DAY_HLD_LIGHT - { - color:#FFE0E0; - font-size:9pt; - text-align:center; - } -.DAY - { - border:solid 1px; - border-color:white; - text-align:center; - } -.TODAY - { - border:solid 1px; - border-color:#50B800; - text-align:center; - } -.DAY_EVENT - { - border:solid 1px; - border-color:white; - background-color:#FFF080; - text-align:center; - } -.TODAY_EVENT - { - border:solid 1px; - border-color:#50B800; - background-color:#FFF080; - text-align:center; - } - -/********************************* Buttons ***********************************/ -.BT_CREATE - { - background-color:#5BC33B; - border:1px solid #518741; - } -.BT_CONFIRM - { - background-color:#55ACEE; - border:1px solid #3B88C3; - } -.BT_REMOVE - { - background-color:#EF5555; - border:1px solid #C33B3B; - } -.BT_SUBMIT - { - color:white; - font-size:20px; - font-weight:bold; - line-height:normal; - margin:8px auto; - padding:10px 20px; - border-radius:4px; - box-shadow:0 1px 0 rgba(255,255,255,0.15) inset; - } -.BT_SUBMIT_INLINE - { - box-sizing:border-box; - min-width:170px; - color:white; - font-size:15px; - font-weight:bold; - line-height:normal; - margin:0 10px; - padding:4px; - border-radius:4px; - box-shadow:0 1px 0 rgba(255,255,255,0.15) inset; - } -.BT_SUBMIT:hover - { - background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2)); - } -.BT_SUBMIT_INLINE:hover - { - background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2)); - } -.BUTTONS_AFTER_ALERT - { - text-align:center; - vertical-align:middle; - padding:8px 0 16px 0; - } - -/********************************** Notice ***********************************/ -.NOTICE_CONTAINER_ACTIVE - { - box-sizing:border-box; - margin:0 auto 10px auto; - padding:10px; - background-image:linear-gradient(rgba(238,216,108,0.8) 0%,rgba(248,237,149,0.8) 15%,rgba(250,240,152,0.8) 100%); - box-shadow:0 8px 10px -5px rgba(125,113,0,0.8); - text-align:left; - overflow:hidden; - } -.NOTICE_CONTAINER_OBSOLETE - { - box-sizing:border-box; - margin:0 auto 10px auto; - padding:10px; - background-image:linear-gradient(rgba(238,216,108,0.4) 0%,rgba(248,237,149,0.4) 15%,rgba(250,240,152,0.4) 100%); - box-shadow:0 8px 10px -5px rgba(125,113,0,0.4); - text-align:left; - overflow:hidden; - } -.NOTICE_DATE_ACTIVE - { - display:inline-block; - float:right; - font-size:12pt; - color:#404040; - text-align:right; - overflow:hidden; - } -.NOTICE_DATE_OBSOLETE - { - display:inline-block; - float:right; - font-size:12pt; - color:#808080; - text-align:right; - overflow:hidden; - } -.NOTICE_SUBJECT_ACTIVE - { - margin:12px auto; - font-size:15pt; - font-weight:bold; - color:#404040; - text-align:center; - overflow:hidden; - } -.NOTICE_SUBJECT_OBSOLETE - { - margin:12px auto; - font-size:15pt; - font-weight:bold; - color:#808080; - text-align:center; - overflow:hidden; - } -.NOTICE_TEXT_BRIEF - { - clear:both; - font-size:12pt; - color:#204080; - overflow:hidden; - } -.NOTICE_TEXT_ACTIVE - { - padding:10px 20px; - clear:both; - font-size:12pt; - color:#204080; - overflow:hidden; - } -.NOTICE_TEXT_OBSOLETE - { - padding:10px 20px; - clear:both; - font-size:12pt; - color:#4070A0; - overflow:hidden; - } -.NOTICE_AUTHOR_ACTIVE - { - color:#404040; - font-size:12pt; - text-align:right; - overflow:hidden; - } -.NOTICE_AUTHOR_OBSOLETE - { - color:#808080; - font-size:12pt; - text-align:right; - overflow:hidden; - } - -/**************************** Institutional links ****************************/ -#institutional_links - { - box-sizing:border-box; - width:148px; - margin:0; - background:white; - border-style:solid; - border-width:1px; - border-color:#8CBCCE; - padding:5px; - border-radius:4px; - font-size:11pt; - color:#4D88A1; - overflow:hidden; - } -.INS_LNK - { - padding:1px; - font-size:11pt; - color:#4D88A1; - } - -/*********************************** Alerts **********************************/ -.ALERT - { - display:inline-block; - box-sizing:border-box; - max-width:90%; - margin:8px auto 0 auto; - background-color:#FFF9EA; - background-position:12px 12px; - background-size:20px 20px; - background-repeat:no-repeat; - padding:12px 12px 12px 45px; - border-radius:2px; - box-shadow: 0 2px 2px 0 rgba(124,121,109,0.14), 0 2px 1px -2px rgba(124,121,109,0.2), 0 1px 5px 0 rgba(124,121,109,0.12); - opacity:0.9; - font-size:12pt; - color:#632921; - text-align:left; - overflow:hidden; - } - -/*********************************** Icons ***********************************/ -.ICO20x15B {width:20px; height:15px; vertical-align:middle; display:block;} -.ICO20x20 {width:20px; height:20px; vertical-align:middle;} -.ICO20x20B {width:20px; height:20px; vertical-align:middle; display:block;} -.ICO25x25 {width:25px; height:25px; vertical-align:middle;} -.ICO40x40 {width:40px; height:40px; vertical-align:middle;} -.ICO40x40B {width:40px; height:40px; vertical-align:middle; display:block;} -.ICO64x64 {width:64px; height:64px; vertical-align:middle;} -.ICO160x160 {width:160px; height:160px; vertical-align:middle;} -.BANNER {width:150px; height:50px;} -.BANNER_SMALL {width:75px; height:25px;} - -/****** Contextual links with small icons and text to go to some action ******/ -.CONTEXT_MENU - { - margin:6px auto 8px auto; - text-align:center; - } -.CONTEXT_OPT - { - display:inline; - margin-left:6px; - margin-right:6px; - white-space:nowrap; - } - -/********************************* Frame 10 **********************************/ -.FRAME - { - display:inline-block; - box-sizing:border-box; - margin:5px 0; - padding:8px 12px 20px 12px; - background-color:white; - border-radius:2px; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 2px 1px -2px rgba(0,0,0,0.2), 0 1px 5px 0 rgba(0,0,0,0.12); - text-align:center; - overflow:hidden; - } -.FRAME_SHADOW - { - display:inline-block; - box-sizing:border-box; - margin:5px 0 18px 0; - padding:12px; - background-color:rgba(255,255,255,0.95); - border-width:1px; - border-style:solid; - border-color:#C0C0C0; - border-radius:4px; - box-shadow:2px 5px 15px #888; - text-align:center; - overflow:hidden; - } -.FRAME_ICO - { - box-sizing:border-box; - height:20px; - text-align:left; - } -.FRAME_ICO_LEFT - { - display:inline-block; - } -.FRAME_ICO_RIGHT - { - display:inline-block; - float:right; - } -.FRAME_TBL - { - box-sizing:border-box; - width:100%; - } -.FRAME_TBL_MARGIN - { - box-sizing:border-box; - width:100%; - margin-bottom:20px; - } -.FRAME_TBL_TITLE - { - display:table; - box-sizing:border-box; - width:100%; - margin:0 auto; - padding:0 12px 12px 12px; - color:#808080; - font-size:20pt; - font-weight:bold; - } - -/* Apply only to the first level of th and td */ -table.CELLS_PAD_1 > tbody > tr > th {padding: 1px;} -table.CELLS_PAD_1 > tbody > tr > td {padding: 1px;} -table.CELLS_PAD_2 > tbody > tr > th {padding: 2px;} -table.CELLS_PAD_2 > tbody > tr > td {padding: 2px;} -table.CELLS_PAD_5 > tbody > tr > th {padding: 5px;} -table.CELLS_PAD_5 > tbody > tr > td {padding: 5px;} -table.CELLS_PAD_10 > tbody > tr > th {padding:10px;} -table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} - -/*********************************** Title ***********************************/ -.TIT - { - margin:13px auto 0 auto; - font-size:13pt; - font-weight:bold; - color:#94745C; - text-align:center; - } - -/********** Title of country,institution,centre,degree,course ************/ -.TITLE_LOCATION - { - color:#808080; - font-size:20pt; - font-weight:bold; - } - -/******************************* Map of country ******************************/ -.COUNTRY_MAP_TITLE - { - box-sizing:border-box; - width:40px; - height:40px; - margin-right:10px; - vertical-align:top; - } -.COUNTRY_MAP_TINY - { - box-sizing:border-box; - width:20px; - height:20px; - vertical-align:middle; - } -.COUNTRY_MAP_SMALL - { - box-sizing:border-box; - width:64px; - height:64px; - vertical-align:middle; - } -.COUNTRY_MAP_SHOW - { - box-sizing:border-box; - width:320px; - height:320px; - margin:10px; - } -.COUNTRY_MAP_PRINT - { - box-sizing:border-box; - width:625px; - height:625px; - margin:12px; - } - -/******************* Web of institution, centre, degree **********************/ -.EXTERNAL_WWW - { - box-sizing:border-box; - max-width:250px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - } - -/****************************** Photo of centre ******************************/ -.CENTRE_PHOTO_SHOW - { - box-sizing:border-box; - width:480px; - padding:6px; margin:9px; - border:solid 1px #EEE; - } -a:hover img.CENTRE_PHOTO_SHOW - { - border:solid 1px #CCC; - box-shadow:1px 1px 6px #999; - } -.CENTRE_PHOTO_PRINT - { - box-sizing:border-box; - width:600px; - padding:10px; margin:15px; - border:solid 1px #EEE; - box-shadow:1px 1px 6px #999; - } - -/**************** Attribution (author and license) of images *****************/ -#AttributionArea - { - box-sizing:border-box; - width:480px; - } -.ATTRIBUTION - { - box-sizing:border-box; - margin-bottom:15px; - color:#A0A0A0; - font-size:8pt; - text-align:center; - } - -/******************************* User's photo ********************************/ -.PHOTO15x20 {width: 15px; height: 20px; vertical-align:middle; border-radius:2px;} -.PHOTO15x20B {width: 15px; height: 20px; vertical-align:middle; border-radius:2px; display:block; margin:0 auto;} -.PHOTO18x24 {width: 18px; height: 24px; vertical-align:middle; border-radius:2px;} -.PHOTO21x28 {width: 21px; height: 28px; vertical-align:middle; border-radius:2px;} -.PHOTO30x40 {width: 30px; height: 40px; vertical-align:middle; border-radius:2px;} -.PHOTO42x56 {width: 42px; height: 56px; vertical-align:middle; border-radius:3px;} -.PHOTO45x60 {width: 45px; height: 60px; vertical-align:middle; border-radius:3px;} -.PHOTO60x80 {width: 60px; height: 80px; vertical-align:middle; border-radius:3px;} -.PHOTO93x124 {width: 93px; height:124px; vertical-align:middle; border-radius:4px;} -.PHOTO186x248 {width:186px; height:248px; vertical-align:middle; border-radius:8px;} -.IMG_USR - { - box-sizing:border-box; - width:186px; - height:248px; - border-radius:4px; - } -.ZOOM - { - box-sizing:border-box; - position:absolute; - z-index:1000; - left:-300px; - top:-400px; - padding:6px; - background-color:rgba(255,255,255,0.95); - border-width:1px; - border-style:solid; - border-color:#C0C0C0; - border-radius:6px; - box-shadow:2px 5px 15px #888; - } -.ZOOM_TXT - { - color:#202020; - font-size:12pt; - } - -.NO_BR {white-space:nowrap;} - -.BG_MSG_BLUE - { - background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); - background-repeat:no-repeat; - } -.BG_MSG_GREEN - { - background-image:linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); - background-repeat:no-repeat; - } - -/************************** Listing of users *********************************/ -.USR_LIST_NUM {color:#A0A0A0; font-size:15pt; font-weight:bold;} -.USR_LIST_NUM_N {color:#404040; font-size:15pt; font-weight:bold;} - -/*****************************************************************************/ -.WHITE_USR {color:#E0E0E0; font-size:15pt; font-weight:bold; white-space:nowrap;} -.GREY_USR {color:#E0E0E0; font-size:15pt; font-weight:bold; white-space:nowrap;} -.BLUE_USR {color:white; font-size:15pt; font-weight:bold; white-space:nowrap;} -.YELLOW_USR {color:#B3B0B3; font-size:15pt; font-weight:bold; white-space:nowrap;} - -.WHITE_CONNECTED {color:#398000; font-size:12pt;} -.GREY_CONNECTED {color:#398000; font-size:12pt;} -.BLUE_CONNECTED {color:#398000; font-size:12pt;} -.YELLOW_CONNECTED {color:#398000; font-size:12pt;} - -.WHITE_TITLE {color:#505050; font-size:18pt;} -.GREY_TITLE {color:#505050; font-size:18pt;} -.BLUE_TITLE {color:#4D88A1; font-size:18pt;} -.YELLOW_TITLE {color:#BD4815; font-size:18pt;} - -/**************************** Icon highlighting ******************************/ -.ICO_HIDDEN - { - opacity:0.2; - } -.ICO_HIGHLIGHT - { - opacity:0.67; - } -.ICO_HIGHLIGHT:hover - { - opacity:1; - } - -.HLP_HIGHLIGHT - { - opacity:0.33; - } -.HLP_HIGHLIGHT:hover - { - opacity:1; - } - -/********************************* Form fonts ********************************/ -.WHITE_FORM {color:#4D88A1; font-size:13pt;} -.GREY_FORM {color:#4D88A1; font-size:13pt;} -.BLUE_FORM {color:#4D88A1; font-size:13pt;} -.YELLOW_FORM {color:#7C4D2A; font-size:13pt;} - -.WHITE_FORM_DARK {color:#365E6E; font-size:13pt;} -.GREY_FORM_DARK {color:#365E6E; font-size:13pt;} -.BLUE_FORM_DARK {color:#365E6E; font-size:13pt;} -.YELLOW_FORM_DARK {color:#4A2E19; font-size:13pt;} - -.WHITE_FORM_NOWRAP {color:#4D88A1; font-size:13pt; white-space:nowrap;} -.GREY_FORM_NOWRAP {color:#4D88A1; font-size:13pt; white-space:nowrap;} -.BLUE_FORM_NOWRAP {color:#4D88A1; font-size:13pt; white-space:nowrap;} -.YELLOW_FORM_NOWRAP {color:#7C4D2A; font-size:13pt; white-space:nowrap;} - -.WHITE_FORM_BOLD {color:#4D88A1; font-size:13pt; font-weight:bold;} -.GREY_FORM_BOLD {color:#4D88A1; font-size:13pt; font-weight:bold;} -.BLUE_FORM_BOLD {color:#4D88A1; font-size:13pt; font-weight:bold;} -.YELLOW_FORM_BOLD {color:#7C4D2A; font-size:13pt; font-weight:bold;} - -/****************************** Placing of objects ***************************/ -.LEFT_TOP {text-align:left; vertical-align:top;} -.LEFT_MIDDLE {text-align:left; vertical-align:middle;} -.LEFT_BOTTOM {text-align:left; vertical-align:bottom;} -.CENTER_TOP {text-align:center; vertical-align:top;} -.CENTER_MIDDLE {text-align:center; vertical-align:middle;} -.CENTER_BOTTOM {text-align:center; vertical-align:bottom;} -.RIGHT_TOP {text-align:right; vertical-align:top;} -.RIGHT_MIDDLE {text-align:right; vertical-align:middle;} -.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;} - -/***************** Colors used in headers,backgrounds,etc. *****************/ -.COLOR0 {background-color:#F4F2EA;} -.COLOR1 {background-color:#FBFAF7;} -.LIGHT_GREEN {background-color:#C0FF40;} -.LIGHT_BLUE {background-color:#DDECF1;} -.VERY_LIGHT_BLUE {background-color:#EAF3F6;} - -/********************************* Course info *******************************/ -#crs_info - { - margin:0; - padding:0 12px; - color:inherit; - } -#crs_info table - { - border:1px solid grey; - } -#crs_info th - { - border:1px solid grey; - background-color:#F0F0F0; - padding:6px; - } -#crs_info td - { - border:1px solid grey; - padding:6px; - } - -/************************ Help for the text editor ***************************/ -.HELP_EDIT - { - margin:10px; - text-align:center; - color:#808080; - font-size:8pt; - } - -/*********************************** Lists ***********************************/ -.LIST_LEFT - { - list-style-type:none; - padding:0; - margin:0; - text-align:left; - vertical-align:middle; - } -.LIST_CENTER - { - list-style-type:none; - padding:0; - margin:0 auto; - text-align:center; - vertical-align:middle; - } - -/*****************************************************************************/ - -.FILENAME {color:#404040; font-size:18pt; font-weight:bold;} - -.BROWSER_TITLE {color:#94745C; font-size:13pt; font-weight:bold;} -.BROWSER_TITLE_LIGHT {color:#D5C6BB; font-size:13pt; font-weight:bold;} -.BROWSER_SUBTITLE {color:#94745C; font-size:12pt;} -.BROWSER_TABLE - { - box-sizing:border-box; - width:100%; - } - -.T1 {color:#404040; font-size:15pt;} -.T2 {color:#404040; font-size:13pt;} -.T3 {color:#404040; font-size:12pt;} - -.LST {color:#404040; font-size:11pt; white-space:nowrap;} -.LST_HID {color:#A0A0A0; font-size:11pt; white-space:nowrap;} -.LST_REC {color:#008000; font-size:11pt; white-space:nowrap;} -.LST_REC_HID {color:#89BE87; font-size:11pt; white-space:nowrap;} -.LST_EDIT {color:#404040; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;} -.LST_EDIT_HID {color:#A0A0A0; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;} -.LST_EDIT_REC {color:#008000; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;} -.LST_EDIT_REC_HID {color:#89BE87; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;} - -.DAT {color:#404040; font-size:13pt;} -.DAT_NOBR {color:#404040; font-size:13pt; white-space:nowrap;} -.DAT_BOLD {color:#404040; font-size:13pt; font-weight:bold;} -.DAT_GREEN {color:#008000; font-size:13pt;} -.DAT_LIGHT {color:#A0A0A0; font-size:13pt;} -.DAT_N {color:black; font-size:13pt;} -.DAT_NOBR_N {color:black; font-size:13pt; white-space:nowrap;} -.DAT_N_BOLD {color:black; font-size:13pt; font-weight:bold;} - -/*********************** Line in top part of a table row *********************/ -.DAT_N_LINE_TOP - { - color:black; - font-size:13pt; - border-style:solid none none none; - border-width:1px; - } - -.DAT_SMALL {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#707070; font-size:12pt;} -.DAT_SMALL_LIGHT {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#A0A0A0; font-size:12pt;} -.DAT_SMALL_NOBR {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#707070; font-size:12pt; white-space:nowrap;} -.DAT_SMALL_N {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:black; font-size:12pt;} -.DAT_SMALL_NOBR_N {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:black; font-size:12pt; white-space:nowrap;} - -.DAT_SMALL_GREY {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#707070; font-size:12pt;} -.DAT_SMALL_RED {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:12pt;} -.DAT_SMALL_GREEN {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#008000; font-size:12pt;} -.DAT_SMALL_BLUE {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#0080FF; font-size:12pt;} -.DAT_SMALL_YELLOW {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#C0C000; font-size:12pt;} - -/******************************** User's IDs *********************************/ -.USR_ID {font-size:18pt; font-weight:bold;} -.USR_ID_C {color:#408020} -.USR_ID_NC {color:#A02020} - -/******************************* Record card *********************************/ -.REC_C1_TOP - { - box-sizing:border-box; - width:68px; - padding-top:8px !important; - vertical-align:top; - } -.REC_C2_TOP - { - box-sizing:border-box; - width:282px; - height:68px; - padding-top:8px !important; - } -.REC_C3_TOP - { - box-sizing:border-box; - width:190px; - } - -.REC_C1_MID - { - box-sizing:border-box; - width:68px; - } -.REC_C2_MID - { - box-sizing:border-box; - width:282px; - } -.REC_C3_MID - { - box-sizing:border-box; - width:190px; - } - -.REC_C1_BOT - { - box-sizing:border-box; - width:170px; - } -.REC_C2_BOT - { - box-sizing:border-box; - width:362px; - } -.REC_C2_BOT_INPUT - { - box-sizing:border-box; - width:358px; - } - -.REC_HEAD {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#808080; font-size:12pt;} -.REC_NAME {color:#808080; font-size:20pt; font-weight:bold;} -.REC_NICK {color:#808080; font-size:15pt; font-weight:bold;} -.REC_WEBS - { - width:180px; - margin:0 auto; - } -.REC_DAT {color:#808080; font-size:13pt; line-height:110%;} -.REC_DAT_BOLD {color:black; font-size:13pt; line-height:110%;} - -/*****************************************************************************/ -.MSJ_AVISO {color:#632921; font-size:12pt;} -.TIT_TBL {color:#4D88A1; font-size:12pt; font-weight:bold;} -.TIT_CLASSPHOTO {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#606060; font-size:13pt;} -.CLASSPHOTO {color:#606060; font-size:10pt; line-height:110%; white-space:nowrap;} - -.GRP_TITLE {color:#4D88A1; font-size:15pt; font-weight:bold;} - -.ASG_TITLE {color:#4D88A1; font-size:15pt; font-weight:bold;} -.ASG_TITLE_LIGHT {color:#AFC4CC; font-size:15pt; font-weight:bold;} -.ASG_GRP {color:#4D88A1; font-size:12pt;} -.ASG_GRP_LIGHT {color:#AFC4CC; font-size:12pt;} -.DATE_GREEN {color:#008000; font-size:13pt;} -.DATE_GREEN_LIGHT {color:#89BE87; font-size:13pt;} -.DATE_RED {color:red; font-size:13pt;} -.DATE_RED_LIGHT {color:#F98A8A; font-size:13pt;} - -.ASG_LST_DATE_GREEN {color:#008000; font-size:11pt; white-space:nowrap;} -.ASG_LST_DATE_RED {color:red; font-size:11pt; white-space:nowrap;} - -.STATUS_GREEN {color:#008000; font-size:12pt;} -.STATUS_GREEN_LIGHT {color:#89BE87; font-size:12pt;} -.STATUS_RED {color:red; font-size:12pt;} -.STATUS_RED_LIGHT {color:#F98A8A; font-size:12pt;} - -/********************************** Tests ************************************/ -.TAG_SEL {box-sizing:border-box; width:346px;} -.TAG_TXT {box-sizing:border-box; width:346px;} -.STEM {box-sizing:border-box; width:700px;} -.ANS {color:#404040; font-size:13pt; font-weight:bold;} -.ANS_OK {color:#008000; font-size:13pt; font-weight:bold;} -.ANS_BAD {color:red; font-size:13pt; font-weight:bold;} -.ANS_STR {box-sizing:border-box; width:600px;} -.TEST_SUBTITLE - { - margin:10px; - color:#404040; - font-size:13pt; - text-align:center; - vertical-align:middle; - } -.TEST_NUM_QST {color:#808080; font-size:20pt; font-weight:bold;} -.TEST {color:#404040; font-size:12pt;} -.TEST_EXA {color:#404040; font-size:12pt;} -.TEST_EXA_LIGHT {color:#A0A0A0; font-size:12pt;} -.TEST_EDI {color:#404040; font-size:12pt;} -.TEST_EDI_LIGHT {color:#A0A0A0; font-size:12pt;} - -.TEST_IMG_SHOW_STEM_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:10px 0; - } -.TEST_IMG_SHOW_STEM - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } -.TEST_IMG_SHOW_ANS_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:10px 0; - } -.TEST_IMG_SHOW_ANS - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } -.TEST_IMG_EDIT_LIST_STEM_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:5px 0; - } -.TEST_IMG_EDIT_LIST_STEM - { - box-sizing:border-box; - width:100%; - border-radius:2px; - } -.TEST_IMG_EDIT_LIST_ANS_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:5px 0; - } -.TEST_IMG_EDIT_LIST_ANS - { - box-sizing:border-box; - width:100%; - border-radius:2px; - } - -.TEST_FORM_EDIT_IMG - { - box-sizing:border-box; - margin:15px 0; - text-align:left; - vertical-align:top; - } - -.TEST_IMG_EDIT_ONE_STEM_CONTAINER - { - box-sizing:border-box; - width:100%; - } -.TEST_IMG_EDIT_ONE_STEM - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } -.TEST_IMG_EDIT_ONE_ANS_CONTAINER - { - box-sizing:border-box; - width:100%; - } -.TEST_IMG_EDIT_ONE_ANS - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } - -.TEST_EDI_ANS_LEFT_COL - { - box-sizing:border-box; - width:50px; - text-align:left; - vertical-align:top; - } -.TEST_EDI_ANS_CENTER_COL - { - box-sizing:border-box; - width:50px; - text-align:right; - vertical-align:top; - } -.TEST_EDI_ANS_RIGHT_COL - { - box-sizing:border-box; - width:604px; - text-align:left; - vertical-align:top; - } - -/******************************* Time table **********************************/ -#timetable - { - width:100%; - margin:0 auto; - } -.TT_TXT - { - font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; - color:#345C6C; - font-size:10pt; - line-height:110%; - letter-spacing:0; - } -.TT_DAY - { - font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; - color:#404040; - font-size:10pt; - letter-spacing:0; - } -.TT_SUNDAY - { - font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; - color:red; - font-size:10pt; - letter-spacing:0; - } -.FREE0 {height:20px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #EEEADC #F4F2EA;} -.FREE1 {height:20px; background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #E0D9C2 #F4F2EA;} -.FREE2 {height:20px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #F5F2E9 #FBFAF7;} -.FREE3 {height:20px; background-color:#FBFAF7; border:solid 1px; border-color:#FBFAF7 #E0D9C2 #E0D9C2 #FBFAF7;} -.THEO {height:20px; background-color:#C0DAE4; border:solid 2px; border-color:#C9E3ED #B5CFD9 #B5CFD9 #C9E3ED;} -.PRAC {height:20px; background-color:#DBE5E9; border:solid 2px; border-color:#E4EEF2 #D0DADE #D0DADE #E4EEF2;} -.TUTO {height:20px; background-color:#D6E9C3; border:solid 2px; border-color:#DFEEE0 #CAE3B1 #CAE3B1 #DFEEE0;} - -.PREF_OFF - { - box-sizing:border-box; - height:44px; - text-align:center; - vertical-align:middle; - } -.PREF_ON - { - box-sizing:border-box; - height:44px; - text-align:center; - vertical-align:middle; - border:solid 1px; - border-color:#C0DAE4; - background-color:#DDECF1; - } - -.LOG {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:#606060; font-size:11pt;} -.LOG_R {font-family:"Arial Narrow","Nimbus Sans L","DejaVu LGC Sans Condensed",sans-serif; color:red; font-size:11pt;} - -/******************************** Image uploading ****************************/ -.IMG_UPLOAD_CONTAINER - { - vertical-align:top; - margin-bottom:10px; - } -.IMG_UPLOAD_BUTTON - { - cursor:pointer; - } -.IMG_UPLOAD_ICO - { - width:20px; - height:20px; - margin:0 5px; - vertical-align:middle; - } -.IMG_UPLOAD_FILE - { - display:none; - } -.IMG_UPLOAD_FILENAME - { - color:#808080; - font-size:12pt; - } - -/******************************** Social activity ****************************/ -#view_new_posts_container,#view_old_posts_container - { - display:table-cell; - height:50px; - text-align:center; - vertical-align:middle; - } -#just_now_timeline_list,#new_timeline_list,#old_timeline_list - { - display:none; - margin:0; - padding:0; - } -#old_timeline_list - { - margin:0; - padding:0; - } - -.SOCIAL_PUB - { - width:536px; - border-top:1px solid silver; - } -.SOCIAL_NEW_PUB - { - background-color:#DDECF1; - animation: fadein 2s linear forwards; - } -@keyframes fadein - { - to {background-color:white;} - } - -.SOCIAL_FORM_NEW_POST - { - padding:10px 0; - width:480px; - text-align:center; - } -.SOCIAL_TOP_CONTAINER - { - box-sizing:border-box; - width:536px; - padding-top:10px; - text-align:left; - } -.SOCIAL_TOP_PUBLISHER - { - color:#808080; - font-size:13pt; - } - -.SOCIAL_NOTE_LEFT_PHOTO - { - display:inline-block; - box-sizing:border-box; - width:56px; - height:70px; - padding:10px 0; - text-align:left; - vertical-align:top; - } -.SOCIAL_NOTE_RIGHT_CONTAINER - { - display:inline-block; - box-sizing:border-box; - width:480px; - padding-top:10px; - } -.SOCIAL_RIGHT_AUTHOR - { - display:inline-block; - box-sizing:border-box; - width:320px; - text-align:left; - vertical-align:top; - } -.SOCIAL_RIGHT_TIME - { - display:inline-block; - box-sizing:border-box; - width:160px; - text-align:right; - vertical-align:top; - } -.SOCIAL_BOTTOM_LEFT /* Container for button used to toggle new comment form */ - { - display:inline-block; - box-sizing:border-box; - width:56px; - vertical-align:bottom; - } -.SOCIAL_BOTTOM_RIGHT /* Container for fav, share, remove and comments */ - { - display:inline-block; - box-sizing:border-box; - width:480px; - vertical-align:top; - } -.SOCIAL_ICOS_FAV_SHA_REM /* Container for fav, share and remove */ - { - padding-bottom:10px; - } -.SOCIAL_TEXTAREA_POST - { - box-sizing:border-box; - width:480px; - margin:0; - resize:none; - } -.SOCIAL_TXT - { - padding:5px 0; - color:#404040; - font-size:13pt; - } -.SOCIAL_POST_IMG_CONTAINER - { - box-sizing:border-box; - width:480px; - margin:10px 0; - } -.SOCIAL_POST_IMG - { - box-sizing:border-box; - width:480px; - border-radius:4px; - } -.SOCIAL_POST_IMG_TIT_URL - { - box-sizing:border-box; - width:440px; - } -.SOCIAL_ICO_COMMENT - { - display:inline-block; - padding-bottom:10px; - } -.SOCIAL_ICO_COMMENT_DISABLED - { - display:inline-block; - padding-bottom:10px; - opacity:0.1; - } -.SOCIAL_ICO_FAV - { - display:inline-block; - vertical-align:bottom; - } -.SOCIAL_ICO_SHARE - { - display:inline-block; - padding-left:20px; - vertical-align:bottom; - } -.SOCIAL_ICO_FAV_DISABLED - { - display:inline-block; - vertical-align:bottom; - opacity:0.1; - } -.SOCIAL_ICO_SHARE_DISABLED - { - display:inline-block; - padding-left:20px; - vertical-align:bottom; - opacity:0.1; - } -.SOCIAL_ICO_REMOVE - { - display:inline-block; - vertical-align:bottom; - float:right; - } -.SOCIAL_NUM_SHARES_FAVS - { - color:#A0A0A0; - font-size:12pt; - font-weight:bold; - } -.SOCIAL_SHARER - { - display:inline-block; - padding-left:4px; - vertical-align:bottom; - } -.SOCIAL_COMMENT - { - border-top:1px solid silver; - } -.SOCIAL_COMMENT_PHOTO - { - display:inline-block; - box-sizing:border-box; - width:40px; - height:54px; - padding:10px 0; - text-align:left; - vertical-align:top; - } -.SOCIAL_COMMENT_RIGHT_CONTAINER - { - display:inline-block; - box-sizing:border-box; - width:440px; - padding:10px 0; - } -.SOCIAL_COMMENT_RIGHT_AUTHOR - { - display:inline-block; - box-sizing:border-box; - width:280px; - text-align:left; - vertical-align:top; - } -.SOCIAL_FORM_NEW_COMMENT - { - display:inline-block; - margin-left:56px; - border-top:1px solid silver; - padding-bottom:10px; - width:480px; - text-align:center; - } -.SOCIAL_TEXTAREA_COMMENT - { - box-sizing:border-box; - width:440px; - margin:0; - resize:none; - } -.SOCIAL_COMMENT_IMG_CONTAINER - { - box-sizing:border-box; - width:440px; - margin:10px 0; - } -.SOCIAL_COMMENT_IMG - { - box-sizing:border-box; - width:440px; - border-radius:4px; - } -.SOCIAL_COMMENT_IMG_TIT_URL - { - box-sizing:border-box; - width:440px; - } - -/************************************ Forum **********************************/ -.FOR_IMG_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:10px 0; - } -.FOR_IMG - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } -.FOR_IMG_TIT_URL - { - box-sizing:border-box; - width:480px; - } - -/*********************************** Messages ********************************/ -.MSG_TO_ONE_RCP - { - display:inline-block; - padding-left:4px; - text-align:left; - vertical-align:middle; - } -.MSG_IMG_CONTAINER - { - box-sizing:border-box; - width:100%; - margin:10px 0; - } -.MSG_IMG - { - box-sizing:border-box; - width:100%; - border-radius:4px; - } -.MSG_IMG_TIT_URL - { - box-sizing:border-box; - width:480px; - } -.MSG_TXT {color:#404040; font-size:13pt;} -.MSG_TIT {color:#4D88A1; font-size:13pt;} -.MSG_TIT_NEW {color:#4D88A1; font-size:13pt; font-weight:bold;} -.MSG_TIT_REM {color:#AFC4CC; font-size:13pt;} -.MSG_TIT_BG - { - background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); - background-repeat:no-repeat; - color:#4D88A1; - font-size:13pt; - } -.MSG_TIT_BG_NEW - { - background-image:linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); - background-repeat:no-repeat; - color:#4D88A1; - font-size:13pt; - font-weight:bold; - } -.MSG_TIT_BG_REM - { - background-image:linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); - background-repeat:no-repeat; - color:#AFC4CC; - font-size:13pt; - } -.MSG_AUT {color:#4D88A1; font-size:11pt;} -.MSG_AUT_LIGHT {color:#AFC4CC; font-size:11pt;} -.MSG_AUT_NEW {color:#4D88A1; font-size:11pt; font-weight:bold;} -.MSG_AUT_BG - { - background-image:linear-gradient(#eaf3f6 0,#eaf3f6 80%,white 100%); - background-repeat:no-repeat; - color:#4D88A1; - font-size:11pt; - } -.MSG_AUT_BG_NEW - { - background-image:linear-gradient(#f5ffd7 0,#f5ffd7 80%,white 100%); - background-repeat:no-repeat; - color:#4D88A1; - font-size:11pt; - font-weight:bold; - } -.MSG_AUT_BG_REM - { - background-image:linear-gradient(#f3fcff 0,#f3fcff 80%,white 100%); - background-repeat:no-repeat; - color:#AFC4CC; - font-size:11pt; - } -.MSG_DATE {color:#4D88A1; font-size:11pt;} -.MSG_DATE_NEW {color:#4D88A1; font-size:11pt; font-weight:bold;} - -.BT {width:20px; text-align:center; vertical-align:top;} -.BT0 {width:20px; text-align:center; vertical-align:top; background-color:#F4F2EA;} -.BT1 {width:20px; text-align:center; vertical-align:top; background-color:#FBFAF7;} -.BM {width:20px; text-align:center; vertical-align:middle;} -.BM_SEL {width:20px; text-align:center; vertical-align:middle; background-color:#C0FF40;} -.BM0 {width:20px; text-align:center; vertical-align:middle; background-color:#F4F2EA;} -.BM1 {width:20px; text-align:center; vertical-align:middle; background-color:#FBFAF7;} - -/***************************** Calls for exams *******************************/ -.CONV_TIT - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#404040; - font-weight:bold; - font-size:18pt; - } -.CONV_TIT_IMPR - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#202020; - font-weight:bold; - font-size:18pt; - } -.CONV_NEG - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#404040; - font-weight:bold; - font-size:13pt; - white-space:nowrap; - } -.CONV_NEG_IMPR - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#202020; - font-weight:bold; - font-size:13pt; - white-space:nowrap; - text-align:right; - } -.CONV - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#404040; - font-size:13pt; - } -.CONV_IMPR - { - font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; - color:#202020; - font-size:13pt; - } - -/***************************** Public user's profile *************************/ -.PRF_FIG_LEFT_CONTAINER - { - display:inline-block; - box-sizing:border-box; - width:50%; - padding-right:10px; - text-align:right; - vertical-align:top; - } -.PRF_FIG_RIGHT_CONTAINER - { - display:inline-block; - box-sizing:border-box; - width:50%; - padding-left:10px; - text-align:left; - vertical-align:top; - } -.PRF_FIG_UL - { - display:inline-block; - list-style-type:none; - padding:0; - margin:0; - text-align:left; - vertical-align:middle; - } -.PRF_FIG_LI - { - padding:0 0 0 24px; - background-size:20px 20px; - background-repeat:no-repeat; - background-position:left center; - opacity:0.67; - } - -#following_side - { - display:inline-block; - box-sizing:border-box; - width:50%; - padding-right:10px; - } -#followers_side - { - display:inline-block; - box-sizing:border-box; - width:50%; - padding-left:10px; - } -.FOLLOW_SIDE - { - display:table; - box-sizing:border-box; - width:100%; - } -#follows_me - { - display:table-cell; - box-sizing:border-box; - padding-right:20px; - text-align:right; - vertical-align:middle; - } -#follow_usr - { - display:table-cell; - height:60px; - box-sizing:border-box; - padding-left:20px; - text-align:left; - vertical-align:middle; - } -.FOLLOW_BOX - { - display:table-cell; - width:140px; - text-align:center; - vertical-align:middle; - } -.FOLLOW_NUM - { - color:#404040; - font-size:30pt; - font-weight:bold; - opacity:0.5; - } -.FOLLOW_NUM_B - { - color:#404040; - font-size:30pt; - font-weight:bold; - } -.FOLLOW_USR_PHOTO - { - box-sizing:border-box; - width:72px; - height:90px; - text-align:left; - vertical-align:bottom; - } -.FOLLOW_USR_NAME - { - box-sizing:border-box; - min-width:106px; - height:90px; - text-align:left; - vertical-align:bottom; - } -.FOLLOW_USR_ICO - { - padding:4px; - } - -.CON {color:#B8D070; font-size:11pt; line-height:110%; white-space:nowrap;} -.CON_CRS {color:#398000; font-size:11pt; line-height:110%; white-space:nowrap;} - -/*************************** Indicators about courses ************************/ -.INDICATORS td,.INDICATORS th - { - border:1px solid silver; - border-collapse:collapse; - padding:1px; - } -.INDICATORS th - { - color:#4D88A1; - font-size:12pt; - font-weight:bold; - } - -/********************* Used to align buttons in account forms ****************/ -.FORM_ACCOUNT - { - display:inline-block; - box-sizing:border-box; - min-width:312px; - } - -/************* Forms to edit institution, centre, degree, course *************/ -.CODE - { - min-width:60px; - text-align:right; - vertical-align:middle; - } -.INPUT_INS_CODE - { - width:90px; - } -.INPUT_SHORT_NAME - { - width:90px; - } -.INPUT_FULL_NAME - { - width:180px; - } -.INPUT_WWW - { - width:90px; - } -.STATUS - { - min-width:90px; - text-align:left; - vertical-align:middle; - } -.INPUT_STATUS - { - width:80px; - } -.INPUT_REQUESTER - { - width:90px; - } - -/********************************* Page foot *********************************/ -@media only screen and (max-width: 899px) - { /* For mobile-phones */ - #foot_zone, #about_zone - { - display:none; - } - } -@media only screen and (min-width: 900px) - { /* For tablets and desktop */ - #foot_zone - { - padding:20px; - } - #about_zone - { - padding:20px; - text-align:center; - } - } -.FOOT_LIST_CONTAINER - { - position:relative; - float:left; - text-align:left; - padding-bottom:20px; - background:white; - } -.FOOT_LIST_TITLE - { - color:#666; - font-size:14pt; - font-weight:bold; - white-space:nowrap; - } -.FOOT_LIST - { - box-sizing:border-box; - list-style-type:none; - margin:0; - padding:0; - border-width:0; - font-size:12pt; - white-space:nowrap; - line-height:140%; - } -.FOOT_LINK - { - color:#2C90C9; - } -.ABOUT - { - color:#A0A0A0; - font-size:12pt; - } - -/************** Something that does not take up space and is not shown *******/ -.NOT_SHOWN - { - display:none; - } - -/************ Something that takes up space but which is invisible ***********/ -.HIDDEN - { - visibility:hidden; - } diff --git a/swad_centre.c b/swad_centre.c index 7b6877947..b457abfea 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -37,6 +37,7 @@ #include "swad_database.h" #include "swad_global.h" #include "swad_help.h" +#include "swad_hierarchy.h" #include "swad_institution.h" #include "swad_logo.h" #include "swad_parameter.h" @@ -721,7 +722,7 @@ void Ctr_ShowCtrsOfCurrentIns (void) Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod); /***** Write menu to select country and institution *****/ - Deg_WriteMenuAllCourses (); + Hie_WriteMenuAllCourses (); /***** List centres *****/ Ctr_ListCentres (); @@ -1764,7 +1765,7 @@ void Ctr_ChangeCtrInsInConfig (void) Gbl.CurrentIns.Ins.InsCod = NewIns.InsCod; /***** Initialize again current course, degree, centre... *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /***** Write message to show the change made *****/ sprintf (Gbl.Message,Txt_The_centre_X_has_been_moved_to_the_institution_Y, diff --git a/swad_changelog.h b/swad_changelog.h index dc3a973e9..e54d2af02 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -157,13 +157,17 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.59.3 (2016-11-14)" -#define CSS_FILE "swad16.59.css" +#define Log_PLATFORM_VERSION "SWAD 16.61 (2016-11-14)" +#define CSS_FILE "swad16.60.1.css" #define JS_FILE "swad16.46.1.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.61: Nov 14, 2016 New module swad_hierarchy. (207159 lines) + Version 16.60.1: Nov 14, 2016 Changes in layout of file browser. (207096 lines) + Version 16.60: Nov 14, 2016 Code refactoring in file browser. + Fixed bug in assigments, reported by Javier Fernández Baldomero. (207101 lines) Version 16.59.3: Nov 14, 2016 Code refactoring in file browser. (207072 lines) Version 16.59.2: Nov 14, 2016 Fix bug in user's usage report. (207077 lines) Version 16.59.1: Nov 14, 2016 Fix bug in deletion of a notice, reported by Javier Fernández Baldomero and others. (207076 lines) diff --git a/swad_course.c b/swad_course.c index c57f43274..01f98720a 100644 --- a/swad_course.c +++ b/swad_course.c @@ -39,6 +39,7 @@ #include "swad_exam.h" #include "swad_global.h" #include "swad_help.h" +#include "swad_hierarchy.h" #include "swad_indicator.h" #include "swad_logo.h" #include "swad_notification.h" @@ -970,7 +971,7 @@ void Crs_ShowCrssOfCurrentDeg (void) Crs_GetListCoursesInDegree (Crs_ALL_COURSES_EXCEPT_REMOVED); /***** Write menu to select country, institution, centre and degree *****/ - Deg_WriteMenuAllCourses (); + Hie_WriteMenuAllCourses (); /***** Show list of courses *****/ Crs_ListCourses (); @@ -2444,7 +2445,7 @@ void Crs_ChangeCrsDegInConfig (void) Gbl.CurrentDeg.Deg.DegCod = NewDeg.DegCod; /***** Initialize again current course, degree, centre... *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /***** Create message to show the change made *****/ sprintf (Gbl.Message,Txt_The_course_X_has_been_moved_to_the_degree_Y, diff --git a/swad_degree.c b/swad_degree.c index a8c3191c1..c57aa1fe9 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -41,6 +41,7 @@ #include "swad_exam.h" #include "swad_global.h" #include "swad_help.h" +#include "swad_hierarchy.h" #include "swad_indicator.h" #include "swad_info.h" #include "swad_logo.h" @@ -77,9 +78,6 @@ typedef enum /**************************** Private constants ******************************/ /*****************************************************************************/ -#define Deg_MAX_LENGTH_SHORT_NAME_DEGREE_ON_PAGE_HEAD 20 // Adjust depending on the size of the style used for the degree on the page head -#define Deg_MAX_LENGTH_SHORT_NAME_COURSE_ON_PAGE_HEAD 20 // Adjust depending on the size of the style used for the degree on the page head - /*****************************************************************************/ /**************************** Private prototypes *****************************/ /*****************************************************************************/ @@ -87,8 +85,6 @@ typedef enum static void Deg_Configuration (bool PrintView); static void Deg_PutIconsToPrintAndUpload (void); -static void Deg_WriteSelectorOfDegree (void); - static void Deg_ListDegreesForEdition (void); static bool Deg_CheckIfICanEditADegree (struct Degree *Deg); static Deg_StatusTxt_t Deg_GetStatusTxtFromStatusBits (Deg_Status_t Status); @@ -584,104 +580,11 @@ static void Deg_PutIconsToPrintAndUpload (void) Log_PutIconToChangeLogo (Sco_SCOPE_DEG); } -/*****************************************************************************/ -/*** Write menu to select country, institution, centre, degree and course ****/ -/*****************************************************************************/ - -void Deg_WriteMenuAllCourses (void) - { - extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Country; - extern const char *Txt_Institution; - extern const char *Txt_Centre; - extern const char *Txt_Degree; - extern const char *Txt_Course; - - /***** Start of table *****/ - fprintf (Gbl.F.Out,""); - - /***** Write a 1st selector - with all the countries *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); - - if (Gbl.CurrentCty.Cty.CtyCod > 0) - { - /***** Write a 2nd selector - with the institutions of selected country *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); - - if (Gbl.CurrentIns.Ins.InsCod > 0) - { - /***** Write a 3rd selector - with all the centres of selected institution *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); - - if (Gbl.CurrentCtr.Ctr.CtrCod > 0) - { - /***** Write a 4th selector - with all the degrees of selected centre *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); - - if (Gbl.CurrentDeg.Deg.DegCod > 0) - { - /***** Write a 5th selector - with all the courses of selected degree *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); - } - } - } - } - - /***** End of table *****/ - fprintf (Gbl.F.Out,"
" - "%s:" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_Country); - Cty_WriteSelectorOfCountry (); - fprintf (Gbl.F.Out,"
" - "%s:" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_Institution); - Ins_WriteSelectorOfInstitution (); - fprintf (Gbl.F.Out,"
" - "%s:" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_Centre); - Ctr_WriteSelectorOfCentre (); - fprintf (Gbl.F.Out,"
" - "%s:" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_Degree); - Deg_WriteSelectorOfDegree (); - fprintf (Gbl.F.Out,"
" - "%s:" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_Course); - Crs_WriteSelectorOfCourse (); - fprintf (Gbl.F.Out,"
"); - } - /*****************************************************************************/ /*************************** Write selector of degree ************************/ /*****************************************************************************/ -static void Deg_WriteSelectorOfDegree (void) +void Deg_WriteSelectorOfDegree (void) { extern const char *Txt_Degree; char Query[512]; @@ -743,341 +646,6 @@ static void Deg_WriteSelectorOfDegree (void) Act_FormEnd (); } -/*****************************************************************************/ -/************* Write hierarchy breadcrumb in the top of the page *************/ -/*****************************************************************************/ - -void Deg_WriteHierarchyBreadcrumb (void) - { - extern const char *The_ClassBreadcrumb[The_NUM_THEMES]; - extern const char *Txt_System; - extern const char *Txt_Country; - extern const char *Txt_Institution; - extern const char *Txt_Centre; - extern const char *Txt_Degree; - char DegreeShortName[Deg_MAX_LENGTH_DEGREE_FULL_NAME+1]; // Full name of degree - char ClassOn[64]; - char ClassSemiOff[64]; - char ClassOff[64]; - - /***** CSS classes *****/ - strcpy (ClassOn,The_ClassBreadcrumb[Gbl.Prefs.Theme]); - sprintf (ClassSemiOff,"BC_SEMIOFF %s",The_ClassBreadcrumb[Gbl.Prefs.Theme]); - sprintf (ClassOff,"BC_OFF %s",The_ClassBreadcrumb[Gbl.Prefs.Theme]); - - /***** Form to go to the system *****/ - Act_FormGoToStart (ActMnu); - Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) TabSys); - Act_LinkFormSubmit (Txt_System,ClassOn,NULL); - fprintf (Gbl.F.Out,"%s",Txt_System); - Act_FormEnd (); - - if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected... - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassOn); - - /***** Form to go to see institutions of this country *****/ - Act_FormGoToStart (ActSeeIns); - Cty_PutParamCtyCod (Gbl.CurrentCty.Cty.CtyCod); - Act_LinkFormSubmit (Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language],ClassOn,NULL); - fprintf (Gbl.F.Out,"%s", - Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); - Act_FormEnd (); - } - else - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassSemiOff); - - /***** Form to go to select countries *****/ - Act_FormGoToStart (ActSeeCty); - Act_LinkFormSubmit (Txt_Country,ClassSemiOff,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Country); - Act_FormEnd (); - } - - if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected... - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassOn); - - /***** Form to see centres of this institution *****/ - Act_FormGoToStart (ActSeeCtr); - Ins_PutParamInsCod (Gbl.CurrentIns.Ins.InsCod); - Act_LinkFormSubmit (Gbl.CurrentIns.Ins.FullName,ClassOn,NULL); - fprintf (Gbl.F.Out,"%s", - Gbl.CurrentIns.Ins.ShrtName); - Act_FormEnd (); - } - else if (Gbl.CurrentCty.Cty.CtyCod > 0) - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassSemiOff); - - /***** Form to go to select institutions *****/ - Act_FormGoToStart (ActSeeIns); - Act_LinkFormSubmit (Txt_Institution,ClassSemiOff,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Institution); - Act_FormEnd (); - } - else - /***** Separator and hidden institution *****/ - fprintf (Gbl.F.Out," > %s", - ClassOff,Txt_Institution); - - if (Gbl.CurrentCtr.Ctr.CtrCod > 0) // Centre selected... - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassOn); - - /***** Form to see degrees of this centre *****/ - Act_FormGoToStart (ActSeeDeg); - Ctr_PutParamCtrCod (Gbl.CurrentCtr.Ctr.CtrCod); - Act_LinkFormSubmit (Gbl.CurrentCtr.Ctr.FullName,ClassOn,NULL); - fprintf (Gbl.F.Out,"%s", - Gbl.CurrentCtr.Ctr.ShrtName); - Act_FormEnd (); - } - else if (Gbl.CurrentIns.Ins.InsCod > 0) - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassSemiOff); - - /***** Form to go to select centres *****/ - Act_FormGoToStart (ActSeeCtr); - Act_LinkFormSubmit (Txt_Centre,ClassSemiOff,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Centre); - Act_FormEnd (); - } - else - /***** Separator and hidden centre *****/ - fprintf (Gbl.F.Out," > %s", - ClassOff,Txt_Centre); - - if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected... - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassOn); - - /***** Form to go to see courses of this degree *****/ - Act_FormGoToStart (ActSeeCrs); - Deg_PutParamDegCod (Gbl.CurrentDeg.Deg.DegCod); - Act_LinkFormSubmit (Gbl.CurrentDeg.Deg.FullName,ClassOn,NULL); - strcpy (DegreeShortName,Gbl.CurrentDeg.Deg.ShrtName); - Str_LimitLengthHTMLStr (DegreeShortName, - Deg_MAX_LENGTH_SHORT_NAME_DEGREE_ON_PAGE_HEAD); - fprintf (Gbl.F.Out,"%s", - DegreeShortName); - Act_FormEnd (); - } - else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) - { - /***** Separator *****/ - fprintf (Gbl.F.Out," > ",ClassSemiOff); - - /***** Form to go to select degrees *****/ - Act_FormGoToStart (ActSeeDeg); - Act_LinkFormSubmit (Txt_Degree,ClassSemiOff,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Degree); - Act_FormEnd (); - } - else - /***** Separator and hidden degree *****/ - fprintf (Gbl.F.Out," > %s", - ClassOff,Txt_Degree); - - /***** Separator *****/ - fprintf (Gbl.F.Out," > ", - (Gbl.CurrentCrs.Crs.CrsCod > 0) ? ClassOn : - ((Gbl.CurrentDeg.Deg.DegCod > 0) ? ClassSemiOff : - ClassOff)); - } - -/*****************************************************************************/ -/*************** Write course full name in the top of the page ***************/ -/*****************************************************************************/ - -void Deg_WriteBigNameCtyInsCtrDegCrs (void) - { - extern const char *The_ClassCourse[The_NUM_THEMES]; - extern const char *Txt_TAGLINE; - - fprintf (Gbl.F.Out,"

", - The_ClassCourse[Gbl.Prefs.Theme]); - - /***** Logo *****/ - if (Gbl.CurrentCrs.Crs.CrsCod > 0 || - Gbl.CurrentDeg.Deg.DegCod > 0) - Log_DrawLogo (Sco_SCOPE_DEG,Gbl.CurrentDeg.Deg.DegCod, - Gbl.CurrentDeg.Deg.ShrtName,40,"TOP_LOGO",false); - else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) - Log_DrawLogo (Sco_SCOPE_CTR,Gbl.CurrentCtr.Ctr.CtrCod, - Gbl.CurrentCtr.Ctr.ShrtName,40,"TOP_LOGO",false); - else if (Gbl.CurrentIns.Ins.InsCod > 0) - Log_DrawLogo (Sco_SCOPE_INS,Gbl.CurrentIns.Ins.InsCod, - Gbl.CurrentIns.Ins.ShrtName,40,"TOP_LOGO",false); - else if (Gbl.CurrentCty.Cty.CtyCod > 0) - Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE"); - else - fprintf (Gbl.F.Out,"\"%s\"", - Gbl.Prefs.IconsURL,Cfg_PLATFORM_LOGO_SMALL_FILENAME, - Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME); - - /***** Text *****/ - fprintf (Gbl.F.Out,"
"); - if (Gbl.CurrentCty.Cty.CtyCod > 0) - fprintf (Gbl.F.Out,"
" - "%s" // Full name - "
" - "
" - " / " // To separate - "
" - "
" - "%s" // Short name - "
", - (Gbl.CurrentCrs.Crs.CrsCod > 0) ? Gbl.CurrentCrs.Crs.FullName : - ((Gbl.CurrentDeg.Deg.DegCod > 0) ? Gbl.CurrentDeg.Deg.FullName : - ((Gbl.CurrentCtr.Ctr.CtrCod > 0) ? Gbl.CurrentCtr.Ctr.FullName : - ((Gbl.CurrentIns.Ins.InsCod > 0) ? Gbl.CurrentIns.Ins.FullName : - Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]))), - (Gbl.CurrentCrs.Crs.CrsCod > 0) ? Gbl.CurrentCrs.Crs.ShrtName : - ((Gbl.CurrentDeg.Deg.DegCod > 0) ? Gbl.CurrentDeg.Deg.ShrtName : - ((Gbl.CurrentCtr.Ctr.CtrCod > 0) ? Gbl.CurrentCtr.Ctr.ShrtName : - ((Gbl.CurrentIns.Ins.InsCod > 0) ? Gbl.CurrentIns.Ins.ShrtName : - Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language])))); - else // No country specified ==> home page - fprintf (Gbl.F.Out,"
" - "%s: %s" // Full name - "
" - "
" - " / " // To separate - "
" - "
" - "%s" // Short name - "
", - Cfg_PLATFORM_SHORT_NAME,Txt_TAGLINE, - Cfg_PLATFORM_SHORT_NAME); - fprintf (Gbl.F.Out,"
" - "

"); - } - -/*****************************************************************************/ -/**************** Initialize values related to current course ****************/ -/*****************************************************************************/ - -void Deg_InitCurrentCourse (void) - { - /***** If numerical course code is available, get course data *****/ - if (Gbl.CurrentCrs.Crs.CrsCod > 0) - { - if (Crs_GetDataOfCourseByCod (&Gbl.CurrentCrs.Crs)) // Course found - Gbl.CurrentDeg.Deg.DegCod = Gbl.CurrentCrs.Crs.DegCod; - else - { - Gbl.CurrentIns.Ins.InsCod = - Gbl.CurrentCtr.Ctr.CtrCod = - Gbl.CurrentDeg.Deg.DegCod = - Gbl.CurrentCrs.Crs.CrsCod = -1L; - } - } - - /***** If numerical degree code is available, get degree data *****/ - if (Gbl.CurrentDeg.Deg.DegCod > 0) - { - if (Deg_GetDataOfDegreeByCod (&Gbl.CurrentDeg.Deg)) // Degree found - { - Gbl.CurrentCtr.Ctr.CtrCod = Gbl.CurrentDeg.Deg.CtrCod; - Gbl.CurrentDegTyp.DegTyp.DegTypCod = Gbl.CurrentDeg.Deg.DegTypCod; - Gbl.CurrentIns.Ins.InsCod = Deg_GetInsCodOfDegreeByCod (Gbl.CurrentDeg.Deg.DegCod); - - /***** Degree type is available, so get degree type data *****/ - if (!DT_GetDataOfDegreeTypeByCod (&Gbl.CurrentDegTyp.DegTyp)) // Degree type not found - { - Gbl.CurrentIns.Ins.InsCod = - Gbl.CurrentCtr.Ctr.CtrCod = - Gbl.CurrentDeg.Deg.DegTypCod = - Gbl.CurrentDeg.Deg.DegCod = - Gbl.CurrentCrs.Crs.CrsCod = -1L; - } - } - else - { - Gbl.CurrentIns.Ins.InsCod = - Gbl.CurrentCtr.Ctr.CtrCod = - Gbl.CurrentDeg.Deg.DegCod = - Gbl.CurrentCrs.Crs.CrsCod = -1L; - } - } - - /***** If centre code is available, get centre data *****/ - if (Gbl.CurrentCtr.Ctr.CtrCod > 0) - { - if (Ctr_GetDataOfCentreByCod (&Gbl.CurrentCtr.Ctr)) // Centre found - Gbl.CurrentIns.Ins.InsCod = Gbl.CurrentCtr.Ctr.InsCod; - else - Gbl.CurrentCtr.Ctr.CtrCod = -1L; - } - - /***** If numerical institution code is available, get institution data *****/ - if (Gbl.CurrentIns.Ins.InsCod > 0) - { - if (Ins_GetDataOfInstitutionByCod (&Gbl.CurrentIns.Ins,Ins_GET_BASIC_DATA)) // Institution found - Gbl.CurrentCty.Cty.CtyCod = Gbl.CurrentIns.Ins.CtyCod; - else - { - Gbl.CurrentCty.Cty.CtyCod = - Gbl.CurrentIns.Ins.InsCod = - Gbl.CurrentCtr.Ctr.CtrCod = - Gbl.CurrentDeg.Deg.DegCod = - Gbl.CurrentCrs.Crs.CrsCod = -1L; - } - } - - /***** If numerical country code is available, get country data *****/ - if (Gbl.CurrentCty.Cty.CtyCod > 0) - { - if (!Cty_GetDataOfCountryByCod (&Gbl.CurrentCty.Cty,Cty_GET_BASIC_DATA)) // Country not found - { - Gbl.CurrentCty.Cty.CtyCod = - Gbl.CurrentIns.Ins.InsCod = - Gbl.CurrentCtr.Ctr.CtrCod = - Gbl.CurrentDeg.Deg.DegCod = - Gbl.CurrentCrs.Crs.CrsCod = -1L; - } - } - - /***** Initialize default fields for edition to current values *****/ - Gbl.Inss.EditingIns.CtyCod = Gbl.CurrentCty.Cty.CtyCod; - Gbl.Ctrs.EditingCtr.InsCod = - Gbl.Dpts.EditingDpt.InsCod = Gbl.CurrentIns.Ins.InsCod; - Gbl.Degs.EditingDeg.CtrCod = Gbl.CurrentCtr.Ctr.CtrCod; - Gbl.Degs.EditingDeg.DegTypCod = Gbl.CurrentDegTyp.DegTyp.DegTypCod; - - /***** Initialize paths *****/ - if (Gbl.CurrentCrs.Crs.CrsCod > 0) - { - /***** Paths of course directories *****/ - sprintf (Gbl.CurrentCrs.PathPriv,"%s/%s/%ld", - Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod); - sprintf (Gbl.CurrentCrs.PathRelPubl,"%s/%s/%ld", - Cfg_PATH_SWAD_PUBLIC ,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod); - sprintf (Gbl.CurrentCrs.PathURLPubl,"%s/%s/%ld", - Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod); - - /***** If any of the course directories does not exist, create it *****/ - if (!Fil_CheckIfPathExists (Gbl.CurrentCrs.PathPriv)) - Fil_CreateDirIfNotExists (Gbl.CurrentCrs.PathPriv); - if (!Fil_CheckIfPathExists (Gbl.CurrentCrs.PathRelPubl)) - Fil_CreateDirIfNotExists (Gbl.CurrentCrs.PathRelPubl); - - /***** Count number of groups in current course (used only in some actions) *****/ - Gbl.CurrentCrs.Grps.NumGrps = Grp_CountNumGrpsInCurrentCrs (); - } - } - /*****************************************************************************/ /************* Show the degrees belonging to the current centre **************/ /*****************************************************************************/ @@ -1091,7 +659,7 @@ void Deg_ShowDegsOfCurrentCtr (void) Deg_GetListDegsOfCurrentCtr (); /***** Write menu to select country, institution and centre *****/ - Deg_WriteMenuAllCourses (); + Hie_WriteMenuAllCourses (); /***** Show list of degrees *****/ Deg_ListDegrees (); @@ -2512,7 +2080,7 @@ void Deg_ChangeDegCtrInConfig (void) Gbl.CurrentCtr.Ctr.CtrCod = NewCtr.CtrCod; /***** Initialize again current course, degree, centre... *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /***** Create message to show the change made *****/ sprintf (Gbl.Message,Txt_The_degree_X_has_been_moved_to_the_centre_Y, @@ -2858,7 +2426,7 @@ unsigned Deg_GetNumDegsWithUsrs (Rol_Role_t Role,const char *SubQuery) /***** Write institutions, centres and degrees administrated by an admin *****/ /*****************************************************************************/ -void Deg_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) +void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) { extern const char *Sco_ScopeDB[Sco_NUM_SCOPES]; extern const char *Txt_all_degrees; diff --git a/swad_degree.h b/swad_degree.h index 88a788eb5..e2cd5fa49 100644 --- a/swad_degree.h +++ b/swad_degree.h @@ -98,10 +98,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Degree *Deg,Act_Action_t Action, void Deg_ShowConfiguration (void); void Deg_PrintConfiguration (void); -void Deg_WriteMenuAllCourses (void); -void Deg_WriteHierarchyBreadcrumb (void); -void Deg_WriteBigNameCtyInsCtrDegCrs (void); -void Deg_InitCurrentCourse (void); +void Deg_WriteSelectorOfDegree (void); void Deg_ShowDegsOfCurrentCtr (void); @@ -149,8 +146,6 @@ unsigned Deg_GetNumDegsInCtr (long CtrCod); unsigned Deg_GetNumDegsWithCrss (const char *SubQuery); unsigned Deg_GetNumDegsWithUsrs (Rol_Role_t Role,const char *SubQuery); -void Deg_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan); - unsigned Deg_ListDegsFound (const char *Query); #endif diff --git a/swad_file_browser.c b/swad_file_browser.c index 6a840f6e1..0466e5f3d 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -1476,26 +1476,21 @@ static long Brw_GetGrpLastAccZone (const char *FieldNameDB); static void Brw_ResetFileBrowserSize (void); static void Brw_CalcSizeOfDirRecursive (unsigned Level,char *Path); static void Brw_ListDir (unsigned Level,const char *Path,const char *PathInTree); -static bool Brw_WriteRowFileBrowser (unsigned Level, - Brw_FileType_t FileType,Brw_ExpandTree_t ExpandTree, +static bool Brw_WriteRowFileBrowser (unsigned Level,Brw_ExpandTree_t ExpandTree, const char *PathInTree,const char *FileName); -static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType, +static void Brw_PutIconsRemoveCopyPaste (unsigned Level, const char *PathInTree,const char *FileName,const char *FileNameToShow); static bool Brw_CheckIfCanPasteIn (unsigned Level); -static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow); +static void Brw_PutIconRemoveFile (const char *PathInTree,const char *FileName,const char *FileNameToShow); static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName,const char *FileNameToShow); -static void Brw_PutIconCopy (Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameShow); +static void Brw_PutIconCopy (const char *PathInTree,const char *FileName,const char *FileNameShow); static void Brw_PutIconPasteOn (const char *PathInTree,const char *FileName,const char *FileNameToShow); static void Brw_PutIconPasteOff (void); static void Brw_IndentAndWriteIconExpandContract (unsigned Level,Brw_ExpandTree_t ExpandTree, const char *PathInTree,const char *FileName,const char *FileNameToShow); static void Brw_IndentDependingOnLevel (unsigned Level); -static void Brw_PutIconShow (unsigned Level,Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow); -static void Brw_PutIconHide (unsigned Level,Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow); +static void Brw_PutIconShow (unsigned Level,const char *PathInTree,const char *FileName,const char *FileNameToShow); +static void Brw_PutIconHide (unsigned Level,const char *PathInTree,const char *FileName,const char *FileNameToShow); static bool Brw_CheckIfAnyUpperLevelIsHidden (unsigned CurrentLevel); static void Brw_PutIconFolder (unsigned Level,Brw_ExpandTree_t ExpandTree, const char *PathInTree,const char *FileName,const char *FileNameToShow); @@ -1504,13 +1499,14 @@ static void Brw_PutIconFileWithLinkToViewMetadata (unsigned Size, struct FileMetadata *FileMetadata, const char *FileNameToShow); static void Brw_PutIconFile (unsigned Size,Brw_FileType_t FileType,const char *FileName); -static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileType, +static void Brw_WriteFileName (unsigned Level,bool IsPublic, const char *PathInTree,const char *FileName,const char *FileNameToShow); -static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level,Brw_FileType_t FileType, +static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level, + Brw_FileType_t FileType, const char *FileName,char *FileNameToShow); static void Brw_LimitLengthFileNameToShow (Brw_FileType_t FileType,const char *FileName,char *FileNameToShow); static void Brw_WriteDatesAssignment (void); -static void Brw_WriteFileSizeAndDate (Brw_FileType_t FileType,struct FileMetadata *FileMetadata); +static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata); static void Brw_WriteFileOrFolderPublisher (unsigned Level,unsigned long UsrCod); static void Brw_AskConfirmRemoveFolderNotEmpty (void); @@ -1518,8 +1514,8 @@ static inline void Brw_GetAndWriteClipboard (void); static void Brw_WriteCurrentClipboard (void); static bool Brw_GetMyClipboard (void); static bool Brw_CheckIfClipboardIsInThisTree (void); -static void Brw_AddPathToClipboards (Brw_FileType_t FileType,const char *Path); -static void Brw_UpdatePathInClipboard (Brw_FileType_t FileType,const char *Path); +static void Brw_AddPathToClipboards (void); +static void Brw_UpdatePathInClipboard (void); static long Brw_GetCodForClipboard (void); static long Brw_GetWorksUsrCodForClipboard (void); @@ -3370,22 +3366,22 @@ static void Brw_GetSelectedGroupData (struct GroupData *GrpDat,bool AbortOnError static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) { - extern const char *Txt_Write_a_message_to_X; + extern const char *Txt_View_record_for_this_course; bool ShowPhoto; char PhotoURL[PATH_MAX+1]; /***** Show user's photo *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, - "PHOTO93x124",Pho_ZOOM,false); + "PHOTO60x80",Pho_ZOOM,false); fprintf (Gbl.F.Out,""); /***** Start form to send a message to this user *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActSeeRecOneStd : - ActSeeRecOneTch); + ActSeeRecOneTch); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); /***** Show user's ID *****/ @@ -3393,9 +3389,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) /***** Show user's name *****/ fprintf (Gbl.F.Out,"
"); - sprintf (Gbl.Title,Txt_Write_a_message_to_X, - UsrDat->FullName); - Act_LinkFormSubmit (Gbl.Title,"MSG_AUT",NULL); + Act_LinkFormSubmit (Txt_View_record_for_this_course,"MSG_AUT",NULL); fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); @@ -3407,7 +3401,8 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) if (UsrDat->Email[0]) { fprintf (Gbl.F.Out,"
" - "", + "", UsrDat->Email); Str_LimitLengthHTMLStr (UsrDat->Email,25); fprintf (Gbl.F.Out,"%s",UsrDat->Email); @@ -3641,7 +3636,8 @@ static void Brw_ShowFileBrowser (void) /***** List recursively the directory *****/ fprintf (Gbl.F.Out,""); Brw_SetFullPathInTree (Brw_RootFolderInternalNames[Gbl.FileBrowser.Type],"."); - if (Brw_WriteRowFileBrowser (0,Brw_IS_FOLDER,Brw_EXPAND_TREE_NOTHING,Brw_RootFolderInternalNames[Gbl.FileBrowser.Type],".")) + Gbl.FileBrowser.FileType = Brw_IS_FOLDER; + if (Brw_WriteRowFileBrowser (0,Brw_EXPAND_TREE_NOTHING,Brw_RootFolderInternalNames[Gbl.FileBrowser.Type],".")) Brw_ListDir (1,Gbl.FileBrowser.Priv.PathRootFolder,Brw_RootFolderInternalNames[Gbl.FileBrowser.Type]); fprintf (Gbl.F.Out,"
"); @@ -5044,7 +5040,8 @@ static void Brw_ListDir (unsigned Level,const char *Path,const char *PathInTree) } /***** Write a row for the subdirectory *****/ - if (Brw_WriteRowFileBrowser (Level,Brw_IS_FOLDER,ExpandTree,PathInTree,FileList[NumFile]->d_name)) + Gbl.FileBrowser.FileType = Brw_IS_FOLDER; + if (Brw_WriteRowFileBrowser (Level,ExpandTree,PathInTree,FileList[NumFile]->d_name)) if (ExpandTree == Brw_EXPAND_TREE_MINUS || ExpandTree == Brw_EXPAND_TREE_NOTHING) if (Level < Brw_MAX_DIR_LEVELS) @@ -5052,10 +5049,11 @@ static void Brw_ListDir (unsigned Level,const char *Path,const char *PathInTree) Brw_ListDir (Level + 1,PathFileRel,PathFileInExplTree); } else if (S_ISREG (FileStatus.st_mode)) // It's a regular file - Brw_WriteRowFileBrowser (Level, - Str_FileIs (FileList[NumFile]->d_name,"url") ? Brw_IS_LINK : - Brw_IS_FILE, - Brw_EXPAND_TREE_NOTHING,PathInTree,FileList[NumFile]->d_name); + { + Gbl.FileBrowser.FileType = Str_FileIs (FileList[NumFile]->d_name,"url") ? Brw_IS_LINK : + Brw_IS_FILE; + Brw_WriteRowFileBrowser (Level,Brw_EXPAND_TREE_NOTHING,PathInTree,FileList[NumFile]->d_name); + } } free ((void *) FileList[NumFile]); } @@ -5072,8 +5070,7 @@ static void Brw_ListDir (unsigned Level,const char *Path,const char *PathInTree) // If it is not the first row, it is shown or not depending on whether it is hidden or not // If the row is visible, return true. If it is hidden, return false -static bool Brw_WriteRowFileBrowser (unsigned Level, - Brw_FileType_t FileType,Brw_ExpandTree_t ExpandTree, +static bool Brw_WriteRowFileBrowser (unsigned Level,Brw_ExpandTree_t ExpandTree, const char *PathInTree,const char *FileName) { bool RowSetAsHidden = false; @@ -5110,7 +5107,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, if (SeeDocsZone || AdminDocsZone || SeeMarks || AdminMarks) { - RowSetAsHidden = Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (FileType, + RowSetAsHidden = Brw_CheckIfFileOrFolderIsSetAsHiddenInDB (Gbl.FileBrowser.FileType, Gbl.FileBrowser.Priv.FullPathInTree); if (RowSetAsHidden && Level && (SeeDocsZone || SeeMarks)) return false; @@ -5118,13 +5115,13 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, { if (RowSetAsHidden) // this row is marked as hidden { - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) Gbl.FileBrowser.HiddenLevels[Level] = true; LightStyle = true; } else // this row is not marked as hidden { - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) Gbl.FileBrowser.HiddenLevels[Level] = false; LightStyle = Brw_CheckIfAnyUpperLevelIsHidden (Level); } @@ -5142,8 +5139,8 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, /***** Is this row public or private? *****/ if (SeeDocsZone || AdminDocsZone || SharedZone) { - RowSetAsPublic = (FileType == Brw_IS_FOLDER) ? Brw_GetIfFolderHasPublicFiles (Gbl.FileBrowser.Priv.FullPathInTree) : - FileMetadata.IsPublic; + RowSetAsPublic = (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) ? Brw_GetIfFolderHasPublicFiles (Gbl.FileBrowser.Priv.FullPathInTree) : + FileMetadata.IsPublic; if (Gbl.FileBrowser.ShowOnlyPublicFiles && !RowSetAsPublic) return false; } @@ -5154,28 +5151,34 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, IsRecent = true; /* Style of the text in this row */ - Gbl.FileBrowser.TxtStyle = (LightStyle ? (FileType == Brw_IS_FOLDER || !IsRecent ? "LST_HID" : - "LST_REC_HID") : - (FileType == Brw_IS_FOLDER || !IsRecent ? "LST" : - "LST_REC")); - Gbl.FileBrowser.InputStyle = (LightStyle ? (FileType == Brw_IS_FOLDER || !IsRecent ? "LST_EDIT_HID" : - "LST_EDIT_REC_HID") : - (FileType == Brw_IS_FOLDER || !IsRecent ? "LST_EDIT" : - "LST_EDIT_REC")); + Gbl.FileBrowser.TxtStyle = (LightStyle ? (Gbl.FileBrowser.FileType == Brw_IS_FOLDER || !IsRecent ? "LST_HID" : + "LST_REC_HID") : + (Gbl.FileBrowser.FileType == Brw_IS_FOLDER || !IsRecent ? "LST" : + "LST_REC")); + Gbl.FileBrowser.InputStyle = (LightStyle ? (Gbl.FileBrowser.FileType == Brw_IS_FOLDER || !IsRecent ? "LST_EDIT_HID" : + "LST_EDIT_REC_HID") : + (Gbl.FileBrowser.FileType == Brw_IS_FOLDER || !IsRecent ? "LST_EDIT" : + "LST_EDIT_REC")); /***** Get data of assignment using the name of the folder *****/ - if (AssignmentsZone && Level == 1) + if (AssignmentsZone) { - strncpy (Gbl.FileBrowser.Asg.Folder,FileName,Asg_MAX_LENGTH_FOLDER); - Gbl.FileBrowser.Asg.Folder[Asg_MAX_LENGTH_FOLDER] = '\0'; - Asg_GetDataOfAssignmentByFolder (&Gbl.FileBrowser.Asg); - // The data of this assignment remains in Gbl.FileBrowser.Asg - // for all subsequent rows with Level > 1 (files or folders inside this folder), - // and they are overwritten on the next row with level == 1 (next assignment) + if (Level == 1) // Main folder of the assignment + { + strncpy (Gbl.FileBrowser.Asg.Folder,FileName,Asg_MAX_LENGTH_FOLDER); + Gbl.FileBrowser.Asg.Folder[Asg_MAX_LENGTH_FOLDER] = '\0'; + Asg_GetDataOfAssignmentByFolder (&Gbl.FileBrowser.Asg); + // The data of this assignment remains in Gbl.FileBrowser.Asg + // for all subsequent rows with Level > 1 (files or folders inside this folder), + // and they are overwritten on the next row with level == 1 (next assignment) + } } + else // Not an assignment zone + Gbl.FileBrowser.Asg.AsgCod = -1L; /***** Get the name of the file to show *****/ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Level,FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Level, + Gbl.FileBrowser.FileType, FileName,FileNameToShow); /***** Start this row *****/ @@ -5193,10 +5196,10 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, Gbl.FileBrowser.Clipboard.IsThisFile = true; /* Check if I can modify (remove, rename, etc.) this file or folder */ - Gbl.FileBrowser.ICanEditFileOrFolder = Brw_CheckIfICanEditFileOrFolder (Level); + Gbl.FileBrowser.ICanEditFileOrFolder = Brw_CheckIfICanEditFileOrFolder (Level); /* Put icons to remove, copy and paste */ - Brw_PutIconsRemoveCopyPaste (Level,FileType,PathInTree,FileName,FileNameToShow); + Brw_PutIconsRemoveCopyPaste (Level,PathInTree,FileName,FileNameToShow); } /***** Indentation depending on level, icon, and file/folder name *****/ @@ -5216,15 +5219,13 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, if (AdminDocsZone || AdminMarks) { if (RowSetAsHidden) // this row is marked as hidden - Brw_PutIconShow (Level,FileType, - PathInTree,FileName,FileNameToShow); + Brw_PutIconShow (Level,PathInTree,FileName,FileNameToShow); else // this row is not marked as hidden - Brw_PutIconHide (Level,FileType, - PathInTree,FileName,FileNameToShow); + Brw_PutIconHide (Level,PathInTree,FileName,FileNameToShow); } /***** File or folder icon *****/ - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) /* Icon with folder */ Brw_PutIconFolder (Level,ExpandTree, PathInTree,FileName,FileNameToShow); @@ -5242,7 +5243,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, Brw_PutIconNewFileOrFolder (); /* File or folder name */ - Brw_WriteFileName (Level,FileMetadata.IsPublic,FileType, + Brw_WriteFileName (Level,FileMetadata.IsPublic, PathInTree,FileName,FileNameToShow); /* End of the column */ @@ -5252,16 +5253,16 @@ static bool Brw_WriteRowFileBrowser (unsigned Level, if (AdminMarks) /***** Header and footer rows *****/ - Mrk_GetAndWriteNumRowsHeaderAndFooter (FileType,PathInTree,FileName); + Mrk_GetAndWriteNumRowsHeaderAndFooter (Gbl.FileBrowser.FileType,PathInTree,FileName); if (AssignmentsZone && Level == 1) /***** Start and end dates of assignment *****/ Brw_WriteDatesAssignment (); else /***** File date and size *****/ - Brw_WriteFileSizeAndDate (FileType,&FileMetadata); + Brw_WriteFileSizeAndDate (&FileMetadata); - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) { /***** Put icon to download ZIP of folder *****/ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); @@ -5308,22 +5309,22 @@ void Brw_SetFullPathInTree (const char *PathInTreeUntilFileOrFolder,const char * /****************** Put icons to remove, copy and paste **********************/ /*****************************************************************************/ -static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType, +static void Brw_PutIconsRemoveCopyPaste (unsigned Level, const char *PathInTree,const char *FileName,const char *FileNameToShow) { /***** Icon to remove folder, file or link *****/ - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) /* Icon to remove a folder */ Brw_PutIconRemoveDir (PathInTree,FileName,FileNameToShow); else // File or link /* Icon to remove a file or link */ - Brw_PutIconRemoveFile (FileType,PathInTree,FileName,FileNameToShow); + Brw_PutIconRemoveFile (PathInTree,FileName,FileNameToShow); /***** Icon to copy *****/ - Brw_PutIconCopy (FileType,PathInTree,FileName,FileNameToShow); + Brw_PutIconCopy (PathInTree,FileName,FileNameToShow); /***** Icon to paste *****/ - if (FileType == Brw_IS_FOLDER) + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) { if (Brw_CheckIfCanPasteIn (Level)) /* Icon to paste active */ @@ -5345,19 +5346,25 @@ static bool Brw_CheckIfCanPasteIn (unsigned Level) { char PathDstWithFile[PATH_MAX+1]; - /* If there is nothing in clipboard... */ + /***** If not in a folder... *****/ + if (Gbl.FileBrowser.FileType != Brw_IS_FOLDER) + return false; + + /***** If there is nothing in clipboard... *****/ if (Gbl.FileBrowser.Clipboard.FileBrowser == Brw_UNKNOWN) return false; - /* Do not paste a link in marks... */ + /***** Do not paste a link in marks... *****/ if (Gbl.FileBrowser.Clipboard.FileType == Brw_IS_LINK && (Gbl.FileBrowser.Type == Brw_ADMI_MARKS_CRS || Gbl.FileBrowser.Type == Brw_ADMI_MARKS_GRP)) return false; + /**** If I can not create elements into this folder... *****/ if (!Brw_CheckIfICanCreateIntoFolder (Level)) return false; // Pasting into top level of assignments is forbidden + /**** If we are in the same tree of the clipboard... *****/ if (Gbl.FileBrowser.Clipboard.IsThisTree) // We are in the same tree of the clipboard ==> we can paste or not depending on the subtree { /***** Construct the name of the file or folder destination *****/ @@ -5372,10 +5379,9 @@ static bool Brw_CheckIfCanPasteIn (unsigned Level) /*****************************************************************************/ /******************* Write link e icon to remove a file **********************/ /*****************************************************************************/ -// FileType can be Brw_IS_FILE or Brw_IS_LINK +// Gbl.FileBrowser.FileType can be Brw_IS_FILE or Brw_IS_LINK -static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow) +static void Brw_PutIconRemoveFile (const char *PathInTree,const char *FileName,const char *FileNameToShow) { extern const char *Txt_Remove_FILE_OR_LINK_X; @@ -5401,7 +5407,7 @@ static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, default: break; } - Brw_ParamListFiles (FileType,PathInTree,FileName); + Brw_ParamListFiles (Gbl.FileBrowser.FileType,PathInTree,FileName); sprintf (Gbl.Title,Txt_Remove_FILE_OR_LINK_X,FileNameToShow); fprintf (Gbl.F.Out,"%ld", - Gbl.FileBrowser.Asg.AsgCod); // TODO: Remove this!!!!!!!!!!!!!!! - break; default: break; @@ -6050,7 +6049,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileT default: break; } - Brw_ParamListFiles (FileType,PathInTree,FileName); + Brw_ParamListFiles (Gbl.FileBrowser.FileType,PathInTree,FileName); /* Link to the form and to the file */ sprintf (Gbl.Title,(Gbl.FileBrowser.Type == Brw_SHOW_MARKS_CRS || @@ -6079,7 +6078,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileT /*********************** Which filename must be shown? ***********************/ /*****************************************************************************/ -static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level,Brw_FileType_t FileType, +static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level, + Brw_FileType_t FileType, const char *FileName,char *FileNameToShow) { extern const char *Txt_ROOT_FOLDER_EXTERNAL_NAMES[Brw_NUM_TYPES_FILE_BROWSER]; @@ -6157,9 +6157,7 @@ static void Brw_WriteDatesAssignment (void) UniqueId++; /***** Write start date *****/ - fprintf (Gbl.F.Out,"" - "" - ""); + fprintf (Gbl.F.Out,""); /***** Arrow *****/ - fprintf (Gbl.F.Out,"", + " class=\"ICO20x15\" />", Gbl.Prefs.IconsURL, Gbl.FileBrowser.Asg.Open ? "green" : "red"); /***** Write end date *****/ - fprintf (Gbl.F.Out,"" - "" - "
", + fprintf (Gbl.F.Out,"", UniqueId, Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" : "ASG_LST_DATE_RED"); @@ -6168,20 +6166,18 @@ static void Brw_WriteDatesAssignment (void) "", UniqueId, (long) Gbl.FileBrowser.Asg.TimeUTC[Asg_START_TIME],Txt_Today); - fprintf (Gbl.F.Out,"" - "\"\"" - "", + fprintf (Gbl.F.Out,"", UniqueId, Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" : "ASG_LST_DATE_RED"); @@ -6190,9 +6186,7 @@ static void Brw_WriteDatesAssignment (void) "", UniqueId, (long) Gbl.FileBrowser.Asg.TimeUTC[Asg_END_TIME],Txt_Today); - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,""); } else fprintf (Gbl.F.Out," (%s)", @@ -6204,14 +6198,14 @@ static void Brw_WriteDatesAssignment (void) /****************** Write size and date of a file or folder ******************/ /*****************************************************************************/ -static void Brw_WriteFileSizeAndDate (Brw_FileType_t FileType,struct FileMetadata *FileMetadata) +static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata) { extern const char *Txt_Today; static unsigned UniqueId = 0; char FileSizeStr[Fil_MAX_BYTES_FILE_SIZE_STRING]; /***** Write the file size *****/ - if (FileType == Brw_IS_FILE) + if (Gbl.FileBrowser.FileType == Brw_IS_FILE) Fil_WriteFileSizeBrief ((double) FileMetadata->Size,FileSizeStr); else FileSizeStr[0] = '\0'; @@ -6225,8 +6219,8 @@ static void Brw_WriteFileSizeAndDate (Brw_FileType_t FileType,struct FileMetadat fprintf (Gbl.F.Out,"" " ", Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd); - if (FileType == Brw_IS_FILE || - FileType == Brw_IS_LINK) + if (Gbl.FileBrowser.FileType == Brw_IS_FILE || + Gbl.FileBrowser.FileType == Brw_IS_LINK) { UniqueId++; fprintf (Gbl.F.Out,"" @@ -6324,7 +6318,8 @@ void Brw_AskRemFileFromTree (void) Brw_ParamListFiles (Gbl.FileBrowser.FileType,Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk,Gbl.FileBrowser.FilFolLnkName); /* Show question */ - Brw_GetFileNameToShow (Gbl.FileBrowser.FileType,Gbl.FileBrowser.Level,Gbl.FileBrowser.FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.FileType,Gbl.FileBrowser.Level, + Gbl.FileBrowser.FileType, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X, FileNameToShow); @@ -6568,11 +6563,9 @@ void Brw_CopyFromFileBrowser (void) /***** Put the path in the clipboard *****/ if (Brw_GetMyClipboard ()) - Brw_UpdatePathInClipboard (Gbl.FileBrowser.FileType, - Gbl.FileBrowser.Priv.FullPathInTree); + Brw_UpdatePathInClipboard (); else - Brw_AddPathToClipboards (Gbl.FileBrowser.FileType, - Gbl.FileBrowser.Priv.FullPathInTree); + Brw_AddPathToClipboards (); /***** Show again file browser *****/ Brw_ShowAgainFileBrowserOrWorks (); @@ -6796,7 +6789,8 @@ static void Brw_WriteCurrentClipboard (void) LevelClipboard++; if (LevelClipboard) // Is not the root folder? { - Brw_GetFileNameToShow (Gbl.FileBrowser.Clipboard.FileBrowser,LevelClipboard,Gbl.FileBrowser.Clipboard.FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.Clipboard.FileBrowser,LevelClipboard, + Gbl.FileBrowser.Clipboard.FileType, Gbl.FileBrowser.Clipboard.FileName,FileNameToShow); switch (Gbl.FileBrowser.Clipboard.FileType) { @@ -6961,7 +6955,7 @@ static bool Brw_CheckIfClipboardIsInThisTree (void) /***************************** Add path to clipboards ************************/ /*****************************************************************************/ -static void Brw_AddPathToClipboards (Brw_FileType_t FileType,const char *Path) +static void Brw_AddPathToClipboards (void) { long Cod = Brw_GetCodForClipboard (); long WorksUsrCod = Brw_GetWorksUsrCodForClipboard (); @@ -6976,7 +6970,7 @@ static void Brw_AddPathToClipboards (Brw_FileType_t FileType,const char *Path) "'%u','%s')", Gbl.Usrs.Me.UsrDat.UsrCod,(unsigned) Gbl.FileBrowser.Type, Cod,WorksUsrCod, - (unsigned) FileType,Path); + (unsigned) Gbl.FileBrowser.FileType,Gbl.FileBrowser.Priv.FullPathInTree); DB_QueryINSERT (Query,"can not add source of copy to clipboard"); } @@ -6984,7 +6978,7 @@ static void Brw_AddPathToClipboards (Brw_FileType_t FileType,const char *Path) /************************** Update path in my clipboard **********************/ /*****************************************************************************/ -static void Brw_UpdatePathInClipboard (Brw_FileType_t FileType,const char *Path) +static void Brw_UpdatePathInClipboard (void) { long Cod = Brw_GetCodForClipboard (); long WorksUsrCod = Brw_GetWorksUsrCodForClipboard (); @@ -6996,7 +6990,8 @@ static void Brw_UpdatePathInClipboard (Brw_FileType_t FileType,const char *Path) "FileType='%u',Path='%s'" " WHERE UsrCod='%ld'", (unsigned) Gbl.FileBrowser.Type, - Cod,WorksUsrCod,(unsigned) FileType,Path, + Cod,WorksUsrCod, + (unsigned) Gbl.FileBrowser.FileType,Gbl.FileBrowser.Priv.FullPathInTree, Gbl.Usrs.Me.UsrDat.UsrCod); DB_QueryUPDATE (Query,"can not update source of copy in clipboard"); } @@ -8015,7 +8010,8 @@ void Brw_ShowFormFileBrowser (void) if (Brw_CheckIfICanCreateIntoFolder (Gbl.FileBrowser.Level)) { /***** Name of the folder to be shown ****/ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Gbl.FileBrowser.FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Gbl.FileBrowser.FileType, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); /***** 1. Form to create a new folder *****/ @@ -8092,7 +8088,7 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow) "%s: " "" "", + " size=\"30\" maxlength=\"40\" value=\"\" />", The_ClassForm[Gbl.Prefs.Theme],Txt_Folder); /* Button to send and end frame *****/ @@ -8421,7 +8417,8 @@ void Brw_RecFolderFileBrowser (void) PathCompleteInTreeIncludingFolder,false,Brw_LICENSE_DEFAULT); /* The folder has been created sucessfully */ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Brw_IS_FOLDER, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Brw_IS_FOLDER, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_The_folder_X_has_been_created_inside_the_folder_Y, Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow); @@ -8721,7 +8718,8 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) /* Show message of confirmation */ if (UploadType == Brw_CLASSIC_UPLOAD) { - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Brw_IS_FOLDER, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Brw_IS_FOLDER, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_The_file_X_has_been_placed_inside_the_folder_Y, Gbl.FileBrowser.NewFilFolLnkName, @@ -8901,7 +8899,8 @@ void Brw_RecLinkFileBrowser (void) PathCompleteInTreeIncludingFile,false,Brw_LICENSE_DEFAULT); /* Show message of confirmation */ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Brw_IS_FOLDER, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Brw_IS_FOLDER, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_The_link_X_has_been_placed_inside_the_folder_Y, FileName,FileNameToShow); @@ -9055,7 +9054,8 @@ void Brw_SetDocumentAsVisible (void) Brw_RemoveAffectedClipboards (Gbl.FileBrowser.Type,Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.UsrCod); /***** Write message of confirmation *****/ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Gbl.FileBrowser.FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Gbl.FileBrowser.FileType, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_FILE_FOLDER_OR_LINK_X_is_now_visible, FileNameToShow); @@ -9087,7 +9087,8 @@ void Brw_SetDocumentAsHidden (void) Brw_RemoveAffectedClipboards (Gbl.FileBrowser.Type,Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.UsrCod); /***** Write confirmation message *****/ - Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,Gbl.FileBrowser.FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level, + Gbl.FileBrowser.FileType, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); sprintf (Gbl.Message,Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,FileNameToShow); Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); @@ -11116,11 +11117,23 @@ static bool Brw_CheckIfICanEditFileOrFolder (unsigned Level) return Brw_CheckIfICanModifySharedFileOrFolder (); case Brw_ADMI_ASSIG_USR: case Brw_ADMI_ASSIG_CRS: - return (Gbl.FileBrowser.Asg.AsgCod <= 0 || // If folder does not correspond to any assignment - (!Gbl.FileBrowser.Asg.Hidden && // If assignment is visible (not hidden) - Gbl.FileBrowser.Asg.IBelongToCrsOrGrps && // If I can do this assignment - ((Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && Gbl.FileBrowser.Asg.Open) || - Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER))); + if (Gbl.FileBrowser.Asg.AsgCod <= 0) // If folder does not correspond to any assignment + return true; // Folder can be removed or renamed + + if (Gbl.FileBrowser.Asg.Hidden) // If assignment is hidden + return false; // Do not edit anything in hidden assigments + + if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER && // The main folder of an assignment + Level == 1) + return false; // Do not remove / rename main folder of assigment + + if (!Gbl.FileBrowser.Asg.IBelongToCrsOrGrps) // If I do not belong to course / groups of this assignment + return false; // I can not edit this assignment + + return ((Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && // Students can edit + Gbl.FileBrowser.Asg.Open) || // inside open assignments + Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER); // Teachers can edit + // inside open or closed assignments default: return Brw_FileBrowserIsEditable[Gbl.FileBrowser.Type]; } @@ -11132,6 +11145,10 @@ static bool Brw_CheckIfICanEditFileOrFolder (unsigned Level) static bool Brw_CheckIfICanCreateIntoFolder (unsigned Level) { + /***** If not in a folder... *****/ + if (Gbl.FileBrowser.FileType != Brw_IS_FOLDER) + return false; + /***** I must be student, teacher, admin or superuser to edit *****/ if (Gbl.Usrs.Me.MaxRole < Rol_STUDENT) return false; @@ -11145,12 +11162,23 @@ static bool Brw_CheckIfICanCreateIntoFolder (unsigned Level) { case Brw_ADMI_ASSIG_USR: case Brw_ADMI_ASSIG_CRS: - return (Level != 0 && - (Gbl.FileBrowser.Asg.AsgCod <= 0 || // If folder does not correspond to any assignment - (!Gbl.FileBrowser.Asg.Hidden && // If assignment is visible (not hidden) - Gbl.FileBrowser.Asg.IBelongToCrsOrGrps && // If I can do this assignment - ((Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && Gbl.FileBrowser.Asg.Open) || - Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER)))); + if (Level == 0) // If root folder + return false; // Folders of assigments (level 1) + // can only be created automatically + + if (Gbl.FileBrowser.Asg.AsgCod <= 0) // If folder does not correspond to any assignment + return false; // Do not create anything out of assignments + + if (Gbl.FileBrowser.Asg.Hidden) // If assignment is hidden + return false; // Do not create anything in hidden assigments + + if (!Gbl.FileBrowser.Asg.IBelongToCrsOrGrps) // If I do not belong to course / groups of this assignment + return false; // I can not create anything inside this assignment + + return ((Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && // Students can create + Gbl.FileBrowser.Asg.Open) || // inside open assignments + Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER); // Teachers can create + // inside open or closed assignments default: return Brw_FileBrowserIsEditable[Gbl.FileBrowser.Type]; } diff --git a/swad_institution.c b/swad_institution.c index 218384ae2..e1558984d 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -34,6 +34,7 @@ #include "swad_database.h" #include "swad_global.h" #include "swad_help.h" +#include "swad_hierarchy.h" #include "swad_institution.h" #include "swad_logo.h" #include "swad_parameter.h" @@ -645,7 +646,7 @@ void Ins_ShowInssOfCurrentCty (void) Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_EXTRA_DATA); /***** Write menu to select country *****/ - Deg_WriteMenuAllCourses (); + Hie_WriteMenuAllCourses (); /***** List institutions *****/ Ins_ListInstitutions (); @@ -1791,7 +1792,7 @@ void Ins_ChangeInsCtyInConfig (void) Gbl.CurrentCty.Cty.CtyCod = NewCty.CtyCod; /***** Initialize again current course, degree, centre... *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /***** Write message to show the change made *****/ sprintf (Gbl.Message,Txt_The_country_of_the_institution_X_has_changed_to_Y, diff --git a/swad_layout.c b/swad_layout.c index de808a927..17dd1c967 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -37,6 +37,7 @@ #include "swad_database.h" #include "swad_exam.h" #include "swad_global.h" +#include "swad_hierarchy.h" #include "swad_logo.h" #include "swad_MFU.h" #include "swad_notice.h" @@ -853,7 +854,7 @@ static void Lay_WritePageTopHeading (void) /* 2nd. row, 2nd. column: degree and course */ fprintf (Gbl.F.Out,"
"); Lay_WriteBreadcrumb (); - Deg_WriteBigNameCtyInsCtrDegCrs (); + Hie_WriteBigNameCtyInsCtrDegCrs (); fprintf (Gbl.F.Out,"
"); /* 2nd. row, 3rd. column */ @@ -879,7 +880,7 @@ static void Lay_WritePageTopHeading (void) static void Lay_WriteBreadcrumb (void) { fprintf (Gbl.F.Out,"
"); - Deg_WriteHierarchyBreadcrumb (); + Hie_WriteHierarchyBreadcrumb (); Crs_WriteSelectorMyCourses (); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_main.c b/swad_main.c index 41e403c09..4a8e2a7bf 100644 --- a/swad_main.c +++ b/swad_main.c @@ -34,8 +34,8 @@ #include "swad_config.h" #include "swad_connected.h" #include "swad_database.h" -#include "swad_degree.h" #include "swad_global.h" +#include "swad_hierarchy.h" #include "swad_MFU.h" #include "swad_parameter.h" #include "swad_preference.h" @@ -114,7 +114,7 @@ int main (int argc, char *argv[]) { Par_CreateListOfParams (); Par_GetMainParameters (); - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); if (!Gbl.WebService.IsWebService) { diff --git a/swad_text.c b/swad_text.c index 2c66e05a3..ee1589e3b 100644 --- a/swad_text.c +++ b/swad_text.c @@ -51047,27 +51047,6 @@ const char *Txt_Write_a_message = "Escrever uma mensagem"; #endif -const char *Txt_Write_a_message_to_X = // Warning: it is very important to include %s in the following sentences -#if L==1 - "Escriu un missatge a %s"; -#elif L==2 - "Schreiben Sie %s eine Nachricht"; -#elif L==3 - "Write a message to %s"; -#elif L==4 - "Escribir un mensaje a %s"; -#elif L==5 - "Écrire un message à %s"; -#elif L==6 - "Escribir un mensaje a %s"; // Okoteve traducción -#elif L==7 - "Scrivi un messaggio a %s"; -#elif L==8 - "Napisz wiadomość do %s"; -#elif L==9 - "Escrever uma mensagem para %s"; -#endif - const char *Txt_Wrong_file_type = #if L==1 "Tipus d'arxiu incorrecte."; diff --git a/swad_user.c b/swad_user.c index b74ba56c6..e63bd1f2e 100644 --- a/swad_user.c +++ b/swad_user.c @@ -46,6 +46,7 @@ #include "swad_global.h" #include "swad_group.h" #include "swad_help.h" +#include "swad_hierarchy.h" #include "swad_ID.h" #include "swad_MFU.h" #include "swad_nickname.h" @@ -2572,7 +2573,7 @@ static void Usr_SetUsrRoleAndPrefs (void) Gbl.CurrentCrs.Crs.CrsCod = Gbl.Usrs.Me.UsrLast.LastCrs; /* Initialize again current course, degree, centre... */ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /* Get again my role in this course */ Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB = Rol_GetRoleInCrs (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod); @@ -3250,7 +3251,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) ""); /***** Write degrees which are administrated by this administrator *****/ - Deg_GetAndWriteInsCtrDegAdminBy (UsrDat->UsrCod, + Hie_GetAndWriteInsCtrDegAdminBy (UsrDat->UsrCod, Gbl.Usrs.Listing.WithPhotos ? Usr_NUM_MAIN_FIELDS_DATA_ADM : Usr_NUM_MAIN_FIELDS_DATA_ADM-1); } diff --git a/swad_web_service.c b/swad_web_service.c index e8334b1cc..2c0a57886 100644 --- a/swad_web_service.c +++ b/swad_web_service.c @@ -105,6 +105,7 @@ cp -f /home/acanas/swad/swad/swad /var/www/cgi-bin/ #include "swad_database.h" #include "swad_file_browser.h" #include "swad_global.h" +#include "swad_hierarchy.h" #include "swad_ID.h" #include "swad_notice.h" #include "swad_notification.h" @@ -1356,7 +1357,7 @@ int swad__getCourseInfo (struct soap *soap, strcpy (getCourseInfo->infoSrc,NamesInWSForInfoSrc[InfoSrc]); /***** Set paths *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); /***** Get info text *****/ getCourseInfo->infoTxt = NULL; @@ -4605,7 +4606,7 @@ int swad__getFile (struct soap *soap, } /***** Set paths *****/ - Deg_InitCurrentCourse (); + Hie_InitCurrentCourse (); Brw_SetFullPathInTree (FileMetadata.PathInTreeUntilFilFolLnk, FileMetadata.FilFolLnkName); Brw_InitializeFileBrowser ();