mirror of https://github.com/acanas/swad-core.git
Version 22.104.1: May 04, 2023 Rubrics in project. Code refactoring in file browsers.
This commit is contained in:
parent
e4489b85ca
commit
6a92148fa5
|
@ -1344,7 +1344,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
||||||
[ActReqDatBrf ] = {1047,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
[ActReqDatBrf ] = {1047,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
||||||
[ActChgDatBrf ] = {1048,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C4,0x3C4,0x3C4,0x3C4,0x3C4,0x3C4,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ChgFileMetadata ,NULL},
|
[ActChgDatBrf ] = {1048,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C4,0x3C4,0x3C4,0x3C4,0x3C4,0x3C4,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ChgFileMetadata ,NULL},
|
||||||
[ActDowBrf ] = {1123,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
[ActDowBrf ] = {1123,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
||||||
[ActReqRemOldBrf ] = {1488,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_AskRemoveOldFiles ,NULL},
|
[ActReqRemOldBrf ] = {1488,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_AskRemoveOldFilesBriefcase ,NULL},
|
||||||
[ActRemOldBrf ] = {1489,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_RemoveOldFilesBriefcase ,NULL},
|
[ActRemOldBrf ] = {1489,-1,TabUnk,ActAdmBrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_RemoveOldFilesBriefcase ,NULL},
|
||||||
|
|
||||||
// TabUsr ******************************************************************
|
// TabUsr ******************************************************************
|
||||||
|
|
|
@ -1065,7 +1065,6 @@ static void Brw_SetPathFileBrowser (void);
|
||||||
static void Brw_CreateFoldersAssignmentsIfNotExist (long ZoneUsrCod);
|
static void Brw_CreateFoldersAssignmentsIfNotExist (long ZoneUsrCod);
|
||||||
|
|
||||||
static void Brw_AskEditWorksCrsInternal (__attribute__((unused)) void *Args);
|
static void Brw_AskEditWorksCrsInternal (__attribute__((unused)) void *Args);
|
||||||
static void Brw_ShowFileBrowserNormal (void);
|
|
||||||
static void Brw_ShowFileBrowsersAsgWrkCrs (void);
|
static void Brw_ShowFileBrowsersAsgWrkCrs (void);
|
||||||
static void Brw_ShowFileBrowsersAsgWrkUsr (void);
|
static void Brw_ShowFileBrowsersAsgWrkUsr (void);
|
||||||
|
|
||||||
|
@ -1735,6 +1734,7 @@ void Brw_GetParAndInitFileBrowser (void)
|
||||||
case ActReqDatAssPrj:
|
case ActReqDatAssPrj:
|
||||||
case ActChgDatAssPrj:
|
case ActChgDatAssPrj:
|
||||||
case ActDowAssPrj:
|
case ActDowAssPrj:
|
||||||
|
case ActChgPrjSco:
|
||||||
Gbl.FileBrowser.Type = Brw_ADMI_ASS_PRJ;
|
Gbl.FileBrowser.Type = Brw_ADMI_ASS_PRJ;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2696,13 +2696,16 @@ static void Brw_AskEditWorksCrsInternal (__attribute__((unused)) void *Args)
|
||||||
/*********** Show normal file browser (not for assignments-works) ************/
|
/*********** Show normal file browser (not for assignments-works) ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Brw_ShowFileBrowserNormal (void)
|
void Brw_ShowFileBrowserNormal (void)
|
||||||
{
|
{
|
||||||
/***** Write top before showing file browser *****/
|
/***** Write top before showing file browser *****/
|
||||||
Brw_WriteTopBeforeShowingFileBrowser ();
|
Brw_WriteTopBeforeShowingFileBrowser ();
|
||||||
|
|
||||||
/****** Show the file browser *****/
|
/****** Show the file browser *****/
|
||||||
Brw_ShowFileBrowser ();
|
Brw_ShowFileBrowser ();
|
||||||
|
|
||||||
|
/***** Put legal notice *****/
|
||||||
|
Brw_PutLegalNotice ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2792,6 +2795,9 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
Box_BoxTableEnd ();
|
Box_BoxTableEnd ();
|
||||||
|
|
||||||
|
/***** Put legal notice *****/
|
||||||
|
Brw_PutLegalNotice ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2812,6 +2818,23 @@ static void Brw_ShowFileBrowsersAsgWrkUsr (void)
|
||||||
Gbl.FileBrowser.Type = Brw_ADMI_WRK_USR;
|
Gbl.FileBrowser.Type = Brw_ADMI_WRK_USR;
|
||||||
Brw_InitializeFileBrowser ();
|
Brw_InitializeFileBrowser ();
|
||||||
Brw_ShowFileBrowser ();
|
Brw_ShowFileBrowser ();
|
||||||
|
|
||||||
|
/***** Put legal notice *****/
|
||||||
|
Brw_PutLegalNotice ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Put legal notice about files hosted ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Brw_PutLegalNotice (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Disclaimer_the_files_hosted_here_;
|
||||||
|
|
||||||
|
/***** Legal notice *****/
|
||||||
|
Ale_ShowAlert (Ale_INFO,Txt_Disclaimer_the_files_hosted_here_,
|
||||||
|
Cfg_PLATFORM_SHORT_NAME,
|
||||||
|
Cfg_PLATFORM_RESPONSIBLE_EMAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3035,9 +3058,6 @@ static void Brw_ShowFileBrowserOrWorksInternal (__attribute__((unused)) void *Ar
|
||||||
|
|
||||||
void Brw_ShowAgainFileBrowserOrWorks (void)
|
void Brw_ShowAgainFileBrowserOrWorks (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Files_of_marks_must_contain_a_table_in_HTML_format_;
|
|
||||||
extern const char *Txt_Disclaimer_the_files_hosted_here_;
|
|
||||||
|
|
||||||
if (Brw_GetIfUsrAssigWorksFileBrowser ())
|
if (Brw_GetIfUsrAssigWorksFileBrowser ())
|
||||||
Brw_ShowFileBrowsersAsgWrkUsr ();
|
Brw_ShowFileBrowsersAsgWrkUsr ();
|
||||||
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
||||||
|
@ -3046,22 +3066,6 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
||||||
Prj_ShowOneProject ();
|
Prj_ShowOneProject ();
|
||||||
else
|
else
|
||||||
Brw_ShowFileBrowserNormal ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
|
|
||||||
/***** Help *****/
|
|
||||||
switch (Gbl.FileBrowser.Type)
|
|
||||||
{
|
|
||||||
case Brw_ADMI_MRK_CRS:
|
|
||||||
case Brw_ADMI_MRK_GRP:
|
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Legal notice *****/
|
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_Disclaimer_the_files_hosted_here_,
|
|
||||||
Cfg_PLATFORM_SHORT_NAME,
|
|
||||||
Cfg_PLATFORM_RESPONSIBLE_EMAIL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3096,6 +3100,7 @@ static void Brw_ShowFileBrowser (void)
|
||||||
extern const char *Txt_Temporary_private_storage_area;
|
extern const char *Txt_Temporary_private_storage_area;
|
||||||
extern const char *Txt_Project_documents;
|
extern const char *Txt_Project_documents;
|
||||||
extern const char *Txt_Project_assessment;
|
extern const char *Txt_Project_assessment;
|
||||||
|
extern const char *Txt_Files_of_marks_must_contain_a_table_in_HTML_format_;
|
||||||
|
|
||||||
static const char **Brw_TitleOfFileBrowser[Brw_NUM_TYPES_FILE_BROWSER] =
|
static const char **Brw_TitleOfFileBrowser[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
{
|
{
|
||||||
|
@ -3272,6 +3277,17 @@ static void Brw_ShowFileBrowser (void)
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
|
||||||
HTM_SECTION_End ();
|
HTM_SECTION_End ();
|
||||||
|
|
||||||
|
/***** Help *****/
|
||||||
|
switch (Gbl.FileBrowser.Type)
|
||||||
|
{
|
||||||
|
case Brw_ADMI_MRK_CRS:
|
||||||
|
case Brw_ADMI_MRK_GRP:
|
||||||
|
Ale_ShowAlert (Ale_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -7371,7 +7387,7 @@ void Brw_SetDocumentAsVisible (void)
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod);
|
Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -7395,7 +7411,7 @@ void Brw_SetDocumentAsHidden (void)
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod);
|
Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -9696,7 +9712,7 @@ static void Brw_PutLinkToAskRemOldFiles (void)
|
||||||
/************** Write a form fo confirm removing of old files ****************/
|
/************** Write a form fo confirm removing of old files ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Brw_AskRemoveOldFiles (void)
|
void Brw_AskRemoveOldFilesBriefcase (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Remove_old_files;
|
extern const char *Txt_Remove_old_files;
|
||||||
extern const char *Txt_Remove_files_older_than_PART_1_OF_2;
|
extern const char *Txt_Remove_files_older_than_PART_1_OF_2;
|
||||||
|
@ -9781,7 +9797,7 @@ void Brw_RemoveOldFilesBriefcase (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -198,8 +198,11 @@ void Brw_CreateDirDownloadTmp (void);
|
||||||
|
|
||||||
void Brw_AskEditWorksCrs (void);
|
void Brw_AskEditWorksCrs (void);
|
||||||
|
|
||||||
|
void Brw_ShowFileBrowserNormal (void);
|
||||||
void Brw_ShowFileBrowserProject (long PrjCod);
|
void Brw_ShowFileBrowserProject (long PrjCod);
|
||||||
|
|
||||||
|
void Brw_PutLegalNotice (void);
|
||||||
|
|
||||||
void Brw_AskRemFileFromTree (void);
|
void Brw_AskRemFileFromTree (void);
|
||||||
void Brw_RemFileFromTree (void);
|
void Brw_RemFileFromTree (void);
|
||||||
void Brw_RemFolderFromTree (void);
|
void Brw_RemFolderFromTree (void);
|
||||||
|
@ -269,7 +272,7 @@ void Brw_GetSummaryAndContentOfFile (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
void Brw_ListDocsFound (MYSQL_RES **mysql_res,unsigned NumDocs,
|
void Brw_ListDocsFound (MYSQL_RES **mysql_res,unsigned NumDocs,
|
||||||
const char *TitleSingular,const char *TitlePlural);
|
const char *TitleSingular,const char *TitlePlural);
|
||||||
|
|
||||||
void Brw_AskRemoveOldFiles (void);
|
void Brw_AskRemoveOldFilesBriefcase (void);
|
||||||
void Brw_RemoveOldFilesBriefcase (void);
|
void Brw_RemoveOldFilesBriefcase (void);
|
||||||
|
|
||||||
Act_Action_t Brw_GetActionExpand (void);
|
Act_Action_t Brw_GetActionExpand (void);
|
||||||
|
|
|
@ -71,7 +71,7 @@ void BrwRsc_GetLinkToDocFil (void)
|
||||||
Txt_Documents);
|
Txt_Documents);
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrwRsc_GetLinkToMrkFil (void)
|
void BrwRsc_GetLinkToMrkFil (void)
|
||||||
|
@ -99,7 +99,7 @@ void BrwRsc_GetLinkToMrkFil (void)
|
||||||
Txt_Marks_area);
|
Txt_Marks_area);
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -629,11 +629,12 @@ TODO: Emilce Barrera Mesa: Podr
|
||||||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.104 (2023-05-03)"
|
#define Log_PLATFORM_VERSION "SWAD 22.104.1 (2023-05-04)"
|
||||||
#define CSS_FILE "swad22.103.css"
|
#define CSS_FILE "swad22.103.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
Version 22.104: May 03, 2023 Rubrics in project. Not finished. (? lines)
|
Version 22.104.1: May 04, 2023 Rubrics in project. Code refactoring in file browsers. (338014 lines)
|
||||||
|
Version 22.104: May 03, 2023 Rubrics in project. Not finished. (338000 lines)
|
||||||
3 changes necessary in database:
|
3 changes necessary in database:
|
||||||
CREATE TABLE IF NOT EXISTS prj_rubrics (CrsCod INT NOT NULL,Type ENUM('tut','evl','gbl') NOT NULL,RubCod INT NOT NULL,UNIQUE INDEX(CrsCod,Type,RubCod));
|
CREATE TABLE IF NOT EXISTS prj_rubrics (CrsCod INT NOT NULL,Type ENUM('tut','evl','gbl') NOT NULL,RubCod INT NOT NULL,UNIQUE INDEX(CrsCod,Type,RubCod));
|
||||||
CREATE TABLE IF NOT EXISTS prj_scores (PrjCod INT NOT NULL,CriCod INT NOT NULL,Score DOUBLE PRECISION NOT NULL DEFAULT 0,UNIQUE INDEX(PrjCod,CriCod));
|
CREATE TABLE IF NOT EXISTS prj_scores (PrjCod INT NOT NULL,CriCod INT NOT NULL,Score DOUBLE PRECISION NOT NULL DEFAULT 0,UNIQUE INDEX(PrjCod,CriCod));
|
||||||
|
|
|
@ -216,7 +216,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
||||||
Err_WrongNumberOfRowsExit ();
|
Err_WrongNumberOfRowsExit ();
|
||||||
|
|
||||||
/***** Show again the file browser *****/
|
/***** Show again the file browser *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowFileBrowserNormal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1324,6 +1324,9 @@ void Prj_ShowOneProject (void)
|
||||||
Prj_ShowBoxWithOneProject (&Projects);
|
Prj_ShowBoxWithOneProject (&Projects);
|
||||||
Prj_FreeMemProject (&Projects.Prj);
|
Prj_FreeMemProject (&Projects.Prj);
|
||||||
|
|
||||||
|
/***** Put legal notice *****/
|
||||||
|
Brw_PutLegalNotice ();
|
||||||
|
|
||||||
/***** Show projects again *****/
|
/***** Show projects again *****/
|
||||||
Prj_ShowProjects (&Projects);
|
Prj_ShowProjects (&Projects);
|
||||||
}
|
}
|
||||||
|
@ -4581,26 +4584,22 @@ static bool Prj_CheckIfICanFillRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric)
|
||||||
|
|
||||||
void Prj_ChangeCriterionScore (void)
|
void Prj_ChangeCriterionScore (void)
|
||||||
{
|
{
|
||||||
struct Prj_Projects Projects;
|
struct Prj_Project Prj;
|
||||||
long CriCod;
|
long CriCod;
|
||||||
double Score;
|
double Score;
|
||||||
long RubCod;
|
long RubCod;
|
||||||
PrjCfg_Rubric_t WhichRubric;
|
PrjCfg_Rubric_t WhichRubric;
|
||||||
|
|
||||||
/***** Reset projects *****/
|
|
||||||
Prj_ResetPrjsAndReadConfig (&Projects);
|
|
||||||
|
|
||||||
/***** Allocate memory for the project *****/
|
/***** Allocate memory for the project *****/
|
||||||
Prj_AllocMemProject (&Projects.Prj);
|
Prj_AllocMemProject (&Prj);
|
||||||
|
|
||||||
/***** Get parameters *****/
|
/***** Get parameters *****/
|
||||||
Prj_GetPars (&Projects);
|
Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
|
||||||
Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
|
|
||||||
CriCod = ParCod_GetAndCheckPar (ParCod_Cri);
|
CriCod = ParCod_GetAndCheckPar (ParCod_Cri);
|
||||||
Score = RubCri_GetParScore ();
|
Score = RubCri_GetParScore ();
|
||||||
|
|
||||||
/***** Get data of the project from database *****/
|
/***** Get data of the project from database *****/
|
||||||
Prj_GetProjectDataByCod (&Projects.Prj);
|
Prj_GetProjectDataByCod (&Prj);
|
||||||
|
|
||||||
/***** Get which rubric match this criterion *****/
|
/***** Get which rubric match this criterion *****/
|
||||||
if ((RubCod = Rub_DB_GetRubCodFromCriCod (CriCod)) <= 0)
|
if ((RubCod = Rub_DB_GetRubCodFromCriCod (CriCod)) <= 0)
|
||||||
|
@ -4609,16 +4608,18 @@ void Prj_ChangeCriterionScore (void)
|
||||||
Err_WrongRubricExit ();
|
Err_WrongRubricExit ();
|
||||||
|
|
||||||
/***** Update review *****/
|
/***** Update review *****/
|
||||||
if (Prj_CheckIfICanFillRubric (Projects.Prj.PrjCod,WhichRubric))
|
if (Prj_CheckIfICanFillRubric (Prj.PrjCod,WhichRubric))
|
||||||
Prj_DB_UpdateScore (Projects.Prj.PrjCod,CriCod,Score);
|
Prj_DB_UpdateScore (Prj.PrjCod,CriCod,Score);
|
||||||
else
|
else
|
||||||
Err_NoPermission ();
|
Err_NoPermission ();
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Projects.Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
|
||||||
/***** Show projects again *****/
|
/***** Get parameters related to file browser
|
||||||
Prj_ShowProjects (&Projects);
|
and show again project including file browser *****/
|
||||||
|
Brw_GetParAndInitFileBrowser ();
|
||||||
|
Prj_ShowOneProject ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -233,14 +233,12 @@ void Prj_DB_UpdateReview (const struct Prj_Project *Prj)
|
||||||
void Prj_DB_UpdateScore (long PrjCod,long CriCod,double Score)
|
void Prj_DB_UpdateScore (long PrjCod,long CriCod,double Score)
|
||||||
{
|
{
|
||||||
Str_SetDecimalPointToUS (); // To write the decimal point as a dot
|
Str_SetDecimalPointToUS (); // To write the decimal point as a dot
|
||||||
DB_QueryUPDATE ("can not update score",
|
DB_QueryREPLACE ("can not save score",
|
||||||
"UPDATE prj_scores"
|
"REPLACE INTO prj_scores"
|
||||||
" SET Score=%.15lg"
|
" (PrjCod,CriCod,Score)"
|
||||||
" WHERE PrjCod=%ld"
|
" VALUES"
|
||||||
" AND CriCod=%ld",
|
" (%ld,%ld,%.15lg)",
|
||||||
Score,
|
PrjCod,CriCod,Score);
|
||||||
PrjCod,
|
|
||||||
CriCod);
|
|
||||||
Str_SetDecimalPointToLocal (); // Return to local system
|
Str_SetDecimalPointToLocal (); // Return to local system
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue