mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-20 07:25:42 +02:00
Version 22.12.2: Sep 20, 2022 Changes in behaviour of program items.
This commit is contained in:
parent
55d7f216a8
commit
ba7f5d793b
|
@ -3348,7 +3348,10 @@ void Att_WriteAttEventInCrsProgram (long AttCod,bool PutFormToGo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeOneAtt);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write attendance event title *****/
|
/***** Write attendance event title *****/
|
||||||
HTM_Txt (Title);
|
HTM_Txt (Title);
|
||||||
|
|
|
@ -5129,8 +5129,6 @@ static void Brw_PutIconNewFileOrFolder (void)
|
||||||
|
|
||||||
static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *FileMetadata)
|
static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *FileMetadata)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Link;
|
|
||||||
|
|
||||||
/***** Begin cell *****/
|
/***** Begin cell *****/
|
||||||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||||
|
|
||||||
|
@ -5147,9 +5145,13 @@ static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *Fi
|
||||||
"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16",
|
"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16",
|
||||||
true); // Put link to view metadata
|
true); // Put link to view metadata
|
||||||
else
|
else
|
||||||
|
/*
|
||||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"up-right-from-square.svg",Txt_Link,
|
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"up-right-from-square.svg",Txt_Link,
|
||||||
"class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16 ICO_%s_%s\"",
|
"class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16 ICO_%s_%s\"",
|
||||||
Ico_GetPreffix (Ico_BLACK),The_GetSuffix ());
|
Ico_GetPreffix (Ico_BLACK),The_GetSuffix ()); */
|
||||||
|
Ico_PutIconLink ("up-right-from-square.svg",Ico_BLACK,
|
||||||
|
Brw_ActReqDatFile[Gbl.FileBrowser.Type]);
|
||||||
|
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -5372,10 +5374,10 @@ void Brw_GetLinkToFile (void)
|
||||||
/******************** Write file name in course program **********************/
|
/******************** Write file name in course program **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Brw_WriteFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
void Brw_WriteDocFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||||
const char *Icon,const char *IconTitle)
|
const char *Icon,const char *IconTitle)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Download;
|
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||||
struct FileMetadata FileMetadata;
|
struct FileMetadata FileMetadata;
|
||||||
|
|
||||||
/***** Get file metadata *****/
|
/***** Get file metadata *****/
|
||||||
|
@ -5385,21 +5387,78 @@ void Brw_WriteFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||||
/***** Begin form to go to file data *****/
|
/***** Begin form to go to file data *****/
|
||||||
if (PutFormToGo)
|
if (PutFormToGo)
|
||||||
{
|
{
|
||||||
/* To download the file:
|
Frm_BeginForm (ActReqDatSeeDocCrs);
|
||||||
Frm_BeginForm (Brw_ActDowFile[FileMetadata.FileBrowser]);
|
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||||
Brw_PutImplicitParamsFileBrowser (&FileMetadata.FilFolLnk); */
|
NULL, // Not used
|
||||||
Frm_BeginForm (Brw_ActReqDatFile[FileMetadata.FileBrowser]);
|
|
||||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
|
||||||
NULL, // Not used
|
|
||||||
Brw_IS_UNKNOWN, // Not used
|
Brw_IS_UNKNOWN, // Not used
|
||||||
FileMetadata.FilCod);
|
FileMetadata.FilCod);
|
||||||
HTM_BUTTON_Submit_Begin (Txt_Download,
|
HTM_BUTTON_Submit_Begin (Txt_Actions[ActReqDatSeeDocCrs],
|
||||||
"class=\"LM BT_LINK PRG_RSC_%s\"",
|
"class=\"LM BT_LINK PRG_RSC_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
switch (FileMetadata.FilFolLnk.Type)
|
||||||
|
{
|
||||||
|
case Brw_IS_FILE:
|
||||||
|
Brw_PutIconFile (FileMetadata.FilFolLnk.Name,
|
||||||
|
"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16",
|
||||||
|
PutFormToGo); // Put link to view metadata
|
||||||
|
break;
|
||||||
|
case Brw_IS_LINK:
|
||||||
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActReqDatSeeDocCrs);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Write filename *****/
|
||||||
|
HTM_Txt (FileMetadata.FilFolLnk.Name);
|
||||||
|
|
||||||
|
/***** End form to download file *****/
|
||||||
|
if (PutFormToGo)
|
||||||
|
{
|
||||||
|
HTM_BUTTON_End ();
|
||||||
|
|
||||||
|
Frm_EndForm ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Write file name in course program **********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Brw_WriteMrkFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||||
|
const char *Icon,const char *IconTitle)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||||
|
struct FileMetadata FileMetadata;
|
||||||
|
|
||||||
|
/***** Get file metadata *****/
|
||||||
|
FileMetadata.FilCod = FilCod;
|
||||||
|
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||||
|
|
||||||
|
/***** Begin form to go to file data *****/
|
||||||
|
if (PutFormToGo)
|
||||||
|
{
|
||||||
|
Frm_BeginForm (ActReqDatSeeMrkCrs);
|
||||||
|
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||||
|
NULL, // Not used
|
||||||
|
Brw_IS_UNKNOWN, // Not used
|
||||||
|
FileMetadata.FilCod);
|
||||||
|
HTM_BUTTON_Submit_Begin (Txt_Actions[ActReqDatSeeMrkCrs],
|
||||||
|
"class=\"LM BT_LINK PRG_RSC_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Icon depending on type ******/
|
||||||
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActReqDatSeeMrkCrs);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write filename *****/
|
/***** Write filename *****/
|
||||||
HTM_Txt (FileMetadata.FilFolLnk.Name);
|
HTM_Txt (FileMetadata.FilFolLnk.Name);
|
||||||
|
|
|
@ -257,8 +257,10 @@ void Brw_SetFullPathInTree (void);
|
||||||
|
|
||||||
//--------------------------- Program resources -------------------------------
|
//--------------------------- Program resources -------------------------------
|
||||||
void Brw_GetLinkToFile (void);
|
void Brw_GetLinkToFile (void);
|
||||||
void Brw_WriteFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
void Brw_WriteDocFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||||
const char *Icon,const char *IconTitle);
|
const char *Icon,const char *IconTitle);
|
||||||
|
void Brw_WriteMrkFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||||
|
const char *Icon,const char *IconTitle);
|
||||||
void Brw_GetFileNameFromFilCod (long FilCod,char *FileName,size_t FileNameSize);
|
void Brw_GetFileNameFromFilCod (long FilCod,char *FileName,size_t FileNameSize);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1766,7 +1766,10 @@ void Cfe_WriteCallForExamInCrsProgram (long ExaCod,bool PutFormToGo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeOneCfe);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write Name of the course and date of exam *****/
|
/***** Write Name of the course and date of exam *****/
|
||||||
HTM_Txt (SessionAndDate);
|
HTM_Txt (SessionAndDate);
|
||||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.12.1 (2022-09-20)"
|
#define Log_PLATFORM_VERSION "SWAD 22.12.2 (2022-09-20)"
|
||||||
#define CSS_FILE "swad22.7.css"
|
#define CSS_FILE "swad22.7.css"
|
||||||
#define JS_FILE "swad21.100.js"
|
#define JS_FILE "swad21.100.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.12.2: Sep 20, 2022 Changes in behaviour of program items. (331097 lines)
|
||||||
Version 22.12.1: Sep 20, 2022 Changes in behaviour of program items. (331015 lines)
|
Version 22.12.1: Sep 20, 2022 Changes in behaviour of program items. (331015 lines)
|
||||||
Version 22.12: Sep 20, 2022 Links to marks file in program. (330985 lines)
|
Version 22.12: Sep 20, 2022 Links to marks file in program. (330985 lines)
|
||||||
Copy the following icon to icon public directory:
|
Copy the following icon to icon public directory:
|
||||||
|
|
|
@ -1697,7 +1697,10 @@ void Exa_WriteExamInCrsProgram (long ExaCod,bool PutFormToGo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeExa);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write Name of the course and date of exam *****/
|
/***** Write Name of the course and date of exam *****/
|
||||||
HTM_Txt (Title);
|
HTM_Txt (Title);
|
||||||
|
|
|
@ -2407,7 +2407,10 @@ void Gam_WriteGameInCrsProgram (long GamCod,bool PutFormToGo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeGam);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write game title of exam *****/
|
/***** Write game title of exam *****/
|
||||||
HTM_Txt (Title);
|
HTM_Txt (Title);
|
||||||
|
|
|
@ -119,6 +119,8 @@ static void PrgRsc_ShowClipboard (struct Prg_Item *Item);
|
||||||
static void PrgRsc_WriteRowClipboard (bool SubmitOnClick,const struct Prg_Link *Link);
|
static void PrgRsc_WriteRowClipboard (bool SubmitOnClick,const struct Prg_Link *Link);
|
||||||
static void PrgRsc_WriteLinkName (const struct Prg_Link *Link,bool PutFormToGo,
|
static void PrgRsc_WriteLinkName (const struct Prg_Link *Link,bool PutFormToGo,
|
||||||
const char *Icon,const char *IconTitle);
|
const char *Icon,const char *IconTitle);
|
||||||
|
static void PrgRsc_WriteEmptyLinkInCrsProgram (long Cod,__attribute__((unused)) bool PutFormToGo,
|
||||||
|
const char *Icon,const char *IconTitle);
|
||||||
static void PrgRsc_GetDataOfLinkFromClipboard (struct Prg_Link *Link,
|
static void PrgRsc_GetDataOfLinkFromClipboard (struct Prg_Link *Link,
|
||||||
MYSQL_RES **mysql_res);
|
MYSQL_RES **mysql_res);
|
||||||
|
|
||||||
|
@ -958,8 +960,6 @@ static void PrgRsc_ShowClipboard (struct Prg_Item *Item)
|
||||||
PrgRsc_GetDataOfLinkFromClipboard (&Link,&mysql_res);
|
PrgRsc_GetDataOfLinkFromClipboard (&Link,&mysql_res);
|
||||||
PrgRsc_WriteRowClipboard (true,&Link);
|
PrgRsc_WriteRowClipboard (true,&Link);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End list *****/
|
/***** End list *****/
|
||||||
|
@ -1009,20 +1009,21 @@ static void PrgRsc_WriteLinkName (const struct Prg_Link *Link,bool PutFormToGo,
|
||||||
const char *Icon,
|
const char *Icon,
|
||||||
const char *IconTitle) =
|
const char *IconTitle) =
|
||||||
{
|
{
|
||||||
[PrgRsc_NONE ] = NULL,
|
[PrgRsc_NONE ] = PrgRsc_WriteEmptyLinkInCrsProgram,
|
||||||
[PrgRsc_ASSIGNMENT ] = NULL,
|
[PrgRsc_ASSIGNMENT ] = NULL,
|
||||||
[PrgRsc_CALL_FOR_EXAM ] = Cfe_WriteCallForExamInCrsProgram,
|
[PrgRsc_CALL_FOR_EXAM ] = Cfe_WriteCallForExamInCrsProgram,
|
||||||
[PrgRsc_EXAM ] = Exa_WriteExamInCrsProgram,
|
[PrgRsc_EXAM ] = Exa_WriteExamInCrsProgram,
|
||||||
[PrgRsc_GAME ] = Gam_WriteGameInCrsProgram,
|
[PrgRsc_GAME ] = Gam_WriteGameInCrsProgram,
|
||||||
[PrgRsc_SURVEY ] = Svy_WriteSurveyInCrsProgram,
|
[PrgRsc_SURVEY ] = Svy_WriteSurveyInCrsProgram,
|
||||||
[PrgRsc_DOCUMENT ] = Brw_WriteFileNameInCrsProgram,
|
[PrgRsc_DOCUMENT ] = Brw_WriteDocFileNameInCrsProgram,
|
||||||
[PrgRsc_MARKS ] = Brw_WriteFileNameInCrsProgram,
|
[PrgRsc_MARKS ] = Brw_WriteMrkFileNameInCrsProgram,
|
||||||
[PrgRsc_ATTENDANCE_EVENT] = Att_WriteAttEventInCrsProgram,
|
[PrgRsc_ATTENDANCE_EVENT] = Att_WriteAttEventInCrsProgram,
|
||||||
[PrgRsc_FORUM_THREAD ] = NULL,
|
[PrgRsc_FORUM_THREAD ] = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Trivial check: code should be > 0 *****/
|
/***** Trivial check: code should be > 0 *****/
|
||||||
if (Link->Cod <= 0)
|
if (Link->Type != PrgRsc_NONE &&
|
||||||
|
Link->Cod <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Write link name *****/
|
/***** Write link name *****/
|
||||||
|
@ -1032,6 +1033,20 @@ static void PrgRsc_WriteLinkName (const struct Prg_Link *Link,bool PutFormToGo,
|
||||||
Ale_ShowAlert (Ale_ERROR,"Not implemented!");
|
Ale_ShowAlert (Ale_ERROR,"Not implemented!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************** Write survey in course program ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void PrgRsc_WriteEmptyLinkInCrsProgram (__attribute__((unused)) long Cod,__attribute__((unused)) bool PutFormToGo,
|
||||||
|
const char *Icon,const char *IconTitle)
|
||||||
|
{
|
||||||
|
/***** Icon depending on type ******/
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
|
/***** Write Name of the course and date of exam *****/
|
||||||
|
HTM_Txt ("sin enlace"); // TODO: Need translation!!!!!!!!!!!!!
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Get the title for a new resource from link title */
|
/* Get the title for a new resource from link title */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -3509,7 +3509,10 @@ void Svy_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Icon depending on type ******/
|
/***** Icon depending on type ******/
|
||||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
if (PutFormToGo)
|
||||||
|
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeSvy);
|
||||||
|
else
|
||||||
|
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||||
|
|
||||||
/***** Write Name of the course and date of exam *****/
|
/***** Write Name of the course and date of exam *****/
|
||||||
HTM_Txt (Title);
|
HTM_Txt (Title);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user