mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-13 20:24:06 +02:00
Version 16.47.10
This commit is contained in:
parent
69e7fb49e7
commit
bf20d3b068
|
@ -156,13 +156,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.47.9 (2016-11-07)"
|
#define Log_PLATFORM_VERSION "SWAD 16.47.10 (2016-11-07)"
|
||||||
#define CSS_FILE "swad16.32.1.css"
|
#define CSS_FILE "swad16.32.1.css"
|
||||||
#define JS_FILE "swad16.46.1.js"
|
#define JS_FILE "swad16.46.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.47.10: Nov 07, 2016 Icon in list of surveys to show figure (statistics). (206246 lines)
|
||||||
Version 16.47.9: Nov 07, 2016 Icon in list of courses to show figure (statistics). (206231 lines)
|
Version 16.47.9: Nov 07, 2016 Icon in list of courses to show figure (statistics). (206231 lines)
|
||||||
Version 16.47.8: Nov 06, 2016 Icon in list of degrees to show figure (statistics). (206211 lines)
|
Version 16.47.8: Nov 06, 2016 Icon in list of degrees to show figure (statistics). (206211 lines)
|
||||||
Version 16.47.7: Nov 06, 2016 Icon in list of centres to show figure (statistics). (206191 lines)
|
Version 16.47.7: Nov 06, 2016 Icon in list of centres to show figure (statistics). (206191 lines)
|
||||||
|
|
|
@ -92,6 +92,7 @@ struct SurveyQuestion
|
||||||
|
|
||||||
static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst);
|
static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst);
|
||||||
static bool Svy_CheckIfICanCreateSvy (void);
|
static bool Svy_CheckIfICanCreateSvy (void);
|
||||||
|
static void Svy_PutIconsListSurveys (void);
|
||||||
static void Svy_PutIconToCreateNewSvy (void);
|
static void Svy_PutIconToCreateNewSvy (void);
|
||||||
static void Svy_PutButtonToCreateNewSvy (void);
|
static void Svy_PutButtonToCreateNewSvy (void);
|
||||||
static void Svy_PutParamsToCreateNewSvy (void);
|
static void Svy_PutParamsToCreateNewSvy (void);
|
||||||
|
@ -191,7 +192,6 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
tSvysOrderType Order;
|
tSvysOrderType Order;
|
||||||
struct Pagination Pagination;
|
struct Pagination Pagination;
|
||||||
unsigned NumSvy;
|
unsigned NumSvy;
|
||||||
bool ICanEdit = Svy_CheckIfICanCreateSvy ();
|
|
||||||
|
|
||||||
/***** Get number of groups in current course *****/
|
/***** Get number of groups in current course *****/
|
||||||
if (!Gbl.CurrentCrs.Grps.NumGrps)
|
if (!Gbl.CurrentCrs.Grps.NumGrps)
|
||||||
|
@ -211,9 +211,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,0,&Pagination);
|
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,0,&Pagination);
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
Lay_StartRoundFrame ("100%",Txt_Surveys,
|
Lay_StartRoundFrame ("100%",Txt_Surveys,Svy_PutIconsListSurveys);
|
||||||
ICanEdit ? Svy_PutIconToCreateNewSvy :
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/***** Select whether show only my groups or all groups *****/
|
/***** Select whether show only my groups or all groups *****/
|
||||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||||
|
@ -269,7 +267,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
Lay_ShowAlert (Lay_INFO,Txt_No_surveys);
|
Lay_ShowAlert (Lay_INFO,Txt_No_surveys);
|
||||||
|
|
||||||
/***** Button to create a new survey *****/
|
/***** Button to create a new survey *****/
|
||||||
if (ICanEdit)
|
if (Svy_CheckIfICanCreateSvy ())
|
||||||
Svy_PutButtonToCreateNewSvy ();
|
Svy_PutButtonToCreateNewSvy ();
|
||||||
|
|
||||||
/***** End frame *****/
|
/***** End frame *****/
|
||||||
|
@ -284,7 +282,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Put form to select which groups to show *******************/
|
/******************* Check if I can create a new survey **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static bool Svy_CheckIfICanCreateSvy (void)
|
static bool Svy_CheckIfICanCreateSvy (void)
|
||||||
|
@ -294,7 +292,11 @@ static bool Svy_CheckIfICanCreateSvy (void)
|
||||||
case Rol_TEACHER:
|
case Rol_TEACHER:
|
||||||
return (Gbl.CurrentCrs.Crs.CrsCod > 0);
|
return (Gbl.CurrentCrs.Crs.CrsCod > 0);
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
return (Gbl.CurrentDeg.Deg.DegCod > 0);
|
return (Gbl.CurrentDeg.Deg.DegCod > 0); // Always true
|
||||||
|
case Rol_CTR_ADM:
|
||||||
|
return (Gbl.CurrentCtr.Ctr.CtrCod > 0); // Always true
|
||||||
|
case Rol_INS_ADM:
|
||||||
|
return (Gbl.CurrentIns.Ins.InsCod > 0); // Always true
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -303,6 +305,21 @@ static bool Svy_CheckIfICanCreateSvy (void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/***************** Put contextual icons in list of surveys *******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Svy_PutIconsListSurveys (void)
|
||||||
|
{
|
||||||
|
/***** Put icon to create a new survey *****/
|
||||||
|
if (Svy_CheckIfICanCreateSvy ())
|
||||||
|
Svy_PutIconToCreateNewSvy ();
|
||||||
|
|
||||||
|
/***** Put icon to show a figure *****/
|
||||||
|
Gbl.Stat.FigureType = Sta_SURVEYS;
|
||||||
|
Sta_PutIconToShowFigure ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Put icon to create a new survey **********************/
|
/********************** Put icon to create a new survey **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user