mirror of
https://github.com/acanas/swad-core.git
synced 2024-07-01 21:05:42 +02:00
Version 23.84.2: Jun 20, 2024 Code refactoring. Changed width for names in forms.
This commit is contained in:
parent
eda09b961a
commit
4a8b6c6d9a
28
swad_API.c
28
swad_API.c
|
@ -2039,7 +2039,7 @@ int swad__sendMyGroups (struct soap *soap,
|
|||
int ReturnCode;
|
||||
struct ListCodGrps LstGrpsIWant;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumGrps;
|
||||
unsigned NumGrp;
|
||||
MYSQL_RES *mysql_res;
|
||||
|
@ -2092,7 +2092,7 @@ int swad__sendMyGroups (struct soap *soap,
|
|||
for (NumGrp = 0, Ptr = myGroups;
|
||||
*Ptr;
|
||||
NumGrp++)
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
LstGrpsIWant.NumGrps = NumGrp;
|
||||
|
||||
if (LstGrpsIWant.NumGrps) // If I have selected groups...
|
||||
|
@ -2106,7 +2106,7 @@ int swad__sendMyGroups (struct soap *soap,
|
|||
NumGrp++)
|
||||
{
|
||||
/* Find next string in text until comma (leading and trailing spaces are removed) */
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
LstGrpsIWant.GrpCods[NumGrp] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
}
|
||||
|
@ -2390,7 +2390,7 @@ static void API_GetListGrpsInAttendanceEventFromDB (struct soap *soap,
|
|||
long NumGrps;
|
||||
long NumGrp;
|
||||
long GrpCod;
|
||||
char GrpCodStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char GrpCodStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
size_t Length;
|
||||
|
||||
/***** Get list of groups *****/
|
||||
|
@ -2599,14 +2599,14 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
|||
static void API_GetLstGrpsSel (const char *Groups)
|
||||
{
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumGrp;
|
||||
|
||||
/***** Count number of groups *****/
|
||||
for (Ptr = Groups, NumGrp = 0;
|
||||
*Ptr;
|
||||
NumGrp++)
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps = NumGrp;
|
||||
|
||||
/***** Create a list of groups selected *****/
|
||||
|
@ -2623,7 +2623,7 @@ static void API_GetLstGrpsSel (const char *Groups)
|
|||
*Ptr;
|
||||
)
|
||||
{
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
Gbl.Crs.Grps.LstGrpsSel.GrpCods[NumGrp] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
if (Grp_DB_CheckIfGrpBelongsToCrs (Gbl.Crs.Grps.LstGrpsSel.GrpCods[NumGrp],Gbl.Hierarchy.Node[Hie_CRS].HieCod))
|
||||
NumGrp++;
|
||||
|
@ -3110,7 +3110,7 @@ int swad__markNotificationsAsRead (struct soap *soap,
|
|||
{
|
||||
int ReturnCode;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumNtf;
|
||||
unsigned NumNtfsMarkedAsRead = 0;
|
||||
long NtfCod;
|
||||
|
@ -3143,7 +3143,7 @@ int swad__markNotificationsAsRead (struct soap *soap,
|
|||
NumNtf++)
|
||||
{
|
||||
/* Find next string in text until comma (leading and trailing spaces are removed) */
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if ((NtfCod = Str_ConvertStrCodToLongCod (LongStr)) > 0)
|
||||
{
|
||||
/***** Mark notification as read in the database *****/
|
||||
|
@ -3815,9 +3815,9 @@ int swad__getTrivialQuestion (struct soap *soap,
|
|||
extern const char *Qst_StrAnswerTypesXML[Qst_NUM_ANS_TYPES];
|
||||
int ReturnCode;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
char DegreesStr[API_MAX_BYTES_DEGREES_STR + 1];
|
||||
char DegStr[ 1 + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1 + 1];
|
||||
char DegStr[ 1 + 1 + Cns_MAX_DIGITS_LONG + 1 + 1];
|
||||
// DegStr=", ' - number ' \0"
|
||||
long DegCod;
|
||||
bool FirstDegree = true;
|
||||
|
@ -3855,7 +3855,7 @@ int swad__getTrivialQuestion (struct soap *soap,
|
|||
while (*Ptr)
|
||||
{
|
||||
/* Find next string in text until comma (leading and trailing spaces are removed) */
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
|
||||
/* Check if degree code from string is a valid code */
|
||||
if (sscanf (LongStr,"%ld",&DegCod) == 1) // Degree code
|
||||
|
@ -4535,13 +4535,13 @@ static void API_GetListGrpsInMatchFromDB (struct soap *soap,
|
|||
long NumGrps;
|
||||
long NumGrp;
|
||||
long GrpCod;
|
||||
char GrpCodStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char GrpCodStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
size_t Length;
|
||||
|
||||
/***** Get list of groups *****/
|
||||
if ((NumGrps = Mch_DB_GetGrpCodsAssociatedToMatch (&mysql_res,MchCod))) // Groups found
|
||||
{
|
||||
Length = NumGrps * (Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1;
|
||||
Length = NumGrps * (Cns_MAX_DIGITS_LONG + 1) - 1;
|
||||
*ListGroups = soap_malloc (soap,Length + 1);
|
||||
(*ListGroups)[0] = '\0';
|
||||
|
||||
|
|
|
@ -1184,9 +1184,7 @@ void HTM_INPUT_FILE (const char *Name,const char *Accept,
|
|||
void HTM_INPUT_BUTTON (const char *Name,const char *Value,const char *Attr)
|
||||
{
|
||||
HTM_TxtF ("<input type=\"button\" name=\"%s\" value=\"%s\" class=\"INPUT_%s\"%s />",
|
||||
Name,Value,
|
||||
The_GetSuffix (),
|
||||
Attr);
|
||||
Name,Value,The_GetSuffix (),Attr);
|
||||
}
|
||||
|
||||
void HTM_INPUT_IMAGE (const char *URL,const char *Icon,const char *Title,
|
||||
|
|
|
@ -620,8 +620,7 @@ static void ID_ShowFormChangeUsrID (Usr_MeOrOther_t MeOrOther,bool IShouldFillIn
|
|||
/***** Write help text *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"CM DAT_%s\"",The_GetSuffix ());
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -645,8 +644,7 @@ static void ID_ShowFormChangeUsrID (Usr_MeOrOther_t MeOrOther,bool IShouldFillIn
|
|||
"", // Show the most recent ID
|
||||
HTM_NO_ATTR,
|
||||
"id=\"NewID\" class=\"Frm_C2_INPUT INPUT_%s\""
|
||||
" size=\"16\"",
|
||||
The_GetSuffix ());
|
||||
" size=\"16\"",The_GetSuffix ());
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (Txt_Add_this_ID);
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -81,8 +81,7 @@ static void MAC_PutFormToEditMACAddress (Act_Action_t NextAction,const char *Anc
|
|||
FuncPars (Args);
|
||||
HTM_INPUT_TEXT ("NewMAC",MAC_LENGTH_MAC_ADDRESS,((struct MAC_Pars *) Args)->MACstr,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"8\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -320,8 +320,7 @@ static void MFU_PutIconAndText (Act_Action_t Action,
|
|||
else
|
||||
HTM_IMG (URLIconSet,Act_GetIconFromAction (Action),MenuStr,
|
||||
"class=\"ICO_%s_%s\"",
|
||||
Ico_GetPreffix (Color[Gbl.Prefs.IconSet]),
|
||||
The_GetSuffix ());
|
||||
Ico_GetPreffix (Color[Gbl.Prefs.IconSet]),The_GetSuffix ());
|
||||
HTM_NBSPTxt (MenuStr);
|
||||
}
|
||||
|
||||
|
|
|
@ -2027,7 +2027,7 @@ void Att_RegisterStudentsInEvent (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrData.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrData);
|
||||
if (UsrData.UsrCod > 0) // Student exists in database
|
||||
/***** Mark student to not be removed *****/
|
||||
|
@ -2444,7 +2444,7 @@ static void Att_GetListSelectedAttCods (struct Att_Events *Events)
|
|||
unsigned NumAttEvent;
|
||||
const char *Ptr;
|
||||
long AttCod;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumGrpsInThisEvent;
|
||||
unsigned NumGrpInThisEvent;
|
||||
|
@ -2452,7 +2452,7 @@ static void Att_GetListSelectedAttCods (struct Att_Events *Events)
|
|||
unsigned NumGrpSel;
|
||||
|
||||
/***** Allocate memory for list of attendance events selected *****/
|
||||
MaxSizeListAttCodsSelected = (size_t) Events->Num * (Cns_MAX_DECIMAL_DIGITS_LONG + 1);
|
||||
MaxSizeListAttCodsSelected = (size_t) Events->Num * (Cns_MAX_DIGITS_LONG + 1);
|
||||
if ((Events->StrAttCodsSelected = malloc (MaxSizeListAttCodsSelected + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -2474,7 +2474,7 @@ static void Att_GetListSelectedAttCods (struct Att_Events *Events)
|
|||
)
|
||||
{
|
||||
/* Get next attendance event selected */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
AttCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
||||
/* Set each event in *StrAttCodsSelected as selected */
|
||||
|
@ -2861,7 +2861,7 @@ static void Att_WriteTableHeadSeveralAttEvents (struct Att_Events *Events)
|
|||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Attendance;
|
||||
unsigned NumAttEvent;
|
||||
char StrNumAttEvent[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumAttEvent[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
|
|
|
@ -621,11 +621,11 @@ void Att_DB_SetUsrAsPresent (long AttCod,long UsrCod)
|
|||
void Att_DB_SetUsrsAsPresent (long AttCod,const char *ListUsrs,bool SetOthersAsAbsent)
|
||||
{
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumCodsInList;
|
||||
char *SubQueryAllUsrs = NULL;
|
||||
char SubQueryOneUsr[1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char SubQueryOneUsr[1 + Cns_MAX_DIGITS_LONG + 1];
|
||||
Att_Present_t Present;
|
||||
size_t Length = 0; // Initialized to avoid warning
|
||||
unsigned NumUsrsPresent = 0;
|
||||
|
@ -641,10 +641,10 @@ void Att_DB_SetUsrsAsPresent (long AttCod,const char *ListUsrs,bool SetOthersAsA
|
|||
*Ptr;
|
||||
NumCodsInList++)
|
||||
/* Find next string in text until comma (leading and trailing spaces are removed) */
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
|
||||
/***** Allocate subquery used to mark not present users as absent *****/
|
||||
Length = 256 + NumCodsInList * (1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1;
|
||||
Length = 256 + NumCodsInList * (1 + Cns_MAX_DIGITS_LONG + 1) - 1;
|
||||
if ((SubQueryAllUsrs = malloc (Length + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
SubQueryAllUsrs[0] = '\0';
|
||||
|
@ -656,7 +656,7 @@ void Att_DB_SetUsrsAsPresent (long AttCod,const char *ListUsrs,bool SetOthersAsA
|
|||
{
|
||||
/* Find next string in text until comma
|
||||
(leading and trailing spaces are removed) */
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Str_GetNextStringUntilComma (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if ((UsrDat.UsrCod = Str_ConvertStrCodToLongCod (LongStr)) > 0)
|
||||
if (Usr_DB_ChkIfUsrCodExists (UsrDat.UsrCod))
|
||||
// The user must belong to course,
|
||||
|
|
|
@ -2800,7 +2800,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,Gbl.Usrs.Other.UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -9936,9 +9936,9 @@ static void Brw_WriteRowStatsFileBrowsers1 (const char *NameOfFileZones,
|
|||
Brw_FileBrowser_t FileZone,
|
||||
struct BrwSiz_SizeOfFileZone *SizeOfFileZone)
|
||||
{
|
||||
char StrNumCrss[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumGrps[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumUsrs[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumCrss[Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrNumGrps[Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrNumUsrs[Cns_MAX_DIGITS_UINT + 1];
|
||||
char FileSizeStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1];
|
||||
const char *Class = (FileZone == Brw_UNKNOWN) ? "LINE_TOP DAT_STRONG" :
|
||||
"DAT";
|
||||
|
@ -10004,8 +10004,8 @@ static void Brw_WriteRowStatsFileBrowsers2 (const char *NameOfFileZones,
|
|||
Brw_FileBrowser_t FileZone,
|
||||
struct BrwSiz_SizeOfFileZone *SizeOfFileZone)
|
||||
{
|
||||
char StrNumFoldersPerCrs[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumFilesPerCrs[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumFoldersPerCrs[Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrNumFilesPerCrs[Cns_MAX_DIGITS_UINT + 1];
|
||||
char FileSizePerCrsStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1];
|
||||
const char *Class = (FileZone == Brw_UNKNOWN) ? "LINE_TOP DAT_STRONG" :
|
||||
"DAT";
|
||||
|
@ -10057,8 +10057,8 @@ static void Brw_WriteRowStatsFileBrowsers3 (const char *NameOfFileZones,
|
|||
Brw_FileBrowser_t FileZone,
|
||||
struct BrwSiz_SizeOfFileZone *SizeOfFileZone)
|
||||
{
|
||||
char StrNumFoldersPerUsr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumFilesPerUsr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumFoldersPerUsr[Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrNumFilesPerUsr[Cns_MAX_DIGITS_UINT + 1];
|
||||
char FileSizePerUsrStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1];
|
||||
const char *Class = (FileZone == Brw_UNKNOWN) ? "LINE_TOP DAT_STRONG" :
|
||||
"DAT";
|
||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.84.1 (2024-06-13)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.84.2 (2024-06-20)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.79.js"
|
||||
/*
|
||||
Version 23.84.2: Jun 20, 2024 Code refactoring. Changed width for names in forms. (335004 lines)
|
||||
Version 23.84.1: Jun 13, 2024 Fixed bug in projects. Reported by Oresti Baños Legrán. (335287 lines)
|
||||
Version 23.84: Jun 12, 2024 HTML attributes readonly removed because it does not work in checkboxes. (335277 lines)
|
||||
Version 23.83: Jun 07, 2024 Code refactoring in HTML attributes. (335258 lines)
|
||||
|
|
|
@ -78,19 +78,19 @@ so that all calculations should be performed by the preprocessor with integers.
|
|||
|
||||
#define LOG2_x_2_11 616 // log10(2) * 2^11
|
||||
|
||||
#define Cns_MAX_DECIMAL_DIGITS_UCHAR (((sizeof (unsigned char ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_USHORT (((sizeof (unsigned short ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_UINT (((sizeof (unsigned int ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_ULONG (((sizeof (unsigned long ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_ULONGLONG (((sizeof (unsigned long long) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_UINT128 (((sizeof (unsigned __int128 ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_UCHAR (((sizeof (unsigned char ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_USHORT (((sizeof (unsigned short ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_UINT (((sizeof (unsigned int ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_ULONG (((sizeof (unsigned long ) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_ULONGLONG (((sizeof (unsigned long long) * LOG2_x_2_11) >> 8) + 1)
|
||||
#define Cns_MAX_DIGITS_UINT128 (((sizeof (unsigned __int128 ) * LOG2_x_2_11) >> 8) + 1)
|
||||
|
||||
#define Cns_MAX_DECIMAL_DIGITS_CHAR (1 + Cns_MAX_DECIMAL_DIGITS_UCHAR )
|
||||
#define Cns_MAX_DECIMAL_DIGITS_SHORT (1 + Cns_MAX_DECIMAL_DIGITS_USHORT )
|
||||
#define Cns_MAX_DECIMAL_DIGITS_INT (1 + Cns_MAX_DECIMAL_DIGITS_UINT )
|
||||
#define Cns_MAX_DECIMAL_DIGITS_LONG (1 + Cns_MAX_DECIMAL_DIGITS_ULONG )
|
||||
#define Cns_MAX_DECIMAL_DIGITS_LONGLONG (1 + Cns_MAX_DECIMAL_DIGITS_ULONGLONG)
|
||||
#define Cns_MAX_DECIMAL_DIGITS_INT128 (1 + Cns_MAX_DECIMAL_DIGITS_UINT128 )
|
||||
#define Cns_MAX_DIGITS_CHAR (1 + Cns_MAX_DIGITS_UCHAR )
|
||||
#define Cns_MAX_DIGITS_SHORT (1 + Cns_MAX_DIGITS_USHORT )
|
||||
#define Cns_MAX_DIGITS_INT (1 + Cns_MAX_DIGITS_UINT )
|
||||
#define Cns_MAX_DIGITS_LONG (1 + Cns_MAX_DIGITS_ULONG )
|
||||
#define Cns_MAX_DIGITS_LONGLONG (1 + Cns_MAX_DIGITS_ULONGLONG)
|
||||
#define Cns_MAX_DIGITS_INT128 (1 + Cns_MAX_DIGITS_UINT128 )
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Public types ********************************/
|
||||
|
|
|
@ -156,16 +156,14 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Country map */
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeIns,
|
||||
"COUNTRY_SMALL",
|
||||
"COUNTRY_MAP_SMALL");
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of pending institutions (row[1]) */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Txt (row[1]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -241,8 +239,7 @@ void Cty_ListCountries2 (void)
|
|||
|
||||
/***** Separation row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Begin ("colspan=\"8\" class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("colspan=\"8\" class=\"CM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
@ -394,60 +391,52 @@ static void Cty_ListOneCountryForSeeing (struct Hie_Node *Cty,unsigned NumCty)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Number of country in this list *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (NumCty);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Country map (and link to WWW if exists) *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s %s\"",The_GetSuffix (),BgColor);
|
||||
Cty_DrawCountryMapAndNameWithLink (Cty,ActSeeIns,
|
||||
"COUNTRY_SMALL",
|
||||
"COUNTRY_MAP_SMALL");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this country *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumUsrsWhoClaimToBelongTo (Hie_CTY,Cty));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of institutions *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_INS, // Number of institutions...
|
||||
Hie_CTY, // ...in country
|
||||
Cty->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_CTY, // ...in country
|
||||
Cty->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of degrees *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
Hie_CTY, // ...in country
|
||||
Cty->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of courses *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
Hie_CTY, // ...in country
|
||||
Cty->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users in courses *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Enr_GetCachedNumUsrsInCrss (Hie_CTY,Cty->HieCod,
|
||||
1 << Rol_STD |
|
||||
1 << Rol_NET |
|
||||
|
@ -1384,7 +1373,7 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
extern const char *Par_CodeStr[Par_NUM_PAR_COD];
|
||||
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
||||
Lan_Language_t Lan;
|
||||
char StrCtyCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char StrCtyCod[Cns_MAX_DIGITS_LONG + 1];
|
||||
char StrName[32];
|
||||
|
||||
/***** Begin form to create *****/
|
||||
|
@ -1407,16 +1396,14 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
StrCtyCod[0] = '\0';
|
||||
HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,
|
||||
HTM_REQUIRED,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"3\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||
HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->ShrtName,
|
||||
HTM_REQUIRED,
|
||||
"size=\"2\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"2\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Empty (3);
|
||||
|
|
|
@ -230,8 +230,7 @@ static void CtyCfg_Title (Hie_PutLink_t PutLink)
|
|||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" title=\"%s\""
|
||||
" class=\"FRAME_TITLE_BIG FRAME_TITLE_%s\"",
|
||||
Gbl.Hierarchy.Node[Hie_CTY].WWW,
|
||||
Gbl.Hierarchy.Node[Hie_CTY].FullName,
|
||||
The_GetSuffix ());
|
||||
Gbl.Hierarchy.Node[Hie_CTY].FullName,The_GetSuffix ());
|
||||
|
||||
/* Country name */
|
||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTY].FullName);
|
||||
|
@ -420,8 +419,7 @@ static void CtyCfg_Name (Hie_PutLink_t PutLink)
|
|||
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (PutLink == Hie_PUT_LINK)
|
||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT_STRONG_%s\"",
|
||||
Gbl.Hierarchy.Node[Hie_CTY].WWW,
|
||||
The_GetSuffix ());
|
||||
Gbl.Hierarchy.Node[Hie_CTY].WWW,The_GetSuffix ());
|
||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTY].FullName);
|
||||
if (PutLink == Hie_PUT_LINK)
|
||||
HTM_A_End ();
|
||||
|
|
|
@ -853,8 +853,7 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
HTM_INPUT_TEXT ("InsCrsCod",Hie_MAX_CHARS_INSTITUTIONAL_COD,
|
||||
Crs_EditingCrs->InstitutionalCod,
|
||||
HTM_NO_ATTR,
|
||||
"class=\"INPUT_INS_CODE INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"class=\"INPUT_INS_CODE INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Course short name and full name *****/
|
||||
|
|
|
@ -136,9 +136,9 @@ void Cry_CreateUniqueNameEncrypted (char *UniqueNameEncrypted)
|
|||
{
|
||||
static unsigned NumCall = 0; // When this function is called several times in the same execution of the program, each time a new name is created
|
||||
char UniqueNamePlain[Cns_MAX_BYTES_IP +
|
||||
Cns_MAX_DECIMAL_DIGITS_LONG +
|
||||
Cns_MAX_DECIMAL_DIGITS_LONG +
|
||||
Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
Cns_MAX_DIGITS_LONG +
|
||||
Cns_MAX_DIGITS_LONG +
|
||||
Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
NumCall++;
|
||||
snprintf (UniqueNamePlain,sizeof (UniqueNamePlain),"%s-%lx-%lx-%x",
|
||||
|
|
|
@ -900,7 +900,7 @@ void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE + 1])
|
|||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
bool TZNameIsUsable = false;
|
||||
char IntStr[Cns_MAX_DECIMAL_DIGITS_INT + 1];
|
||||
char IntStr[Cns_MAX_DIGITS_INT + 1];
|
||||
int ClientUTCMinusLocal; // Time difference between UTC time and client local time, in minutes
|
||||
|
||||
/***** 1. Get client time zone name *****/
|
||||
|
@ -936,7 +936,7 @@ void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE + 1])
|
|||
// We get client TZ difference using JavaScript getTimezoneOffset() method
|
||||
// getTimezoneOffset() returns UTC-time - browser-local-time, in minutes.
|
||||
// For example, if browser time zone is GMT+2, -120 will be returned.
|
||||
Par_GetParText ("BrowserTZDiff",IntStr,Cns_MAX_DECIMAL_DIGITS_INT);
|
||||
Par_GetParText ("BrowserTZDiff",IntStr,Cns_MAX_DIGITS_INT);
|
||||
if (sscanf (IntStr,"%d",&ClientUTCMinusLocal) != 1)
|
||||
ClientUTCMinusLocal = 0;
|
||||
|
||||
|
|
|
@ -114,8 +114,7 @@ void DegTyp_WriteSelectorDegTypes (long SelectedDegTypCod)
|
|||
/* List degree types */
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||
"id=\"OthDegTypCod\" name=\"OthDegTypCod\""
|
||||
" class=\"Frm_C2_INPUT INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
" class=\"Frm_C2_INPUT INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
(SelectedDegTypCod <= 0) ? HTM_SELECTED :
|
||||
HTM_NO_ATTR,
|
||||
|
@ -326,20 +325,17 @@ static void DegTyp_ListDegTypesForSeeing (const struct DegTyp_DegTypes *DegTypes
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Number of degree type in this list */
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (NumDegTyp + 1);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Name of degree type */
|
||||
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Txt (DegTypes->Lst[NumDegTyp].DegTypName);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of degrees of this type */
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (DegTypes->Lst[NumDegTyp].NumDegs);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -472,8 +468,7 @@ static void DegTyp_PutFormToCreateDegreeType (void)
|
|||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName,
|
||||
HTM_REQUIRED,
|
||||
"size=\"25\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"25\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of degrees of this degree type ****/
|
||||
|
|
|
@ -187,8 +187,7 @@ void Dpt_SeeAllDepts (void)
|
|||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT_%s\"",
|
||||
Departments.Lst[NumDpt].WWW,
|
||||
The_GetSuffix ());
|
||||
Departments.Lst[NumDpt].WWW,The_GetSuffix ());
|
||||
HTM_Txt (Departments.Lst[NumDpt].FullName);
|
||||
HTM_A_End ();
|
||||
HTM_TD_End ();
|
||||
|
@ -200,8 +199,7 @@ void Dpt_SeeAllDepts (void)
|
|||
|
||||
/***** Separation row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Begin ("colspan=\"3\" class=\"DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("colspan=\"3\" class=\"DAT_%s\"",The_GetSuffix ());
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -170,8 +170,7 @@ void Dup_ListDuplicateUsrs (void)
|
|||
|
||||
HTM_TD_Begin ("colspan=\"%u\" class=\"LM DAT_%s %s\"",
|
||||
Usr_NUM_MAIN_FIELDS_DATA_USR - 2,
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
|
||||
/* Write number of informants (row[1]) if greater than 1 */
|
||||
if (sscanf (row[1],"%u",&NumInformants) != 1)
|
||||
|
|
|
@ -364,8 +364,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncPars) (v
|
|||
HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",
|
||||
HTM_REQUIRED,
|
||||
"id=\"OtherUsrIDNickOrEMail\" size=\"16\""
|
||||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
|
||||
/***** Send button*****/
|
||||
Btn_PutConfirmButton (Txt_Continue);
|
||||
|
@ -2257,8 +2256,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Number *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumReqs - NumReq);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2281,8 +2279,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of teachers in the course *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Enr_GetNumUsrsInCrss (Hie_CRS,Crs.HieCod,
|
||||
1 << Rol_TCH));
|
||||
HTM_TD_End ();
|
||||
|
@ -2295,16 +2292,14 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** User name *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"REQUESTER_NAME\""); // Limited width
|
||||
Usr_WriteFirstNameBRSurnames (&UsrDat);
|
||||
HTM_DIV_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Requested role (row[3]) *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_ROLES_SINGUL_abc[DesiredRole][UsrDat.Sex]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2313,8 +2308,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
"DAT",The_GetColorRows ());
|
||||
|
||||
/***** Button to confirm the request *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
||||
if (!NextAction[DesiredRole])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginForm (NextAction[DesiredRole]);
|
||||
|
@ -2325,8 +2319,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Button to reject the request *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
||||
Frm_BeginForm (ActReqRejSignUp);
|
||||
ParCod_PutPar (ParCod_Crs,Crs.HieCod);
|
||||
Usr_PutParUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
|
|
|
@ -378,12 +378,12 @@ unsigned Enr_DB_GetNumCrssOfUsrWithARoleNotAccepted (long UsrCod,Rol_Role_t Role
|
|||
/****** Get number of users with some given roles in courses of a user *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Enr_DB_MAX_BYTES_ROLES_STR (Rol_NUM_ROLES * (Cns_MAX_DECIMAL_DIGITS_UINT + 1))
|
||||
#define Enr_DB_MAX_BYTES_ROLES_STR (Rol_NUM_ROLES * (Cns_MAX_DIGITS_UINT + 1))
|
||||
unsigned Enr_DB_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole,
|
||||
unsigned OthersRoles)
|
||||
{
|
||||
Rol_Role_t Role;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
char OthersRolesStr[Enr_DB_MAX_BYTES_ROLES_STR + 1];
|
||||
char SubQueryRole[64];
|
||||
unsigned NumUsrs;
|
||||
|
@ -454,7 +454,7 @@ unsigned Enr_DB_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole,
|
|||
unsigned Enr_DB_GetNumUsrsInCrss (Hie_Level_t Level,long Cod,unsigned Roles,
|
||||
bool AnyUserInCourses)
|
||||
{
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
char SubQueryRoles[Enr_DB_MAX_BYTES_SUBQUERY_ROLES + 1];
|
||||
bool FirstRole;
|
||||
bool MoreThanOneRole;
|
||||
|
|
|
@ -811,10 +811,10 @@ void Exa_GetListSelectedExaCods (struct Exa_Exams *Exams)
|
|||
unsigned NumExam;
|
||||
const char *Ptr;
|
||||
long ExaCod;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Allocate memory for list of exams selected *****/
|
||||
MaxSizeListExaCodsSelected = Exams->Num * (Cns_MAX_DECIMAL_DIGITS_LONG + 1);
|
||||
MaxSizeListExaCodsSelected = Exams->Num * (Cns_MAX_DIGITS_LONG + 1);
|
||||
if ((Exams->ExaCodsSelected = malloc (MaxSizeListExaCodsSelected + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -838,7 +838,7 @@ void Exa_GetListSelectedExaCods (struct Exa_Exams *Exams)
|
|||
)
|
||||
{
|
||||
/* Get next exam selected */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
ExaCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
||||
/* Set each exam in *StrExaCodsSelected as selected */
|
||||
|
|
|
@ -320,8 +320,7 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print)
|
|||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
UsrCouldAnswer ? "DAT_SMALL" :
|
||||
"DAT_SMALL_LIGHT",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (NumClick + 1);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -329,9 +328,7 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print)
|
|||
if (asprintf (&Id,"click_date_%u",NumClick) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"",
|
||||
Id,
|
||||
Class[Action],The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Id,Class[Action],The_GetSuffix (),The_GetColorRows ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,ClickTimeUTC,
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -345,15 +342,13 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print)
|
|||
|
||||
/* Write action */
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
|
||||
Class[Action],The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Class[Action],The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_EXAM_LOG_ACTIONS[Action]);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write number of question */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
Class[Action],The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Class[Action],The_GetSuffix (),The_GetColorRows ());
|
||||
if (QstInd >= 0)
|
||||
HTM_Unsigned ((unsigned) QstInd + 1);
|
||||
HTM_TD_End ();
|
||||
|
@ -362,16 +357,14 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print)
|
|||
HTM_TD_Begin ("class=\"CT %s_%s %s\"",
|
||||
UsrCouldAnswer ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (UsrCouldAnswer ? "✓" :
|
||||
"✗");
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write IP */
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
|
||||
Class[Action],The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Class[Action],The_GetSuffix (),The_GetColorRows ());
|
||||
Length = strlen (IP);
|
||||
if (Length > 6)
|
||||
{
|
||||
|
|
|
@ -450,7 +450,7 @@ static void ExaPrn_GenerateChoiceIndexes (struct TstPrn_PrintedQuestion *Printed
|
|||
MYSQL_ROW row;
|
||||
unsigned Index;
|
||||
bool ErrorInIndex;
|
||||
char StrInd[1 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrInd[1 + Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Create test question *****/
|
||||
Qst_QstConstructor (&Question);
|
||||
|
@ -621,8 +621,7 @@ static void ExaPrn_GetAndWriteDescription (long ExaCod)
|
|||
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
|
||||
/***** Write description *****/
|
||||
HTM_DIV_Begin ("class=\"EXA_PRN_DESC DAT_SMALL_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"EXA_PRN_DESC DAT_SMALL_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt);
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
@ -764,7 +763,7 @@ static void ExaPrn_WriteIntAnsToFill (const struct ExaPrn_Print *Print,
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (Id,sizeof (Id),"Ans%010u",QstInd);
|
||||
|
@ -783,7 +782,7 @@ static void ExaPrn_WriteFltAnsToFill (const struct ExaPrn_Print *Print,
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (Id,sizeof (Id),"Ans%010u",QstInd);
|
||||
|
@ -804,7 +803,7 @@ static void ExaPrn_WriteTF_AnsToFill (const struct ExaPrn_Print *Print,
|
|||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
extern const char *Txt_TF_QST[2];
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write selector for the answer *****/
|
||||
/* Initially user has not answered the question ==> initially all answers will be blank.
|
||||
|
@ -840,7 +839,7 @@ static void ExaPrn_WriteChoAnsToFill (const struct ExaPrn_Print *Print,
|
|||
unsigned NumOpt;
|
||||
unsigned Indexes[Qst_MAX_OPTIONS_PER_QUESTION]; // Indexes of all answers of this question
|
||||
HTM_Attributes_t UsrAnswers[Qst_MAX_OPTIONS_PER_QUESTION];
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Change format of answers text *****/
|
||||
Qst_ChangeFormatAnswersText (Question);
|
||||
|
@ -911,7 +910,7 @@ static void ExaPrn_WriteTxtAnsToFill (const struct ExaPrn_Print *Print,
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (Id,sizeof (Id),"Ans%010u",QstInd);
|
||||
|
|
|
@ -353,7 +353,7 @@ static void ExaRes_ListAllResultsInSelectedExams (struct Exa_Exams *Exams)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,Gbl.Usrs.Other.UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -595,8 +595,7 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"CT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_INPUT_CHECKBOX (Par_CodeStr[ParCod_Exa],
|
||||
Exams->Lst[NumExam].Checked,
|
||||
"id=\"Gam%u\" value=\"%ld\"",
|
||||
|
@ -604,16 +603,14 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_LABEL_Begin ("for=\"Gam%u\"",NumExam);
|
||||
HTM_UnsignedColon (NumExam + 1);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Exams->Exam.Title);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -705,10 +702,10 @@ static void ExaRes_BuildExamsSelectedCommas (struct Exa_Exams *Exams,
|
|||
{
|
||||
size_t MaxLength;
|
||||
unsigned NumExam;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Allocate memory for subquery of exams selected *****/
|
||||
MaxLength = (size_t) Exams->NumSelected * (Cns_MAX_DECIMAL_DIGITS_LONG + 1);
|
||||
MaxLength = (size_t) Exams->NumSelected * (Cns_MAX_DIGITS_LONG + 1);
|
||||
if ((*ExamsSelectedCommas = malloc (MaxLength + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -813,8 +810,7 @@ static void ExaRes_ShowResults (struct Exa_Exams *Exams,
|
|||
if (asprintf (&Id,"exa_res_time_%u_%u",(unsigned) StartEndTime,UniqueId) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_TD_Begin ("id =\"%s\" class=\"LT DAT_%s %s\"",
|
||||
Id,The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Id,The_GetSuffix (),The_GetColorRows ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,Print.TimeUTC[StartEndTime],
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -1135,23 +1131,20 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Row title *****/
|
||||
HTM_TD_Begin ("colspan=\"3\" class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtColonNBSP (Txt_Sessions);
|
||||
HTM_Unsigned (NumResults);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total number of questions *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (NumTotalQsts->All);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total number of valid questions *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_GREEN_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Total)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Total);
|
||||
else
|
||||
|
@ -1160,8 +1153,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write total number of invalid questions *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_RED_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
NumTotalQstsInvalid = NumTotalQsts->All - NumTotalQsts->Valid.Total;
|
||||
if (NumTotalQstsInvalid)
|
||||
HTM_Unsigned (NumTotalQstsInvalid);
|
||||
|
@ -1171,8 +1163,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write number of correct questions *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Correct)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Correct);
|
||||
else
|
||||
|
@ -1181,8 +1172,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write number of wrong questions *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Wrong.Negative)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Wrong.Negative);
|
||||
else
|
||||
|
@ -1190,8 +1180,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Wrong.Zero)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Wrong.Zero);
|
||||
else
|
||||
|
@ -1199,8 +1188,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Wrong.Positive)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Wrong.Positive);
|
||||
else
|
||||
|
@ -1209,8 +1197,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write number of blank questions *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumTotalQsts->Valid.Blank)
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Blank);
|
||||
else
|
||||
|
@ -1219,8 +1206,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write total valid score *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (TotalScore->Valid);
|
||||
HTM_Txt ("/");
|
||||
HTM_Unsigned (NumTotalQsts->Valid.Total);
|
||||
|
@ -1228,8 +1214,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write average valid score per valid question *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (NumTotalQsts->Valid.Total ? TotalScore->Valid /
|
||||
(double) NumTotalQsts->Valid.Total :
|
||||
0.0);
|
||||
|
@ -1238,15 +1223,13 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write total grade *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (TotalGrade);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Last cell *****/
|
||||
HTM_TD_Begin ("class=\"DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -1608,16 +1591,14 @@ static void ExaRes_ShowExamResultTime (struct ExaPrn_Print *Print)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Label *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_START_END_TIME[StartEndTime]);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Time *****/
|
||||
if (asprintf (&Id,"match_%u",(unsigned) StartEndTime) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"LB DAT_%s\"",
|
||||
Id,The_GetSuffix ());
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"LB DAT_%s\"",Id,The_GetSuffix ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,Print->TimeUTC[StartEndTime],
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -1977,8 +1958,7 @@ static void ExaRes_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
|||
/* Write score retrieved from database */
|
||||
if (ICanView[TstVis_VISIBLE_EACH_QST_SCORE] == Usr_CAN)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"LM DAT_SMALL_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"LM DAT_SMALL_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Score);
|
||||
HTM_SPAN_Begin ("class=\"%s_%s\"",
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] ?
|
||||
|
|
|
@ -68,7 +68,7 @@ extern struct Globals Gbl;
|
|||
/*****************************************************************************/
|
||||
|
||||
#define ExaSet_MAX_SELECTED_QUESTIONS 10000
|
||||
#define ExaSet_MAX_BYTES_LIST_SELECTED_QUESTIONS (ExaSet_MAX_SELECTED_QUESTIONS * (Cns_MAX_DECIMAL_DIGITS_LONG + 1))
|
||||
#define ExaSet_MAX_BYTES_LIST_SELECTED_QUESTIONS (ExaSet_MAX_SELECTED_QUESTIONS * (Cns_MAX_DIGITS_LONG + 1))
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private prototypes ****************************/
|
||||
|
@ -1097,7 +1097,7 @@ void ExaSet_AddQstsToSet (void)
|
|||
struct Exa_Exams Exams;
|
||||
struct ExaSet_Set Set;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
long QstCod;
|
||||
|
||||
/***** Reset exams context *****/
|
||||
|
@ -1128,7 +1128,7 @@ void ExaSet_AddQstsToSet (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
/* Get next code */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (sscanf (LongStr,"%ld",&QstCod) != 1)
|
||||
Err_WrongQuestionExit ();
|
||||
|
||||
|
@ -1439,7 +1439,7 @@ void ExaSet_ReqRemQstFromSet (void)
|
|||
struct Exa_Exams Exams;
|
||||
struct ExaSet_Set Set;
|
||||
char *Anchor;
|
||||
char StrQstCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char StrQstCod[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Reset exams context *****/
|
||||
Exa_ResetExams (&Exams);
|
||||
|
|
|
@ -389,8 +389,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct Usr_Data *UsrDat,
|
|||
}
|
||||
|
||||
/***** Text *****/
|
||||
HTM_DIV_Begin ("class=\"FORM_OUT_%s%s\"",
|
||||
The_GetSuffix (),
|
||||
HTM_DIV_Begin ("class=\"FORM_OUT_%s%s\"",The_GetSuffix (),
|
||||
(Gbl.Action.Act == Action) ? " BOLD" :
|
||||
"");
|
||||
if (NumUsrs)
|
||||
|
@ -921,7 +920,7 @@ static void Fol_GetFollowedFromSelectedUsrs (unsigned *NumFollowed,
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Gbl.Usrs.Me.UsrDat.UsrCod != UsrDat.UsrCod) // Skip me
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
|
||||
|
@ -969,7 +968,7 @@ void Fol_FollowUsrs ()
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Gbl.Usrs.Me.UsrDat.UsrCod != UsrDat.UsrCod) // Skip me
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get user's data from database
|
||||
|
@ -1018,7 +1017,7 @@ void Fol_UnfollowUsrs (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Gbl.Usrs.Me.UsrDat.UsrCod != UsrDat.UsrCod) // Skip me
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get user's data from database
|
||||
|
|
|
@ -340,11 +340,9 @@ void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label)
|
|||
if (Id)
|
||||
{
|
||||
if (Id[0])
|
||||
HTM_LABEL_Begin ("for=\"%s\" class=\"FORM_IN_%s\"",
|
||||
Id,The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("for=\"%s\" class=\"FORM_IN_%s\"",Id,The_GetSuffix ());
|
||||
else
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
}
|
||||
else
|
||||
HTM_LABEL_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
|
||||
|
|
|
@ -2872,8 +2872,7 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
|
|||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
if (asprintf (&ClassInput,"FOR_MED_INPUT INPUT_%s",
|
||||
The_GetSuffix ()) < 0)
|
||||
if (asprintf (&ClassInput,"FOR_MED_INPUT INPUT_%s",The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Med_PutMediaUploader (-1,ClassInput);
|
||||
free (ClassInput);
|
||||
|
|
16
swad_game.c
16
swad_game.c
|
@ -73,7 +73,7 @@ extern struct Globals Gbl;
|
|||
#define Gam_MAX_ANSWERS_PER_QUESTION 10
|
||||
|
||||
#define Gam_MAX_SELECTED_QUESTIONS 10000
|
||||
#define Gam_MAX_BYTES_LIST_SELECTED_QUESTIONS (Gam_MAX_SELECTED_QUESTIONS * (Cns_MAX_DECIMAL_DIGITS_LONG + 1))
|
||||
#define Gam_MAX_BYTES_LIST_SELECTED_QUESTIONS (Gam_MAX_SELECTED_QUESTIONS * (Cns_MAX_DIGITS_LONG + 1))
|
||||
|
||||
/* Score range [0...max.score]
|
||||
will be converted to
|
||||
|
@ -883,7 +883,7 @@ void Gam_GetListSelectedGamCods (struct Gam_Games *Games)
|
|||
unsigned NumGame;
|
||||
const char *Ptr;
|
||||
long GamCod;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Default selected *****/
|
||||
Games->NumSelected = 0;
|
||||
|
@ -893,7 +893,7 @@ void Gam_GetListSelectedGamCods (struct Gam_Games *Games)
|
|||
return;
|
||||
|
||||
/***** Allocate memory for list of games selected *****/
|
||||
MaxSizeListGamCodsSelected = Games->Num * (Cns_MAX_DECIMAL_DIGITS_LONG + 1);
|
||||
MaxSizeListGamCodsSelected = Games->Num * (Cns_MAX_DIGITS_LONG + 1);
|
||||
if ((Games->GamCodsSelected = malloc (MaxSizeListGamCodsSelected + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -916,7 +916,7 @@ void Gam_GetListSelectedGamCods (struct Gam_Games *Games)
|
|||
)
|
||||
{
|
||||
/* Get next game selected */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
GamCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
||||
/* Set each game in *StrGamCodsSelected as selected */
|
||||
|
@ -1694,7 +1694,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Gam_Games *Games,
|
|||
struct Qst_Question Question;
|
||||
unsigned QstInd;
|
||||
unsigned MaxQstInd;
|
||||
char StrQstInd[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrQstInd[Cns_MAX_DIGITS_UINT + 1];
|
||||
bool QuestionExists;
|
||||
char *Anchor = NULL;
|
||||
|
||||
|
@ -1825,7 +1825,7 @@ void Gam_AddQstsToGame (void)
|
|||
extern const char *Txt_X_questions_have_been_added;
|
||||
struct Gam_Games Games;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
long QstCod;
|
||||
unsigned MaxQstInd;
|
||||
unsigned NumQstsAdded;
|
||||
|
@ -1862,7 +1862,7 @@ void Gam_AddQstsToGame (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
/* Get next code */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (sscanf (LongStr,"%ld",&QstCod) != 1)
|
||||
Err_WrongQuestionExit ();
|
||||
|
||||
|
@ -1936,7 +1936,7 @@ void Gam_ReqRemQstFromGame (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_question_X;
|
||||
struct Gam_Games Games;
|
||||
unsigned QstInd;
|
||||
char StrQstInd[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrQstInd[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Reset games context *****/
|
||||
Gam_ResetGames (&Games);
|
||||
|
|
55
swad_group.c
55
swad_group.c
|
@ -131,7 +131,7 @@ static void Grp_AskConfirmRemGrp (void);
|
|||
static void Grp_RemoveGroupTypeCompletely (void);
|
||||
static void Grp_RemoveGroupCompletely (void);
|
||||
|
||||
static void Grp_WriteMaxStds (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned MaxStudents);
|
||||
static void Grp_WriteMaxStds (char Str[Cns_MAX_DIGITS_UINT + 1],unsigned MaxStudents);
|
||||
static void Grp_PutParGrpTypCod (void *GrpTypCod);
|
||||
static void Grp_PutParGrpCod (void *GrpCod);
|
||||
|
||||
|
@ -457,7 +457,7 @@ void Grp_PutParsCodGrps (void)
|
|||
unsigned NumGrpSel;
|
||||
size_t MaxLengthGrpCods;
|
||||
char *GrpCods;
|
||||
char GrpCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char GrpCod[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Write the boolean parameter that indicates if all groups must be listed *****/
|
||||
Par_PutParChar ("AllGroups",
|
||||
|
@ -468,7 +468,7 @@ void Grp_PutParsCodGrps (void)
|
|||
if (!Gbl.Crs.Grps.AllGrps &&
|
||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
||||
{
|
||||
MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1;
|
||||
MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (Cns_MAX_DIGITS_LONG + 1) - 1;
|
||||
if ((GrpCods = malloc (MaxLengthGrpCods + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
GrpCods[0] = '\0';
|
||||
|
@ -548,7 +548,7 @@ void Grp_GetParCodsSeveralGrps (void)
|
|||
{
|
||||
char *ParLstCodGrps;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumGrp;
|
||||
unsigned long MaxSizeLstGrpCods;
|
||||
|
||||
|
@ -557,7 +557,7 @@ void Grp_GetParCodsSeveralGrps (void)
|
|||
|
||||
if (Gbl.Crs.Grps.NumGrps) // If course has groups
|
||||
{
|
||||
MaxSizeLstGrpCods = ((Cns_MAX_DECIMAL_DIGITS_LONG + 1) * Gbl.Crs.Grps.NumGrps) - 1;
|
||||
MaxSizeLstGrpCods = ((Cns_MAX_DIGITS_LONG + 1) * Gbl.Crs.Grps.NumGrps) - 1;
|
||||
|
||||
/***** Allocate memory for the list of group codes selected *****/
|
||||
if ((ParLstCodGrps = malloc (MaxSizeLstGrpCods + 1)) == NULL)
|
||||
|
@ -574,7 +574,7 @@ void Grp_GetParCodsSeveralGrps (void)
|
|||
for (Ptr = ParLstCodGrps, NumGrp = 0;
|
||||
*Ptr;
|
||||
NumGrp++)
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps = NumGrp;
|
||||
|
||||
if (Gbl.Crs.Grps.LstGrpsSel.NumGrps) // If I have selected groups...
|
||||
|
@ -587,7 +587,7 @@ void Grp_GetParCodsSeveralGrps (void)
|
|||
*Ptr;
|
||||
NumGrp++)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
Gbl.Crs.Grps.LstGrpsSel.GrpCods[NumGrp] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
}
|
||||
|
@ -1417,7 +1417,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
unsigned NumRoo;
|
||||
const struct Roo_Room *Roo;
|
||||
Rol_Role_t Role;
|
||||
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrMaxStudents[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
@ -1563,7 +1563,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
Frm_BeginFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
|
||||
ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
|
||||
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -2325,7 +2325,7 @@ static void Grp_WriteRowGrp (const struct Group *Grp,Lay_Highlight_t Highlight)
|
|||
char *Title;
|
||||
int Vacant;
|
||||
Rol_Role_t Role;
|
||||
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrMaxStudents[Cns_MAX_DIGITS_UINT + 1];
|
||||
static const char *HighlightClass[Lay_NUM_HIGHLIGHT] =
|
||||
{
|
||||
[Lay_NO_HIGHLIGHT] = "",
|
||||
|
@ -2436,8 +2436,7 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
||||
Gbl.Crs.Grps.GrpTyp.GrpTypName,
|
||||
HTM_REQUIRED,
|
||||
"size=\"12\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"12\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Is it mandatory to register in any groups of this type? *****/
|
||||
|
@ -2504,8 +2503,7 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of groups of this type *****/
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0); // It's a new group type ==> 0 groups
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2534,7 +2532,7 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
unsigned NumRoo;
|
||||
const struct Roo_Room *Roo;
|
||||
Rol_Role_t Role;
|
||||
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrMaxStudents[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Begin section *****/
|
||||
HTM_SECTION_Begin (Grp_NEW_GROUP_SECTION_ID);
|
||||
|
@ -2590,8 +2588,7 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName,
|
||||
HTM_REQUIRED,
|
||||
"size=\"20\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"20\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room *****/
|
||||
|
@ -2635,8 +2632,7 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
Role >= Rol_STD;
|
||||
Role--)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
@ -2644,10 +2640,9 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
/***** Maximum number of students *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_NO_ATTR,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"3\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
@ -3983,10 +3978,10 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
/************* Write the maximum number of students in a group ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Grp_WriteMaxStds (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned MaxStudents)
|
||||
static void Grp_WriteMaxStds (char Str[Cns_MAX_DIGITS_UINT + 1],unsigned MaxStudents)
|
||||
{
|
||||
if (MaxStudents <= Grp_MAX_STUDENTS_IN_A_GROUP)
|
||||
snprintf (Str,Cns_MAX_DECIMAL_DIGITS_UINT + 1,"%u",MaxStudents);
|
||||
snprintf (Str,Cns_MAX_DIGITS_UINT + 1,"%u",MaxStudents);
|
||||
else
|
||||
Str[0] = '\0';
|
||||
}
|
||||
|
@ -4178,8 +4173,8 @@ static void Grp_PutParGrpCod (void *GrpCod)
|
|||
void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
||||
{
|
||||
unsigned NumGrpTyp;
|
||||
char Par[6 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char Par[6 + Cns_MAX_DIGITS_LONG + 1];
|
||||
char LongStr[1 + Cns_MAX_DIGITS_LONG + 1];
|
||||
char **LstStrCodGrps;
|
||||
const char *Ptr;
|
||||
unsigned NumGrpWanted;
|
||||
|
@ -4197,21 +4192,21 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
{
|
||||
/***** Allocate memory for the list of group codes of this type *****/
|
||||
if ((LstStrCodGrps[NumGrpTyp] = malloc (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps *
|
||||
(Cns_MAX_DECIMAL_DIGITS_LONG + 1))) == NULL)
|
||||
(Cns_MAX_DIGITS_LONG + 1))) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Get the multiple parameter code of group of this type *****/
|
||||
snprintf (Par,sizeof (Par),"GrpCod%ld",
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Par_GetParMultiToText (Par,LstStrCodGrps[NumGrpTyp],
|
||||
((Cns_MAX_DECIMAL_DIGITS_LONG + 1) * Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) - 1);
|
||||
((Cns_MAX_DIGITS_LONG + 1) * Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) - 1);
|
||||
if (LstStrCodGrps[NumGrpTyp][0])
|
||||
{
|
||||
/***** Count the number of groups selected of this type of LstCodGrps[NumGrpTyp] *****/
|
||||
for (Ptr = LstStrCodGrps[NumGrpTyp], NumGrpWanted = 0;
|
||||
*Ptr;
|
||||
NumGrpWanted++)
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
|
||||
/***** Add the number of groups selected of this type to the number of groups selected total *****/
|
||||
LstGrpsWanted->NumGrps += NumGrpWanted;
|
||||
|
@ -4236,7 +4231,7 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
*Ptr;
|
||||
NumGrpWanted++)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
LstGrpsWanted->GrpCods[NumGrpWanted] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
/* Free memory used by the list of group codes of this type */
|
||||
|
|
|
@ -644,9 +644,7 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
|
|||
|
||||
/***** Write institution, center, degree *****/
|
||||
HTM_TD_Begin ("colspan=\"%u\" class=\"LT DAT_SMALL_NOBR_%s %s\"",
|
||||
ColSpan - 1,
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
ColSpan - 1,The_GetSuffix (),The_GetColorRows ());
|
||||
|
||||
/* Get next institution, center, degree */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
@ -738,8 +736,7 @@ void Hie_WriteStatusCell (Hie_Status_t Status,
|
|||
{
|
||||
Hie_StatusTxt_t StatusTxt = Hie_GetStatusTxtFromStatusBits (Status);
|
||||
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
|
||||
Class,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",Class,The_GetSuffix (),BgColor);
|
||||
if (StatusTxt != Hie_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
HTM_Txt (Txt[StatusTxt]);
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -175,8 +175,7 @@ void HieCfg_WWW (Vie_ViewType_t ViewType,Frm_PutForm_t PutForm,
|
|||
HTM_DIV_Begin ("class=\"EXTERNAL_WWW_FULL\"");
|
||||
if (ViewType == Vie_VIEW)
|
||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||
" class=\"DAT_%s\"",
|
||||
WWW,The_GetSuffix ());
|
||||
" class=\"DAT_%s\"",WWW,The_GetSuffix ());
|
||||
HTM_Txt (WWW);
|
||||
if (ViewType == Vie_VIEW)
|
||||
HTM_A_End ();
|
||||
|
@ -218,22 +217,17 @@ void HieCfg_Shortcut (Vie_ViewType_t ViewType,ParCod_Param_t ParCode,long HieCod
|
|||
{
|
||||
if (ParCode == ParCod_None)
|
||||
HTM_A_Begin ("href=\"%s/\" target=\"_blank\" class=\"DAT_%s\"",
|
||||
Cfg_URL_SWAD_CGI,
|
||||
The_GetSuffix ());
|
||||
Cfg_URL_SWAD_CGI,The_GetSuffix ());
|
||||
else
|
||||
HTM_A_Begin ("href=\"%s/?%s=%ld\" target=\"_blank\""
|
||||
" class=\"DAT_%s\"",
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Par_CodeStr[ParCode],HieCod,
|
||||
The_GetSuffix ());
|
||||
Par_CodeStr[ParCode],HieCod,The_GetSuffix ());
|
||||
}
|
||||
if (ParCode == ParCod_None)
|
||||
HTM_TxtF ("%s/",
|
||||
Cfg_URL_SWAD_CGI);
|
||||
HTM_TxtF ("%s/",Cfg_URL_SWAD_CGI);
|
||||
else
|
||||
HTM_TxtF ("%s/?%s=%ld",
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Par_CodeStr[ParCode],HieCod);
|
||||
HTM_TxtF ("%s/?%s=%ld",Cfg_URL_SWAD_CGI,Par_CodeStr[ParCode],HieCod);
|
||||
if (ViewType == Vie_VIEW)
|
||||
HTM_A_End ();
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -963,8 +963,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
|||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
||||
HTM_REQUIRED,
|
||||
"size=\"20\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
"size=\"20\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Empty (1);
|
||||
|
|
142
swad_indicator.c
142
swad_indicator.c
|
@ -305,7 +305,7 @@ static void Ind_GetParNumIndicators (struct Ind_Indicators *Indicators)
|
|||
{
|
||||
unsigned Ind;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
long Indicator;
|
||||
|
||||
/***** Get parameter multiple with list of indicators selected *****/
|
||||
|
@ -326,7 +326,7 @@ static void Ind_GetParNumIndicators (struct Ind_Indicators *Indicators)
|
|||
)
|
||||
{
|
||||
/* Get next indicator selected */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
Indicator = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
||||
/* Set each indicator in list StrIndicatorsSelected as selected */
|
||||
|
@ -513,8 +513,7 @@ static void Ind_ShowNumCoursesWithIndicators (const struct Ind_Indicators *Indic
|
|||
HTM_TD_LINE_TOP_Txt (Txt_Total);
|
||||
HTM_TD_LINE_TOP_Unsigned (NumCrss);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",The_GetSuffix ());
|
||||
HTM_TxtF ("(%.1f%%)",100.0);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -711,8 +710,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[0]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -720,8 +718,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[1]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -729,14 +726,12 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[3]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_A_Begin ("href=\"%s/?crs=%ld&act=%ld\" target=\"_blank\"",
|
||||
Cfg_URL_SWAD_CGI,CrsCod,ActCod);
|
||||
HTM_TxtF ("%s/?crs=%ld&act=%ld",
|
||||
|
@ -748,77 +743,66 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumIndicators);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsSyllabus)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsSyllabus)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereAreAssignments)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereAreAssignments)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsOnlineTutoring)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsOnlineTutoring)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereAreMaterials)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereAreMaterials)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsAssessment)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsAssessment)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -839,8 +823,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[0]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -848,8 +831,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[1]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -857,14 +839,12 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (row[3]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_A_Begin ("href=\"%s/?crs=%ld&act=%ld\" target=\"_blank\"",
|
||||
Cfg_URL_SWAD_CGI,CrsCod,ActCod);
|
||||
HTM_TxtF ("%s/?crs=%ld&act=%ld",
|
||||
|
@ -875,16 +855,14 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
NumTchs ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (NumTchs);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
NumStds ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (NumStds);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -892,21 +870,18 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
IndicatorsCrs.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(IndicatorsCrs.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumIndicators);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsSyllabus)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsSyllabus)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -914,37 +889,32 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
(IndicatorsCrs.SyllabusLecSrc != Inf_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.SyllabusLecSrc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
(IndicatorsCrs.SyllabusPraSrc != Inf_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.SyllabusPraSrc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
(IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.TeachingGuideSrc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereAreAssignments)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereAreAssignments)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -952,37 +922,32 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumAssignments ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumAssignments);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumFilesAssignments ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumFilesAssignments);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumFilesWorks ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumFilesWorks);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsOnlineTutoring)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsOnlineTutoring)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -990,37 +955,32 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"RM %s_%s %s RM\"",
|
||||
IndicatorsCrs.NumThreads ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumThreads);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumPosts ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumPosts);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumMsgsSentByTchs ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumMsgsSentByTchs);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereAreMaterials)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereAreMaterials)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -1028,29 +988,25 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumFilesInDocumentZones ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumFilesInDocumentZones);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
IndicatorsCrs.NumFilesInSharedZones ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (IndicatorsCrs.NumFilesInSharedZones);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_GREEN_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (IndicatorsCrs.ThereIsAssessment)
|
||||
HTM_Txt (Txt_YES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CM DAT_SMALL_RED_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (!IndicatorsCrs.ThereIsAssessment)
|
||||
HTM_Txt (Txt_NO);
|
||||
HTM_TD_End ();
|
||||
|
@ -1058,16 +1014,14 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
(IndicatorsCrs.AssessmentSrc != Inf_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.AssessmentSrc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
(IndicatorsCrs.TeachingGuideSrc != Inf_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[IndicatorsCrs.TeachingGuideSrc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
12
swad_info.c
12
swad_info.c
|
@ -901,8 +901,7 @@ void Inf_FormsToSelSendInfo (void)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Select info source */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s%s\"",
|
||||
The_GetSuffix (),
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s%s\"",The_GetSuffix (),
|
||||
InfoSrc == FromDB.Src ? " BG_HIGHLIGHT" :
|
||||
"");
|
||||
Frm_BeginForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]);
|
||||
|
@ -1417,8 +1416,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
|||
break;
|
||||
}
|
||||
|
||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",The_GetSuffix ());
|
||||
|
||||
/***** Store text into a temporary .md file in HTML output directory *****/
|
||||
// TODO: change to another directory?
|
||||
|
@ -1572,8 +1570,7 @@ void Inf_EditPlainTxtInfo (void)
|
|||
Lay_HelpPlainEditor ();
|
||||
HTM_TEXTAREA_Begin (HTM_NO_ATTR,
|
||||
"name=\"Txt\" cols=\"80\" rows=\"20\""
|
||||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (TxtHTML);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -1656,8 +1653,7 @@ void Inf_EditRichTxtInfo (void)
|
|||
Lay_HelpRichEditor ();
|
||||
HTM_TEXTAREA_Begin (HTM_NO_ATTR,
|
||||
"name=\"Txt\" cols=\"80\" rows=\"20\""
|
||||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (TxtHTML);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_DIV_End ();
|
||||
|
|
|
@ -178,14 +178,12 @@ void Ins_SeeInsWithPendingCtrs (void)
|
|||
/* Institution logo and name */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s NOWRAP %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s NOWRAP %s\"",The_GetSuffix (),BgColor);
|
||||
Ins_DrawInstitLogoAndNameWithLink (&Ins,ActSeeCtr,"CM ICO16x16");
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of pending centers (row[1]) */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",The_GetSuffix (),BgColor);
|
||||
HTM_Txt (row[1]);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -374,57 +372,49 @@ static void Ins_ListOneInstitutionForSeeing (struct Hie_Node *Ins,unsigned NumIn
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Number of institution in this list *****/
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (NumIns);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution logo and name *****/
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
|
||||
TxtClassStrong,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",TxtClassStrong,The_GetSuffix (),BgColor);
|
||||
Ins_DrawInstitLogoAndNameWithLink (Ins,ActSeeCtr,"CT ICO16x16");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this institution *****/
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumUsrsWhoClaimToBelongTo (Hie_INS,Ins));
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Other stats *****/
|
||||
/* Number of centers in this institution */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_INS, // ...in institution
|
||||
Ins->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of degrees in this institution */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
Hie_INS, // ...in institution
|
||||
Ins->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of courses in this institution */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
Hie_INS, // ...in institution
|
||||
Ins->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of departments in this institution */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Dpt_GetNumDptsInIns (Ins->HieCod));
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of users in courses of this institution */
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",
|
||||
TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\"",TxtClassNormal,The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (Enr_GetCachedNumUsrsInCrss (Hie_INS,Ins->HieCod,
|
||||
1 << Rol_STD |
|
||||
1 << Rol_NET |
|
||||
|
@ -982,8 +972,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
HTM_TD_Unsigned (NumUsrsInCrssOfIns);
|
||||
|
||||
/* Institution requester */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",The_GetSuffix ());
|
||||
UsrDat.UsrCod = Ins->RequesterUsrCod;
|
||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -1855,8 +1844,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
|
|||
NumberThisRow = Ins_GetInsAndStat (&Ins,*mysql_res);
|
||||
|
||||
/***** Write link to institution *****/
|
||||
HTM_TD_Begin ("class=\"CM FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"CM FORM_IN_%s\"",The_GetSuffix ());
|
||||
Ins_DrawInstitutionLogoWithLink (&Ins,"ICO40x40");
|
||||
HTM_BR ();
|
||||
HTM_Unsigned (NumberThisRow);
|
||||
|
@ -1895,8 +1883,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
|
|||
HTM_TD_Unsigned (NumOrder);
|
||||
|
||||
/***** Write link to institution *****/
|
||||
HTM_TD_Begin ("class=\"LM FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LM FORM_IN_%s\"",The_GetSuffix ());
|
||||
/* Icon and name of this institution */
|
||||
Frm_BeginForm (ActSeeInsInf);
|
||||
ParCod_PutPar (ParCod_Ins,Ins.HieCod);
|
||||
|
|
|
@ -128,8 +128,7 @@ void Lan_PutSelectorToSelectLanguage (void)
|
|||
Frm_BeginForm (ActReqChgLan);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"Lan\" class=\"INPUT_%s\""
|
||||
" style=\"width:112px; margin:0;\"",
|
||||
The_GetSuffix ());
|
||||
" style=\"width:112px; margin:0;\"",The_GetSuffix ());
|
||||
for (Lan = (Lan_Language_t) 1;
|
||||
Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
|
|
|
@ -1089,11 +1089,10 @@ static void Lay_WritePageTopHeading (void)
|
|||
HTM_DIV_End ();
|
||||
|
||||
/* 2nd. row, 3rd. column */
|
||||
HTM_DIV_Begin ("id=\"msg\" class=\"NOTIF_%s\"", // Used for AJAX based refresh
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("id=\"msg\" class=\"NOTIF_%s\"",The_GetSuffix ()); // Used for AJAX based refresh
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Ntf_WriteNumberOfNewNtfs ();
|
||||
HTM_DIV_End (); // Used for AJAX based refresh
|
||||
HTM_DIV_End (); // Used for AJAX based refresh
|
||||
|
||||
/* End 2nd. row */
|
||||
HTM_DIV_End ();
|
||||
|
|
18
swad_log.c
18
swad_log.c
|
@ -261,23 +261,19 @@ void Log_GetAndShowLastClicks (void)
|
|||
/* Print table row */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"LC_CLK %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_CLK %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
HTM_Txt (row[0]); // Click
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LC_TIM %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_TIM %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); // Elapsed time
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LC_ROL %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_ROL %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
HTM_Txt (Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]); // Role
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LC_HIE %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_HIE %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
HTM_Txt (Hie[Hie_CTY].FullName); // Country
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -285,14 +281,12 @@ void Log_GetAndShowLastClicks (void)
|
|||
Level <= Hie_DEG;
|
||||
Level++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"LC_HIE %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_HIE %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
HTM_Txt (Hie[Level].ShrtName); // Institution, Center, Degree
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
HTM_TD_Begin ("class=\"LC_ACT %s_%s\"",
|
||||
ClassRow,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LC_ACT %s_%s\"",ClassRow,The_GetSuffix ());
|
||||
HTM_Txt (Act_GetActionText (Action)); // Action
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -841,7 +841,7 @@ static void Mai_ListEmails (__attribute__((unused)) void *Args)
|
|||
{
|
||||
/* Get next user */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
|
||||
/* Get user's email */
|
||||
|
|
18
swad_mark.c
18
swad_mark.c
|
@ -89,7 +89,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
extern const char *Txt_TABLE_Header;
|
||||
extern const char *Txt_TABLE_Footer;
|
||||
struct Mrk_Properties Marks;
|
||||
char StrHeadOrFoot[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrHeadOrFoot[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
if (Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_FOLDER)
|
||||
HTM_TD_ColouredEmpty (2);
|
||||
|
@ -100,8 +100,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
|
||||
/***** Write the number of rows of header *****/
|
||||
HTM_TD_Begin ("class=\"RT FORM_IN_%s NOWRAP %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowHeaGrp : // Group zone
|
||||
ActChgNumRowHeaCrs); // Course zone
|
||||
Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
@ -109,7 +108,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
// HTM_TxtF (" %s: ",Txt_TABLE_Header);
|
||||
HTM_TxtColon (Txt_TABLE_Header);
|
||||
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Header);
|
||||
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_HEADER],Cns_MAX_DECIMAL_DIGITS_UINT,StrHeadOrFoot,
|
||||
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_HEADER],Cns_MAX_DIGITS_UINT,StrHeadOrFoot,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"1\" class=\"LST_EDIT_ROWS LST_EDIT_%s %s\"",
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
|
@ -119,8 +118,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
|
||||
/***** Write the number of rows of footer *****/
|
||||
HTM_TD_Begin ("class=\"RT FORM_IN_%s NOWRAP %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowFooGrp : // Group zone
|
||||
ActChgNumRowFooCrs); // Course zone
|
||||
Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
@ -128,7 +126,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
// HTM_TxtF (" %s: ",Txt_TABLE_Footer);
|
||||
HTM_TxtColon (Txt_TABLE_Footer);
|
||||
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Footer);
|
||||
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_FOOTER],Cns_MAX_DECIMAL_DIGITS_UINT,StrHeadOrFoot,
|
||||
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_FOOTER],Cns_MAX_DIGITS_UINT,StrHeadOrFoot,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"1\" class=\"LST_EDIT_ROWS LST_EDIT_%s %s\"",
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
|
@ -197,14 +195,14 @@ void Mrk_ChangeNumRowsFooter (void)
|
|||
static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
||||
{
|
||||
extern const char *Txt_The_number_of_rows_is_now_X;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned NumRows;
|
||||
|
||||
/***** Get parameters related to file browser *****/
|
||||
Brw_GetParAndInitFileBrowser ();
|
||||
|
||||
/***** Get the number of rows of the header or footer of the table of marks *****/
|
||||
Par_GetParText (Mrk_HeadOrFootStr[HeaderOrFooter],UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetParText (Mrk_HeadOrFootStr[HeaderOrFooter],UnsignedStr,Cns_MAX_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&NumRows) == 1)
|
||||
{
|
||||
/***** Update properties of marks in the database *****/
|
||||
|
@ -653,7 +651,7 @@ void Mrk_GetNotifMyMarks (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
char FullPathInTreeFromDBMarksTable[PATH_MAX + 1];
|
||||
char PathUntilFileName[PATH_MAX + 1];
|
||||
char FileName[NAME_MAX + 1];
|
||||
char PathMarks[PATH_MAX + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1 + 3 + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1 + PATH_MAX + 1];
|
||||
char PathMarks[PATH_MAX + 1 + Cns_MAX_DIGITS_LONG + 1 + 3 + 1 + Cns_MAX_DIGITS_LONG + 1 + PATH_MAX + 1];
|
||||
char FileNameUsrMarks[PATH_MAX + 1];
|
||||
FILE *FileUsrMarks;
|
||||
size_t SizeOfMyMarks;
|
||||
|
|
|
@ -613,8 +613,7 @@ static void Mch_ListOneOrMoreMatchesTimes (const struct Gam_Games *Games,
|
|||
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"",
|
||||
Id,
|
||||
Dat_TimeStatusClass[TimeStatus[Match->Status.Showing]][Games->Game.HiddenOrVisible],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,Match->TimeUTC[StartEndTime],
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -1500,7 +1499,7 @@ static void Mch_ReorderAnswer (long MchCod,unsigned QstInd,
|
|||
unsigned NumAnss;
|
||||
unsigned NumAns;
|
||||
unsigned AnsInd;
|
||||
char StrOneAnswer[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrOneAnswer[Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrAnswersOneQst[Qst_MAX_BYTES_ANSWERS_ONE_QST + 1];
|
||||
|
||||
/***** Initialize list of answers to empty string *****/
|
||||
|
@ -2597,8 +2596,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match)
|
|||
extern const char *Txt_View_results;
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"MCH_SHOW_RESULTS DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"MCH_SHOW_RESULTS DAT_%s\"",The_GetSuffix ());
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActChgVisResMchQst);
|
||||
|
|
|
@ -299,7 +299,7 @@ static void MchRes_ListAllMchResultsInSelectedGames (struct Gam_Games *Games)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,Gbl.Usrs.Other.UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -655,10 +655,10 @@ static void MchRes_BuildGamesSelectedCommas (struct Gam_Games *Games,
|
|||
{
|
||||
size_t MaxLength;
|
||||
unsigned NumGame;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Allocate memory for subquery of games selected *****/
|
||||
MaxLength = (size_t) Games->NumSelected * (Cns_MAX_DECIMAL_DIGITS_LONG + 1);
|
||||
MaxLength = (size_t) Games->NumSelected * (Cns_MAX_DIGITS_LONG + 1);
|
||||
if ((*GamesSelectedCommas = malloc (MaxLength + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -984,40 +984,35 @@ static void MchRes_ShowMchResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Row title *****/
|
||||
HTM_TD_Begin ("colspan=\"3\" class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtColonNBSP (Txt_Matches);
|
||||
HTM_Unsigned (NumResults);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total number of questions *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumResults)
|
||||
HTM_Unsigned (NumTotalQsts->All);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total number of non-blank answers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumResults)
|
||||
HTM_Unsigned (NumTotalQsts->NotBlank);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total number of blank answers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (NumResults)
|
||||
HTM_Unsigned (NumTotalQsts->All - NumTotalQsts->NotBlank);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write total score *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (TotalScore);
|
||||
HTM_Txt ("/");
|
||||
HTM_Unsigned (NumTotalQsts->All);
|
||||
|
@ -1025,8 +1020,7 @@ static void MchRes_ShowMchResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write average score per question *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (NumTotalQsts->All ? TotalScore /
|
||||
(double) NumTotalQsts->All :
|
||||
0.0);
|
||||
|
@ -1034,15 +1028,13 @@ static void MchRes_ShowMchResultsSummaryRow (unsigned NumResults,
|
|||
|
||||
/***** Write total grade *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Double2Decimals (TotalGrade);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Last cell *****/
|
||||
HTM_TD_Begin ("class=\"DAT_STRONG_%s LINE_TOP LINE_BOTTOM LINE_LEFT %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End row *****/
|
||||
|
@ -1137,13 +1129,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/* User */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs][UsrDat->Sex]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_SPTxt (UsrDat->Surname1);
|
||||
if (UsrDat->Surname2[0])
|
||||
|
@ -1167,15 +1157,13 @@ void MchRes_ShowOneMchResult (void)
|
|||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_START_END_TIME[StartEndTime]);
|
||||
HTM_TD_End ();
|
||||
|
||||
if (asprintf (&Id,"match_%u",(unsigned) StartEndTime) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"LT DAT_%s\"",
|
||||
Id,The_GetSuffix ());
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"LT DAT_%s\"",Id,The_GetSuffix ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,Print.TimeUTC[StartEndTime],
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -1193,13 +1181,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/***** Number of questions *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Questions);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Print.NumQsts.All);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -1208,13 +1194,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/***** Number of answers *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Answers);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Print.NumQsts.NotBlank);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -1223,13 +1207,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/***** Score *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Score);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
switch (ICanView.Score)
|
||||
{
|
||||
case Usr_CAN:
|
||||
|
@ -1251,13 +1233,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/***** Grade *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Grade);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
switch (ICanView.Score)
|
||||
{
|
||||
case Usr_CAN:
|
||||
|
@ -1278,13 +1258,11 @@ void MchRes_ShowOneMchResult (void)
|
|||
/***** Tags present in this result *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Tags);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||
Gam_ShowTstTagsPresentInAGame (Match.GamCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES] =
|
|||
};
|
||||
const char *Nam_Classes[Nam_NUM_SHRT_FULL_NAMES] =
|
||||
{
|
||||
[Nam_SHRT_NAME] = "Frm_C2_INPUT",
|
||||
[Nam_FULL_NAME] = "Frm_C2_INPUT",
|
||||
[Nam_SHRT_NAME] = "INPUT_SHRT_NAME",
|
||||
[Nam_FULL_NAME] = "INPUT_FULL_NAME",
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -376,8 +376,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
|||
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
Ico_PutIcon (Net_WebsAndSocialNetworksIcons[Web],Ico_BLACK,
|
||||
Net_WebsAndSocialNetworksTitle[Web],"ICOx16");
|
||||
HTM_NBSPTxt (Net_WebsAndSocialNetworksTitle[Web]);
|
||||
|
|
|
@ -310,7 +310,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
|
|||
extern const char *Txt_Notices;
|
||||
extern const char *Txt_No_notices;
|
||||
MYSQL_RES *mysql_res;
|
||||
// char StrWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1];
|
||||
// char StrWidth[Cns_MAX_DIGITS_UINT + 2 + 1];
|
||||
struct Not_Notice Notice;
|
||||
unsigned NumNot;
|
||||
unsigned NumNotices = 0; // Initialized to avoid warning
|
||||
|
@ -566,8 +566,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
|
||||
/* Write the date */
|
||||
UniqueId++;
|
||||
HTM_DIV_Begin ("class=\"NOTICE_DATE NOTICE_DATE_%s RT\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"NOTICE_DATE NOTICE_DATE_%s RT\"",The_GetSuffix ());
|
||||
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
||||
{
|
||||
/* Form to view full notice */
|
||||
|
@ -611,15 +610,13 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
}
|
||||
else
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"NOTICE_TEXT NOTICE_TEXT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"NOTICE_TEXT NOTICE_TEXT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Notice->Content);
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
||||
/***** Write the author *****/
|
||||
HTM_DIV_Begin ("class=\"NOTICE_AUTHOR NOTICE_AUTHOR_%s\"", // Limited width
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"NOTICE_AUTHOR NOTICE_AUTHOR_%s\"",The_GetSuffix ()); // Limited width
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
UsrDat.UsrCod = Notice->UsrCod;
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get author's data from database
|
||||
|
|
|
@ -630,8 +630,7 @@ static void Ntf_WriteNotif (Ntf_NotifyEvent_t NotifyEvent,
|
|||
|
||||
/* Write user (from) */
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
|
||||
Class.Author,The_GetSuffix (),
|
||||
Class.Bg,The_GetSuffix ());
|
||||
Class.Author,The_GetSuffix (),Class.Bg,The_GetSuffix ());
|
||||
Usr_WriteAuthor (UsrDat,For_ENABLED);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -729,8 +728,7 @@ static void Ntf_WriteNotif (Ntf_NotifyEvent_t NotifyEvent,
|
|||
|
||||
/* Write status (sent by email / pending to be sent by email) */
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
|
||||
Class.Txt,The_GetSuffix (),
|
||||
Class.Bg,The_GetSuffix ());
|
||||
Class.Txt,The_GetSuffix (),Class.Bg,The_GetSuffix ());
|
||||
StatusTxt = Ntf_GetStatusTxtFromStatusBits (Status);
|
||||
HTM_Txt (Txt_NOTIFICATION_STATUS[StatusTxt]);
|
||||
HTM_TD_End ();
|
||||
|
@ -752,8 +750,7 @@ static void Ntf_WriteNotif (Ntf_NotifyEvent_t NotifyEvent,
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("colspan=\"4\" class=\"LT DAT_%s\""
|
||||
" style=\"padding-bottom:12px;\"",
|
||||
The_GetSuffix ());
|
||||
" style=\"padding-bottom:12px;\"",The_GetSuffix ());
|
||||
HTM_Txt (SummaryStr);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -408,8 +408,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_Submit_Begin (Title,
|
||||
"class=\"BT_LINK PAG PAG_%s %s_%s\"",
|
||||
The_GetSuffix (),
|
||||
ClassTxt,The_GetSuffix ());
|
||||
The_GetSuffix (),ClassTxt,The_GetSuffix ());
|
||||
HTM_Unsigned (1);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
|
@ -529,8 +528,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_Submit_Begin (Title,
|
||||
"class=\"BT_LINK PAG PAG_%s %s_%s\"",
|
||||
The_GetSuffix (),
|
||||
ClassTxt,The_GetSuffix ());
|
||||
The_GetSuffix (),ClassTxt,The_GetSuffix ());
|
||||
HTM_Unsigned (Pagination->LeftPage);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
|
|
|
@ -134,7 +134,7 @@ bool Par_GetQueryString (void)
|
|||
{
|
||||
char Method[Par_MAX_BYTES_METHOD + 1];
|
||||
char ContentType[Par_MAX_BYTES_CONTENT_TYPE + 1];
|
||||
char UnsignedLongStr[Cns_MAX_DECIMAL_DIGITS_ULONG + 1];
|
||||
char UnsignedLongStr[Cns_MAX_DIGITS_ULONG + 1];
|
||||
unsigned long UnsignedLong;
|
||||
|
||||
Str_Copy (Method,getenv ("REQUEST_METHOD"),sizeof (Method) - 1);
|
||||
|
@ -717,7 +717,7 @@ void Par_GetMainPars (void)
|
|||
extern const char *Par_CodeStr[Par_NUM_PAR_COD];
|
||||
long ActCod;
|
||||
char Nick[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
// First of all, get action, and session identifier.
|
||||
// So, if other parameters have been stored in the database, there will be no problems to get them.
|
||||
|
@ -841,7 +841,7 @@ void Par_GetMainPars (void)
|
|||
Set_GetSettingsFromIP ();
|
||||
|
||||
/***** Get country if exists (from menu) *****/
|
||||
Par_GetParText (Par_CodeStr[ParCod_Cty],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (Par_CodeStr[ParCod_Cty],LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter available
|
||||
{
|
||||
Gbl.Hierarchy.Node[Hie_CTY].HieCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -852,7 +852,7 @@ void Par_GetMainPars (void)
|
|||
}
|
||||
|
||||
/***** Get institution if exists (from menu) *****/
|
||||
Par_GetParText (Par_CodeStr[ParCod_Ins],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (Par_CodeStr[ParCod_Ins],LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter available
|
||||
{
|
||||
Gbl.Hierarchy.Node[Hie_INS].HieCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -862,7 +862,7 @@ void Par_GetMainPars (void)
|
|||
}
|
||||
|
||||
/***** Get center if exists (from menu) *****/
|
||||
Par_GetParText (Par_CodeStr[ParCod_Ctr],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (Par_CodeStr[ParCod_Ctr],LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter available
|
||||
{
|
||||
Gbl.Hierarchy.Node[Hie_CTR].HieCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -871,7 +871,7 @@ void Par_GetMainPars (void)
|
|||
}
|
||||
|
||||
/***** Get numerical degree code if exists (from menu) *****/
|
||||
Par_GetParText (Par_CodeStr[ParCod_Deg],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (Par_CodeStr[ParCod_Deg],LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter available
|
||||
{
|
||||
Gbl.Hierarchy.Node[Hie_DEG].HieCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -879,7 +879,7 @@ void Par_GetMainPars (void)
|
|||
}
|
||||
|
||||
/***** Get numerical course code if exists (from menu) *****/
|
||||
Par_GetParText (Par_CodeStr[ParCod_Crs],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (Par_CodeStr[ParCod_Crs],LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter available
|
||||
Gbl.Hierarchy.Node[Hie_CRS].HieCod = Str_ConvertStrCodToLongCod (LongStr); // Overwrite CrsCod from session
|
||||
|
||||
|
@ -919,11 +919,11 @@ unsigned long Par_GetParUnsignedLong (const char *ParName,
|
|||
unsigned long Max,
|
||||
unsigned long Default)
|
||||
{
|
||||
char UnsignedLongStr[Cns_MAX_DECIMAL_DIGITS_ULONG + 1];
|
||||
char UnsignedLongStr[Cns_MAX_DIGITS_ULONG + 1];
|
||||
unsigned long UnsignedLongNum;
|
||||
|
||||
/***** Get parameter with unsigned number *****/
|
||||
Par_GetParText (ParName,UnsignedLongStr,Cns_MAX_DECIMAL_DIGITS_ULONG);
|
||||
Par_GetParText (ParName,UnsignedLongStr,Cns_MAX_DIGITS_ULONG);
|
||||
if (sscanf (UnsignedLongStr,"%lu",&UnsignedLongNum) == 1)
|
||||
if (UnsignedLongNum >= Min && UnsignedLongNum <= Max)
|
||||
return UnsignedLongNum;
|
||||
|
@ -937,10 +937,10 @@ unsigned long Par_GetParUnsignedLong (const char *ParName,
|
|||
|
||||
long Par_GetParLong (const char *ParName)
|
||||
{
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Get parameter with long number *****/
|
||||
Par_GetParText (ParName,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (ParName,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
return Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
|
||||
|
@ -1007,7 +1007,8 @@ unsigned Par_GetParAndChangeFormat (const char *ParName,char *ParValue,size_t Ma
|
|||
// When StrDst is NULL, nothing is stored
|
||||
// Return true if characters found
|
||||
|
||||
bool Par_GetNextStrUntilSeparParMult (const char **StrSrc,char *StrDst,size_t LongMax)
|
||||
bool Par_GetNextStrUntilSeparParMult (const char **StrSrc,char *StrDst,
|
||||
size_t LongMax)
|
||||
{
|
||||
size_t i = 0;
|
||||
unsigned char Ch; // Must be unsigned to work with characters > 127
|
||||
|
|
|
@ -94,7 +94,8 @@ unsigned Par_GetParAndChangeFormat (const char *ParName,char *ParValue,size_t Ma
|
|||
Str_ChangeTo_t ChangeTo,
|
||||
Str_RemoveSpaces_t RemoveLeadingAndTrailingSpaces);
|
||||
|
||||
bool Par_GetNextStrUntilSeparParMult (const char **StrSrc,char *StrDst,size_t LongMax);
|
||||
bool Par_GetNextStrUntilSeparParMult (const char **StrSrc,char *StrDst,
|
||||
size_t LongMax);
|
||||
bool Par_GetNextStrUntilComma (const char **StrSrc,char *StrDst,size_t LongMax);
|
||||
void Par_ReplaceSeparatorMultipleByComma (char *Str);
|
||||
|
||||
|
|
32
swad_photo.c
32
swad_photo.c
|
@ -1142,8 +1142,7 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
if (asprintf (&Caption.InsCty,"<div class=\"ZOOM_TXT DAT_SMALL_%s\">"
|
||||
"%s"
|
||||
"</div>",
|
||||
The_GetSuffix (),
|
||||
CtyName) < 0)
|
||||
The_GetSuffix (),CtyName) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
}
|
||||
else if (asprintf (&Caption.InsCty,"%s","") < 0)
|
||||
|
@ -1158,10 +1157,8 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
" class=\"ICO16x16 ICO_BLACK_%s\" />"
|
||||
" %s"
|
||||
"</div>",
|
||||
The_GetSuffix (),
|
||||
Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole],
|
||||
The_GetSuffix (),
|
||||
MainDegreeShrtName) < 0)
|
||||
The_GetSuffix (),Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole],
|
||||
The_GetSuffix (),MainDegreeShrtName) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
}
|
||||
else if (asprintf (&Caption.MainDeg,"%s","") < 0)
|
||||
|
@ -1185,14 +1182,10 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
" %s"
|
||||
"</span>"
|
||||
"</div>",
|
||||
The_GetSuffix (),
|
||||
NumFollowing,
|
||||
The_GetSuffix (),
|
||||
Txt_Following,
|
||||
The_GetSuffix (),
|
||||
NumFollowers,
|
||||
The_GetSuffix (),
|
||||
Txt_Followers) < 0)
|
||||
The_GetSuffix (),NumFollowing,
|
||||
The_GetSuffix (),Txt_Following,
|
||||
The_GetSuffix (),NumFollowers,
|
||||
The_GetSuffix (),Txt_Followers) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
}
|
||||
else if (asprintf (&Caption.Follow,"%s","") < 0)
|
||||
|
@ -2050,7 +2043,7 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
|
|||
if (Degs.Lst[NumDeg].HieCod == Deg.HieCod)
|
||||
Attributes = HTM_SELECTED;
|
||||
else
|
||||
// Too recently computed ?
|
||||
// Too recently computed?
|
||||
Attributes = (Pho_GetTimeAvgPhotoWasComputed (Degs.Lst[NumDeg].HieCod) >=
|
||||
Dat_GetStartExecutionTimeUTC () - Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO) ? HTM_DISABLED :
|
||||
HTM_NO_ATTR;
|
||||
|
@ -2249,15 +2242,13 @@ static void Pho_ShowOrPrintListDegrees (struct Pho_DegPhotos *DegPhotos,
|
|||
|
||||
/***** Show logo and name of this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (++NumDegsNotEmpty);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Show logo and name of this degree *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,"CT ICO20x20");
|
||||
else // Pho_DEGREES_PRINT
|
||||
|
@ -2274,8 +2265,7 @@ static void Pho_ShowOrPrintListDegrees (struct Pho_DegPhotos *DegPhotos,
|
|||
/***** Show average photo of students belonging to this degree *****/
|
||||
Pho_GetNumStdsInDegree (Deg.HieCod,Sex,&NumStds,&NumStdsWithPhoto);
|
||||
HTM_TD_Begin ("class=\"CLASSPHOTO CLASSPHOTO_%s RM %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
Pho_ShowDegreeAvgPhotoAndStat (&Deg,DegPhotos,
|
||||
SeeOrPrint,Sex,
|
||||
|
|
|
@ -183,8 +183,7 @@ void Plc_SeeAllPlaces (void)
|
|||
|
||||
/***** Separation row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"DAT_%s\"",The_GetSuffix ());
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -1227,10 +1227,8 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
|
|||
HTM_TR_Begin (NULL);
|
||||
MeOrOther = Usr_ItsMe (UsrDat.UsrCod);
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank,MeOrOther);
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
Class[MeOrOther],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",Class[MeOrOther],
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Long (Figure);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
@ -1301,8 +1299,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
MeOrOther = Usr_ItsMe (UsrDat.UsrCod);
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank,MeOrOther);
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",Class[MeOrOther],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_DoubleFewDigits (NumClicksPerDay);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
@ -1341,9 +1338,7 @@ static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,
|
|||
Usr_Can_t ICanView = Pri_CheckIfICanView (UsrDat->BaPrfVisibility,UsrDat);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s_%s %s\"",
|
||||
Class[MeOrOther],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Class[MeOrOther],The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtF ("#%u",Rank);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -1357,9 +1352,7 @@ static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,
|
|||
|
||||
/***** Put form to go to public profile *****/
|
||||
HTM_TD_Begin ("class=\"RANK_USR %s_%s %s\"", // Limited width
|
||||
Class[MeOrOther],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Class[MeOrOther],The_GetSuffix (),The_GetColorRows ());
|
||||
if (ICanView == Usr_CAN)
|
||||
{
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
|
|
|
@ -658,8 +658,7 @@ static void Prg_WriteItemText (long ItmCod,HidVis_HiddenOrVisible_t HiddenOrVisi
|
|||
Txt,Cns_MAX_BYTES_TEXT,Str_DONT_REMOVE_SPACES);
|
||||
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
HTM_DIV_Begin ("class=\"PAR PRG_TXT_%s%s\"",
|
||||
The_GetSuffix (),
|
||||
HidVis_PrgClass[HiddenOrVisible]);
|
||||
The_GetSuffix (),HidVis_PrgClass[HiddenOrVisible]);
|
||||
HTM_Txt (Txt);
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
@ -940,7 +939,7 @@ static void Prg_PutFormsToRemEditOneItem (Prg_ListingType_t ListingType,
|
|||
[HidVis_HIDDEN ] = ActUnhPrgItm, // Hidden ==> action to unhide
|
||||
[HidVis_VISIBLE] = ActHidPrgItm, // Visible ==> action to hide
|
||||
};
|
||||
char StrItemIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrItemIndex[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Initialize item index string *****/
|
||||
snprintf (StrItemIndex,sizeof (StrItemIndex),"%u",Item->Hierarchy.ItmInd);
|
||||
|
|
|
@ -1536,8 +1536,7 @@ static void Prj_ShowFirstRow (struct Prj_Projects *Projects,
|
|||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
HTM_TD_Begin ("rowspan=\"4\" class=\"RT BIG_INDEX_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (Projects->NumIndex);
|
||||
if (Faults->PrjIsFaulty)
|
||||
{
|
||||
|
@ -2095,8 +2094,7 @@ static void Prj_ShowProjectMembersWithARole (struct Prj_Projects *Projects,
|
|||
case Prj_LIST_PROJECTS:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s %s\"",
|
||||
HidVis_DataClass[Projects->Prj.Hidden],
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
break;
|
||||
case Prj_VIEW_ONE_PROJECT:
|
||||
case Prj_PRINT_ONE_PROJECT:
|
||||
|
@ -2275,8 +2273,7 @@ static void Prj_ShowProposal (const struct Prj_Projects *Projects,
|
|||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s %s\"",
|
||||
ClassData,The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
ClassData,The_GetSuffix (),The_GetColorRows ());
|
||||
break;
|
||||
default:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s\"",
|
||||
|
@ -2343,8 +2340,7 @@ static void Prj_ShowTxtField (const struct Prj_Projects *Projects,
|
|||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s %s\"",
|
||||
ClassData,The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
ClassData,The_GetSuffix (),The_GetColorRows ());
|
||||
break;
|
||||
default:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s\"",
|
||||
|
@ -2402,8 +2398,7 @@ static void Prj_ShowURL (const struct Prj_Projects *Projects,
|
|||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s %s\"",
|
||||
ClassData,The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
ClassData,The_GetSuffix (),The_GetColorRows ());
|
||||
break;
|
||||
default:
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s_%s\"",
|
||||
|
@ -2530,8 +2525,7 @@ static void Prj_PutIconToToggleProject (unsigned UniqueId,
|
|||
/***** Link to toggle on/off some fields of project *****/
|
||||
HTM_A_Begin ("href=\"\" title=\"%s\" class=\"FORM_IN_%s\""
|
||||
" onclick=\"toggleProject('%u');return false;\"",
|
||||
Text,The_GetSuffix (),
|
||||
UniqueId);
|
||||
Text,The_GetSuffix (),UniqueId);
|
||||
Ico_PutIconTextLink (Icon,Ico_BLACK,Text);
|
||||
HTM_A_End ();
|
||||
}
|
||||
|
@ -2591,7 +2585,8 @@ static void Prj_ShowTableAllProjectsOneRow (struct Prj_Project *Prj)
|
|||
|
||||
/***** Project title *****/
|
||||
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
|
||||
HidVis_DataClass[Prj->Hidden],The_GetSuffix (),The_GetColorRows ());
|
||||
HidVis_DataClass[Prj->Hidden],The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_Txt (Prj->Title);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics,
|
|||
extern const char *Par_CodeStr[Par_NUM_PAR_COD];
|
||||
char *ParLstRubCods;
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumRub;
|
||||
unsigned MaxSizeListRubCods;
|
||||
|
||||
|
@ -393,7 +393,7 @@ static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics,
|
|||
if (Rubrics->Num) // If course has rubrics
|
||||
{
|
||||
/***** Allocate memory for the list of rubric codes specified *****/
|
||||
MaxSizeListRubCods = ((Cns_MAX_DECIMAL_DIGITS_LONG + 1) * Rubrics->Num) - 1;
|
||||
MaxSizeListRubCods = ((Cns_MAX_DIGITS_LONG + 1) * Rubrics->Num) - 1;
|
||||
if ((ParLstRubCods = malloc (MaxSizeListRubCods + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -405,7 +405,7 @@ static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics,
|
|||
for (Ptr = ParLstRubCods, NumRub = 0;
|
||||
*Ptr;
|
||||
NumRub++)
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
ListRubCods->NumRubrics = NumRub;
|
||||
|
||||
if (ListRubCods->NumRubrics) // If rubrics specified...
|
||||
|
@ -418,7 +418,7 @@ static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics,
|
|||
*Ptr;
|
||||
NumRub++)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
ListRubCods->RubCods[NumRub] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,8 +217,8 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
|
|||
extern const char *Txt_All_types_of_answers;
|
||||
extern const char *Txt_TST_STR_ANSWER_TYPES[Qst_NUM_ANS_TYPES];
|
||||
Qst_AnswerType_t AnsType;
|
||||
HTM_Attributes_t Checked;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
HTM_Attributes_t Attributes;
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
const char *Ptr;
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -233,8 +233,7 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
|
||||
HTM_INPUT_CHECKBOX ("AllAnsTypes",
|
||||
AnswerTypes->All ? HTM_CHECKED :
|
||||
|
@ -254,21 +253,22 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
|
|||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
Checked = HTM_NO_ATTR;
|
||||
Attributes = HTM_NO_ATTR;
|
||||
Ptr = AnswerTypes->List;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,
|
||||
Cns_MAX_DIGITS_UINT);
|
||||
if (Qst_ConvertFromUnsignedStrToAnsTyp (UnsignedStr) == AnsType)
|
||||
{
|
||||
Checked = HTM_CHECKED;
|
||||
Attributes = HTM_CHECKED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
|
||||
HTM_INPUT_CHECKBOX ("AnswerType",
|
||||
Checked,
|
||||
Attributes,
|
||||
"value=\"%u\""
|
||||
" onclick=\"checkParent(this,'AllAnsTypes');\"",
|
||||
(unsigned) AnsType);
|
||||
|
@ -535,8 +535,7 @@ void Qst_ListQuestionForEdition (struct Qst_Question *Question,
|
|||
}
|
||||
else
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"DAT_LIGHT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_LIGHT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_Question_removed);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
|
@ -662,8 +661,7 @@ static void Qst_PutFormToEditQstMedia (const struct Med_Media *Media,int NumMedi
|
|||
else // No current image
|
||||
{
|
||||
/***** Attached media *****/
|
||||
if (asprintf (&ClassInput,"Tst_MED_INPUT INPUT_%s",
|
||||
The_GetSuffix ()) < 0)
|
||||
if (asprintf (&ClassInput,"Tst_MED_INPUT INPUT_%s",The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Med_PutMediaUploader (NumMedia,ClassInput);
|
||||
free (ClassInput);
|
||||
|
@ -692,8 +690,7 @@ void Qst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback)
|
|||
Str_DONT_REMOVE_SPACES);
|
||||
|
||||
/***** Write the feedback *****/
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",
|
||||
ClassFeedback,The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",ClassFeedback,The_GetSuffix ());
|
||||
HTM_Txt (FeedbackRigorousHTML);
|
||||
HTM_DIV_End ();
|
||||
|
||||
|
@ -945,8 +942,7 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
|
||||
/* Question code */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtF ("%ld ",Questions->Question.QstCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -954,9 +950,7 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
if (asprintf (&Id,"tst_date_%u",++UniqueId) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_TD_Begin ("id=\"%s\" class=\"CT DAT_SMALL_%s %s\"",
|
||||
Id,
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
Id,The_GetSuffix (),The_GetColorRows ());
|
||||
Dat_WriteLocalDateHMSFromUTC (Id,Questions->Question.EditTime,
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
Dat_WRITE_TODAY |
|
||||
|
@ -974,8 +968,7 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
|
||||
/* Shuffle (row[2]) */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (Questions->Question.Answer.Type == Qst_ANS_UNIQUE_CHOICE ||
|
||||
Questions->Question.Answer.Type == Qst_ANS_MULTIPLE_CHOICE)
|
||||
{
|
||||
|
@ -984,7 +977,8 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
Par_PutParUnsigned (NULL,"Order",(unsigned) Questions->SelectedOrder);
|
||||
HTM_INPUT_CHECKBOX ("Shuffle",
|
||||
(Questions->Question.Answer.Shuffle ? HTM_CHECKED :
|
||||
HTM_NO_ATTR) | HTM_SUBMIT_ON_CHANGE,
|
||||
HTM_NO_ATTR) |
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"");
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1006,15 +1000,13 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
|
||||
/* Number of times this question has been answered */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_UnsignedLong (Questions->Question.NumHits);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Average score */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (Questions->Question.NumHits)
|
||||
HTM_Double2Decimals (Questions->Question.Score /
|
||||
(double) Questions->Question.NumHits);
|
||||
|
@ -1024,15 +1016,13 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
|
||||
/* Number of times this question has been answered (not blank) */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_UnsignedLong (Questions->Question.NumHitsNotBlank);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Average score (not blank) */
|
||||
HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
if (Questions->Question.NumHitsNotBlank)
|
||||
HTM_Double2Decimals (Questions->Question.Score /
|
||||
(double) Questions->Question.NumHitsNotBlank);
|
||||
|
@ -1470,16 +1460,14 @@ static void Qst_WriteChoAns (struct Qst_Question *Question,
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Write the number of option */
|
||||
HTM_TD_Begin ("class=\"LT %s_%s\"",
|
||||
ClassTxt,The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT %s_%s\"",ClassTxt,The_GetSuffix ());
|
||||
HTM_TxtF ("%c) ",'a' + (char) NumOpt);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
|
||||
/* Write the text of the answer and the media */
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",
|
||||
ClassTxt,The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
|
||||
HTM_Txt (Question->Answer.Options[NumOpt].Text);
|
||||
Med_ShowMedia (&Question->Answer.Options[NumOpt].Media,
|
||||
"Tst_MED_EDIT_LIST_CONT",
|
||||
|
@ -1487,8 +1475,7 @@ static void Qst_WriteChoAns (struct Qst_Question *Question,
|
|||
HTM_DIV_End ();
|
||||
|
||||
/* Write the text of the feedback */
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",
|
||||
ClassFeedback,The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",ClassFeedback,The_GetSuffix ());
|
||||
HTM_Txt (Question->Answer.Options[NumOpt].Feedback);
|
||||
HTM_DIV_End ();
|
||||
|
||||
|
@ -1665,7 +1652,7 @@ void Qst_WriteAnsTF (char AnsTF)
|
|||
|
||||
void Qst_WriteParQstCod (unsigned QstInd,long QstCod)
|
||||
{
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
snprintf (StrAns,sizeof (StrAns),"Qst%010u",QstInd);
|
||||
Par_PutParLong (NULL,StrAns,QstCod);
|
||||
|
@ -1831,8 +1818,8 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
bool TagFound;
|
||||
bool AnswerHasContent;
|
||||
bool DisplayRightColumn;
|
||||
char StrTagTxt[6 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrInteger[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrTagTxt[6 + Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrInteger[Cns_MAX_DIGITS_UINT + 1];
|
||||
char *Title;
|
||||
char *FuncOnChange;
|
||||
bool NewQuestion = (Question->QstCod > 0);
|
||||
|
@ -1975,8 +1962,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
Qst_PutFormToEditQstMedia (&Question->Media,-1,HTM_NO_ATTR);
|
||||
|
||||
/***** Feedback *****/
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional);
|
||||
HTM_BR ();
|
||||
HTM_TEXTAREA_Begin (HTM_NO_ATTR,
|
||||
|
@ -2029,7 +2015,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Integer_number);
|
||||
snprintf (StrInteger,sizeof (StrInteger),"%ld",Question->Answer.Integer);
|
||||
HTM_INPUT_TEXT ("AnsInt",Cns_MAX_DECIMAL_DIGITS_LONG,StrInteger,
|
||||
HTM_INPUT_TEXT ("AnsInt",Cns_MAX_DIGITS_LONG,StrInteger,
|
||||
(Question->Answer.Type == Qst_ANS_INT) ? HTM_NO_ATTR :
|
||||
HTM_DISABLED | HTM_REQUIRED,
|
||||
"size=\"11\" class=\"INPUT_%s\"",
|
||||
|
@ -2127,8 +2113,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
|
||||
/***** Center column: letter of the answer and expand / contract icon *****/
|
||||
HTM_TD_Begin ("class=\"FORM_IN_%s Qst_ANS_CENTER_COL %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtF ("%c)",'a' + (char) NumOpt);
|
||||
|
||||
/* Icon to expand (show the answer) */
|
||||
|
@ -2181,8 +2166,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
(int) NumOpt,ChoiceDisabled);
|
||||
|
||||
/* Feedback */
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional);
|
||||
HTM_BR ();
|
||||
HTM_TEXTAREA_Begin (ChoiceDisabled,
|
||||
|
@ -2664,10 +2648,10 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
unsigned NumTag;
|
||||
unsigned NumTagRead;
|
||||
unsigned NumOpt;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char TagStr[6 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char AnsStr[6 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char FbStr[5 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
char TagStr[6 + Cns_MAX_DIGITS_UINT + 1];
|
||||
char AnsStr[6 + Cns_MAX_DIGITS_UINT + 1];
|
||||
char FbStr[5 + Cns_MAX_DIGITS_UINT + 1];
|
||||
char StrMultiAns[Qst_MAX_BYTES_ANSWERS_ONE_QST + 1];
|
||||
char TF[1 + 1]; // (T)rue or (F)alse
|
||||
const char *Ptr;
|
||||
|
@ -2737,7 +2721,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
Ale_ShowAlertsAndExit ();
|
||||
|
||||
Par_GetParText ("AnsInt",Question->Answer.Options[0].Text,
|
||||
Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Cns_MAX_DIGITS_LONG);
|
||||
break;
|
||||
case Qst_ANS_FLOAT:
|
||||
if (!Qst_AllocateTextChoiceAnswer (Question,0))
|
||||
|
@ -2819,7 +2803,8 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
Ptr = StrMultiAns;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,
|
||||
Cns_MAX_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&NumCorrectAns) != 1)
|
||||
Err_WrongAnswerExit ();
|
||||
if (NumCorrectAns >= Qst_MAX_OPTIONS_PER_QUESTION)
|
||||
|
@ -3273,7 +3258,7 @@ void Qst_ReqRemOneQst (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_question_X;
|
||||
bool EditingOnlyThisQst;
|
||||
struct Qst_Questions Questions;
|
||||
char StrQstCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char StrQstCod[Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Create test *****/
|
||||
Qst_Constructor (&Questions);
|
||||
|
@ -3496,13 +3481,13 @@ unsigned Qst_CountNumAnswerTypesInList (const struct Qst_AnswerTypes *AnswerType
|
|||
{
|
||||
const char *Ptr;
|
||||
unsigned NumAnsTypes = 0;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Go over the list of answer types counting the number of types of answer *****/
|
||||
Ptr = AnswerTypes->List;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DIGITS_UINT);
|
||||
Qst_ConvertFromUnsignedStrToAnsTyp (UnsignedStr);
|
||||
NumAnsTypes++;
|
||||
}
|
||||
|
@ -3517,14 +3502,14 @@ unsigned Qst_CountNumQuestionsInList (const char *ListQuestions)
|
|||
{
|
||||
const char *Ptr;
|
||||
unsigned NumQuestions = 0;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
long QstCod;
|
||||
|
||||
/***** Go over list of questions counting the number of questions *****/
|
||||
Ptr = ListQuestions;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DIGITS_LONG);
|
||||
if (sscanf (LongStr,"%ld",&QstCod) != 1)
|
||||
Err_WrongQuestionExit ();
|
||||
NumQuestions++;
|
||||
|
|
|
@ -268,10 +268,10 @@ unsigned Qst_DB_GetQsts (MYSQL_RES **mysql_res,
|
|||
unsigned NumItemInList;
|
||||
const char *Ptr;
|
||||
char TagText[Tag_MAX_BYTES_TAG + 1];
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
Qst_AnswerType_t AnsType;
|
||||
char CrsCodStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char CrsCodStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumQsts;
|
||||
|
||||
/***** Allocate space for query *****/
|
||||
|
@ -412,9 +412,9 @@ unsigned Qst_DB_GetQstsForNewTestPrint (MYSQL_RES **mysql_res,
|
|||
unsigned NumItemInList;
|
||||
const char *Ptr;
|
||||
char TagText[Tag_MAX_BYTES_TAG + 1];
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
Qst_AnswerType_t AnswerType;
|
||||
char StrNumQsts[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrNumQsts[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Allocate space for query *****/
|
||||
if ((Query = malloc (Qst_MAX_BYTES_QUERY_QUESTIONS + 1)) == NULL)
|
||||
|
|
|
@ -887,15 +887,13 @@ static void QstImp_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
|
||||
/***** Write number of question *****/
|
||||
HTM_TD_Begin ("class=\"CT %s_%s %s\"",
|
||||
ClassData,The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
ClassData,The_GetSuffix (),The_GetColorRows ());
|
||||
if (!QuestionExists)
|
||||
HTM_TxtF ("%u ",++NumNonExistingQst);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write the question tags *****/
|
||||
HTM_TD_Begin ("class=\"LT %s\"",
|
||||
The_GetColorRows ());
|
||||
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
||||
|
||||
if (Question->Tags.Num)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#define Qst_NUM_ANS_TYPES 6
|
||||
#define Qst_MAX_BYTES_LIST_ANSWER_TYPES (Qst_NUM_ANS_TYPES * (Cns_MAX_DECIMAL_DIGITS_UINT + 1))
|
||||
#define Qst_MAX_BYTES_LIST_ANSWER_TYPES (Qst_NUM_ANS_TYPES * (Cns_MAX_DIGITS_UINT + 1))
|
||||
typedef enum
|
||||
{
|
||||
Qst_ANS_INT = 0,
|
||||
|
|
|
@ -901,7 +901,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get guest's data from database
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -1101,7 +1101,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get student's data from database
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -1314,7 +1314,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, // Get teacher's data from database
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
@ -1695,15 +1695,13 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
|
||||
HTM_TD_Begin ("class=\"REC_C1_BOT %s_%s RT %s\"",
|
||||
ICanEditThisField == Usr_CAN ? "FORM_IN" :
|
||||
"REC_DAT_SMALL", // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
"REC_DAT_SMALL", // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtColon (Gbl.Crs.Records.LstFields.Lst[NumField].Name);
|
||||
if (TypeOfView == Rec_CRS_LIST_ONE_RECORD ||
|
||||
TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"DAT_SMALL_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_SMALL_%s\"",The_GetSuffix ());
|
||||
HTM_NBSP ();
|
||||
HTM_TxtF ("(%s)",
|
||||
Txt_RECORD_FIELD_VISIBILITY_RECORD[Gbl.Crs.Records.LstFields.Lst[NumField].Visibility]);
|
||||
|
@ -1725,8 +1723,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
/* Write form, text, or nothing depending on
|
||||
the user's role and the visibility of the field */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
switch (ICanEditThisField)
|
||||
{
|
||||
case Usr_CAN: // Show with form
|
||||
|
@ -1788,7 +1785,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
void Rec_GetFieldsCrsRecordFromForm (void)
|
||||
{
|
||||
unsigned NumField;
|
||||
char FieldParName[5 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char FieldParName[5 + Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
for (NumField = 0;
|
||||
NumField < Gbl.Crs.Records.LstFields.Num;
|
||||
|
@ -2643,8 +2640,7 @@ static void Rec_ShowCountryInHead (struct Usr_Data *UsrDat,bool ShowData)
|
|||
{
|
||||
|
||||
|
||||
HTM_TD_Begin ("class=\"REC_C2_MID LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_MID LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData && UsrDat->CtyCod > 0)
|
||||
/* Link to see country information */
|
||||
Cty_WriteCountryName (UsrDat->CtyCod); // Put link to country
|
||||
|
@ -2714,8 +2710,7 @@ static void Rec_ShowUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
|||
Frm_LabelColumn ("REC_C1_BOT RT",NULL,Txt_ID_identity_number);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
ID_WriteUsrIDs (UsrDat,Anchor);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2753,8 +2748,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
Frm_LabelColumn ("REC_C1_BOT RM","Role",Txt_Role);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
switch (TypeOfView)
|
||||
{
|
||||
case Rec_SHA_SIGN_UP_IN_CRS_FORM: // I want to apply for enrolment
|
||||
|
@ -2770,8 +2764,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
/***** Selector of role *****/
|
||||
HTM_SELECT_Begin (HTM_NO_ATTR,NULL,
|
||||
"id=\"Role\" name=\"Role\""
|
||||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
for (Role = Rol_STD;
|
||||
Role <= Rol_TCH;
|
||||
Role++)
|
||||
|
@ -2980,8 +2973,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
Frm_LabelColumn ("REC_C1_BOT RM",NULL,Txt_Role);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs][UsrDat->Sex]);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
@ -3036,8 +3028,7 @@ static void Rec_ShowSurname1 (struct Usr_Data *UsrDat,Vie_ViewType_t ViewType)
|
|||
}
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
switch (ViewType)
|
||||
{
|
||||
case Vie_VIEW:
|
||||
|
@ -3079,8 +3070,7 @@ static void Rec_ShowSurname2 (struct Usr_Data *UsrDat,Vie_ViewType_t ViewType)
|
|||
Txt_Surname_2);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
switch (ViewType)
|
||||
{
|
||||
case Vie_VIEW:
|
||||
|
@ -3305,8 +3295,7 @@ static void Rec_ShowPhone (struct Usr_Data *UsrDat,bool ShowData,
|
|||
Label);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
switch (ViewType)
|
||||
{
|
||||
|
@ -3358,8 +3347,7 @@ static void Rec_ShowComments (struct Usr_Data *UsrDat,bool ShowData,
|
|||
Txt_USER_comments);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
switch (ViewType)
|
||||
{
|
||||
|
@ -3428,8 +3416,7 @@ static void Rec_ShowInstitution (struct Hie_Node *Ins,bool ShowData)
|
|||
Frm_LabelColumn ("REC_C1_BOT RT",NULL,Txt_HIERARCHY_SINGUL_Abc[Hie_INS]);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
if (Ins->HieCod > 0)
|
||||
{
|
||||
|
@ -3463,8 +3450,7 @@ static void Rec_ShowCenter (struct Usr_Data *UsrDat,bool ShowData)
|
|||
Frm_LabelColumn ("REC_C1_BOT RT",NULL,Txt_HIERARCHY_SINGUL_Abc[Hie_CTR]);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
{
|
||||
if (UsrDat->Tch.CtrCod > 0)
|
||||
|
@ -3501,8 +3487,7 @@ static void Rec_ShowDepartment (struct Usr_Data *UsrDat,bool ShowData)
|
|||
Frm_LabelColumn ("REC_C1_BOT RT",NULL,Txt_Department);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
{
|
||||
if (UsrDat->Tch.DptCod > 0)
|
||||
|
@ -3538,8 +3523,7 @@ static void Rec_ShowOffice (struct Usr_Data *UsrDat,bool ShowData)
|
|||
Frm_LabelColumn ("REC_C1_BOT RT",NULL,Txt_Office);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
HTM_Txt (UsrDat->Tch.Office);
|
||||
HTM_TD_End ();
|
||||
|
@ -3562,8 +3546,7 @@ static void Rec_ShowOfficePhone (struct Usr_Data *UsrDat,bool ShowData)
|
|||
Frm_LabelColumn ("REC_C1_BOT RM",NULL,Txt_Phone);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
if (ShowData)
|
||||
{
|
||||
HTM_A_Begin ("href=\"tel:%s\" class=\"DAT_STRONG_%s\"",
|
||||
|
|
|
@ -279,13 +279,11 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
|
|||
extern const char *Txt_User[Usr_NUM_SEXS];
|
||||
extern const char *Txt_Date;
|
||||
|
||||
HTM_DIV_Begin ("class=\"TITLE_REPORT DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"TITLE_REPORT DAT_%s\"",The_GetSuffix ());
|
||||
|
||||
/***** User *****/
|
||||
HTM_TxtColonNBSP (Txt_User[Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s BOLD\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s BOLD\"",The_GetSuffix ());
|
||||
HTM_Txt (Gbl.Usrs.Me.UsrDat.FullName);
|
||||
HTM_SPAN_End ();
|
||||
|
||||
|
@ -294,8 +292,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
|
|||
{
|
||||
HTM_BR ();
|
||||
HTM_TxtColonNBSP (Txt_Date);
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF ("%s %s UTC",CurrentTimeUTC->StrDate,
|
||||
CurrentTimeUTC->StrTime);
|
||||
HTM_SPAN_End ();
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
struct Rep_CurrentTimeUTC
|
||||
{
|
||||
char StrDate[3 * (Cns_MAX_DECIMAL_DIGITS_INT + 1)]; // Example: 2016-10-02
|
||||
char StrTime[3 * (Cns_MAX_DECIMAL_DIGITS_INT + 1)]; // Example: 19:03:49
|
||||
char StrDate[3 * (Cns_MAX_DIGITS_INT + 1)]; // Example: 2016-10-02
|
||||
char StrTime[3 * (Cns_MAX_DIGITS_INT + 1)]; // Example: 19:03:49
|
||||
unsigned Date; // Example: 20161002
|
||||
unsigned Time; // Example: 190349
|
||||
};
|
||||
|
|
|
@ -450,7 +450,7 @@ Rsc_Type_t Rsc_GetTypeFromString (const char *Str)
|
|||
|
||||
bool Rsc_GetParLink (struct Rsc_Link *Link)
|
||||
{
|
||||
char TypeCod[3 + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char TypeCod[3 + 1 + Cns_MAX_DIGITS_LONG + 1];
|
||||
char TypeStr[3 + 1];
|
||||
long Cod;
|
||||
|
||||
|
|
|
@ -549,9 +549,9 @@ void Rol_PutParRoles (unsigned Roles)
|
|||
|
||||
unsigned Rol_GetSelectedRoles (void)
|
||||
{
|
||||
char StrRoles[Rol_NUM_ROLES * (Cns_MAX_DECIMAL_DIGITS_UINT + 1)];
|
||||
char StrRoles[Rol_NUM_ROLES * (Cns_MAX_DIGITS_UINT + 1)];
|
||||
const char *Ptr;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
Rol_Role_t Role;
|
||||
unsigned Roles;
|
||||
|
||||
|
@ -563,11 +563,11 @@ unsigned Rol_GetSelectedRoles (void)
|
|||
0); // 000...000
|
||||
|
||||
/***** Try to get multiple param "Role" *****/
|
||||
Par_GetParMultiToText ("Role",StrRoles,Rol_NUM_ROLES * (Cns_MAX_DECIMAL_DIGITS_UINT + 1));
|
||||
Par_GetParMultiToText ("Role",StrRoles,Rol_NUM_ROLES * (Cns_MAX_DIGITS_UINT + 1));
|
||||
for (Ptr = StrRoles;
|
||||
*Ptr;)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DIGITS_UINT);
|
||||
Role = Rol_ConvertUnsignedStrToRole (UnsignedStr);
|
||||
if (Role != Rol_UNK)
|
||||
Roles |= (1 << Role);
|
||||
|
|
37
swad_room.c
37
swad_room.c
|
@ -124,7 +124,7 @@ static Roo_RoomType_t Roo_GetParType (void);
|
|||
|
||||
static void Roo_RenameRoom (Nam_ShrtOrFullName_t ShrtOrFull);
|
||||
|
||||
static void Roo_WriteCapacity (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned Capacity);
|
||||
static void Roo_WriteCapacity (char Str[Cns_MAX_DIGITS_UINT + 1],unsigned Capacity);
|
||||
|
||||
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings);
|
||||
static void Roo_PutHeadRooms (void);
|
||||
|
@ -159,7 +159,7 @@ void Roo_SeeRooms (void)
|
|||
struct Roo_Rooms Rooms;
|
||||
Roo_Order_t Order;
|
||||
unsigned NumRoom;
|
||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrCapacity[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (Gbl.Hierarchy.Node[Hie_CTR].HieCod <= 0) // No center selected
|
||||
|
@ -223,44 +223,38 @@ void Roo_SeeRooms (void)
|
|||
|
||||
/* Building short name */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Rooms.Lst[NumRoom].BldShrtName);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Floor */
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Int (Rooms.Lst[NumRoom].Floor);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Type */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Ico_PutIconOn (Roo_TypesIcons[Rooms.Lst[NumRoom].Type],Ico_BLACK,
|
||||
Txt_ROOM_TYPES[Rooms.Lst[NumRoom].Type]);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Short name */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Rooms.Lst[NumRoom].ShrtName);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Full name */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Txt (Rooms.Lst[NumRoom].FullName);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Capacity */
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Roo_WriteCapacity (StrCapacity,Rooms.Lst[NumRoom].Capacity);
|
||||
HTM_Txt (StrCapacity);
|
||||
HTM_TD_End ();
|
||||
|
@ -272,8 +266,7 @@ void Roo_SeeRooms (void)
|
|||
case Rol_INS_ADM:
|
||||
case Rol_SYS_ADM:
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Roo_GetAndListMACAddresses (Rooms.Lst[NumRoom].RooCod);
|
||||
HTM_TD_End ();
|
||||
break;
|
||||
|
@ -633,7 +626,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
unsigned NumRoom;
|
||||
struct Roo_Room *Room;
|
||||
char *Anchor = NULL;
|
||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrCapacity[Cns_MAX_DIGITS_UINT + 1];
|
||||
const char *Names[Nam_NUM_SHRT_FULL_NAMES];
|
||||
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
@ -708,7 +701,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
Frm_BeginFormAnchor (ActChgRooMaxUsr,Anchor);
|
||||
ParCod_PutPar (ParCod_Roo,Room->RooCod);
|
||||
Roo_WriteCapacity (StrCapacity,Room->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DIGITS_UINT,StrCapacity,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -1157,10 +1150,10 @@ void Roo_ChangeCapacity (void)
|
|||
/********************* Write seating capacity of a room **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Roo_WriteCapacity (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned Capacity)
|
||||
static void Roo_WriteCapacity (char Str[Cns_MAX_DIGITS_UINT + 1],unsigned Capacity)
|
||||
{
|
||||
if (Capacity <= Roo_MAX_CAPACITY)
|
||||
snprintf (Str,Cns_MAX_DECIMAL_DIGITS_UINT + 1,"%u",Capacity);
|
||||
snprintf (Str,Cns_MAX_DIGITS_UINT + 1,"%u",Capacity);
|
||||
else
|
||||
Str[0] = '\0';
|
||||
}
|
||||
|
@ -1187,7 +1180,7 @@ void Roo_ContEditAfterChgRoom (void)
|
|||
|
||||
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
||||
{
|
||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrCapacity[Cns_MAX_DIGITS_UINT + 1];
|
||||
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
|
||||
const char *Names[Nam_NUM_SHRT_FULL_NAMES];
|
||||
|
||||
|
@ -1234,7 +1227,7 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
|||
/***** Seating capacity *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DIGITS_UINT,StrCapacity,
|
||||
HTM_NO_ATTR,
|
||||
"size=\"3\" class=\"INPUT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -893,9 +893,7 @@ static void RubCri_ListOneOrMoreCriteriaInProject (struct Prj_Projects *Projects
|
|||
|
||||
/***** Weighted score *****/
|
||||
RubCri_WriteTxt ("=");
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",The_GetSuffix (),The_GetColorRows ());
|
||||
WeightedScore = CriterionScore * Criterion.Weight;
|
||||
HTM_Double2Decimals (WeightedScore);
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -277,9 +277,7 @@ void Sch_PutInputStringToSearch (const char *IdInputText)
|
|||
HTM_INPUT_SEARCH ("Search",Sch_MAX_CHARS_STRING_TO_FIND,Search->Str,
|
||||
"id=\"%s\" size=\"16\" class=\"INPUT_%s\""
|
||||
" placeholder=\"%s…\"",
|
||||
IdInputText,
|
||||
The_GetSuffix (),
|
||||
Txt_Search);
|
||||
IdInputText,The_GetSuffix (),Txt_Search);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -360,8 +360,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
/* Selection of count type (number of pages generated, accesses per user, etc.) */
|
||||
Sta_WriteSelectorCountType (Stats);
|
||||
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_distributed_by);
|
||||
HTM_NBSP ();
|
||||
HTM_SELECT_Begin (HTM_NO_ATTR,NULL,
|
||||
|
@ -385,8 +384,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
HTM_BR ();
|
||||
|
||||
/***** Option b) Listing of detailed clicks to this course *****/
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_INPUT_RADIO ("GroupedOrDetailed",
|
||||
(Stats->ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST) ? HTM_CHECKED :
|
||||
HTM_NO_ATTR,
|
||||
|
@ -518,8 +516,7 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
|||
Sta_WriteSelectorCountType (Stats);
|
||||
|
||||
/***** Type of statistic *****/
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_distributed_by);
|
||||
HTM_NBSP ();
|
||||
|
||||
|
@ -1694,8 +1691,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
|||
Hour++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"CT LOG_%s\" style=\"width:%upx;\"",
|
||||
The_GetSuffix (),
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH);
|
||||
The_GetSuffix (),GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH);
|
||||
HTM_TxtF ("%02uh",Hour);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
@ -1916,17 +1912,17 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,double HitsMax)
|
|||
Interval++)
|
||||
{
|
||||
HTM_TD_Begin ("colspan=\"%u\" class=\"CB LOG_%s\" style=\"width:%upx;\"",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH / 5,
|
||||
The_GetSuffix (),
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH / 5);
|
||||
HTM_DoubleFewDigits ((double) Interval * HitsMax / 5.0);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
HTM_TD_Begin ("colspan=\"%u\" class=\"RB LOG_%s\" style=\"width:%upx;\"",
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH / 5) / 2,
|
||||
The_GetSuffix (),
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH / 5) / 2);
|
||||
HTM_DoubleFewDigits (HitsMax);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2432,8 +2428,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
|
|||
unsigned BarHeight;
|
||||
|
||||
HTM_TD_Begin ("class=\"CB DAT_SMALL_%s\" style=\"width:%upx;\"",
|
||||
The_GetSuffix (),
|
||||
ColumnWidth);
|
||||
The_GetSuffix (),ColumnWidth);
|
||||
|
||||
/* Draw bar with a height porportional to the number of clicks */
|
||||
if (Hits->Num > 0.0)
|
||||
|
@ -2903,9 +2898,7 @@ static void Sta_ShowNumHitsPerBanner (Sta_CountType_t CountType,
|
|||
HTM_TD_Begin ("class=\"LT LOG_%s\"",The_GetSuffix ());
|
||||
HTM_A_Begin ("href=\"%s\" title=\"%s\" target=\"_blank\""
|
||||
" class=\"DAT_%s\"",
|
||||
Ban.WWW,
|
||||
Ban.FullName,
|
||||
The_GetSuffix ());
|
||||
Ban.WWW,Ban.FullName,The_GetSuffix ());
|
||||
HTM_IMG (Cfg_URL_BANNER_PUBLIC,Ban.Img,Ban.FullName,
|
||||
"style=\"margin:0 10px 5px 0;\"");
|
||||
HTM_A_End ();
|
||||
|
|
|
@ -69,7 +69,7 @@ extern struct Globals Gbl;
|
|||
#define Svy_MAX_CHARS_ANSWER (1024 - 1) // 1023
|
||||
#define Svy_MAX_BYTES_ANSWER ((Svy_MAX_CHARS_ANSWER + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 16383
|
||||
|
||||
#define Svy_MAX_BYTES_LIST_ANSWER_TYPES (Svy_NUM_ANS_TYPES * (Cns_MAX_DECIMAL_DIGITS_UINT + 1))
|
||||
#define Svy_MAX_BYTES_LIST_ANSWER_TYPES (Svy_NUM_ANS_TYPES * (Cns_MAX_DIGITS_UINT + 1))
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private prototypes ****************************/
|
||||
|
@ -3061,7 +3061,7 @@ void Svy_ReqRemQst (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_question_X;
|
||||
struct Svy_Surveys Surveys;
|
||||
struct Svy_Question SvyQst;
|
||||
char StrQstInd[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrQstInd[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Reset surveys *****/
|
||||
Svy_ResetSurveys (&Surveys);
|
||||
|
@ -3179,9 +3179,9 @@ static void Svy_ReceiveAndStoreUserAnswersToASurvey (long SvyCod)
|
|||
unsigned NumQsts;
|
||||
long QstCod;
|
||||
char ParName[3 + 10 + 6 + 1];
|
||||
char StrAnswersIndexes[Svy_MAX_ANSWERS_PER_QUESTION * (Cns_MAX_DECIMAL_DIGITS_UINT + 1)];
|
||||
char StrAnswersIndexes[Svy_MAX_ANSWERS_PER_QUESTION * (Cns_MAX_DIGITS_UINT + 1)];
|
||||
const char *Ptr;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned AnsInd;
|
||||
char Comments[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
||||
|
@ -3201,11 +3201,13 @@ static void Svy_ReceiveAndStoreUserAnswersToASurvey (long SvyCod)
|
|||
/* Get possible parameter with the user's answer */
|
||||
snprintf (ParName,sizeof (ParName),"Ans%010u",(unsigned) QstCod);
|
||||
Par_GetParMultiToText (ParName,StrAnswersIndexes,
|
||||
Svy_MAX_ANSWERS_PER_QUESTION * (Cns_MAX_DECIMAL_DIGITS_UINT + 1));
|
||||
Svy_MAX_ANSWERS_PER_QUESTION *
|
||||
(Cns_MAX_DIGITS_UINT + 1));
|
||||
Ptr = StrAnswersIndexes;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,
|
||||
Cns_MAX_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&AnsInd) == 1)
|
||||
// Parameter exists ==> user has checked this answer
|
||||
// ==> store it in database
|
||||
|
|
|
@ -607,8 +607,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
/***** Code of the item *****/
|
||||
HTM_TD_Begin ("class=\"RT %s_%s %s\" style=\"width:%dpx;\"",
|
||||
ClassSyllabus[Level],The_GetSuffix (),
|
||||
The_GetColorRows (),
|
||||
Level * Syl_WIDTH_NUM_SYLLABUS);
|
||||
The_GetColorRows (),Level * Syl_WIDTH_NUM_SYLLABUS);
|
||||
if (Level == 1)
|
||||
HTM_NBSP ();
|
||||
HTM_TxtF ("%s ",StrItemCod);
|
||||
|
@ -848,7 +847,7 @@ static void Syl_PutParsSyllabus (void *Syllabus)
|
|||
static void Syl_WriteNumItem (char *StrDst,FILE *FileTgt,int Level,int *CodItem)
|
||||
{
|
||||
int N;
|
||||
char InStr[Cns_MAX_DECIMAL_DIGITS_INT + 1];
|
||||
char InStr[Cns_MAX_DIGITS_INT + 1];
|
||||
|
||||
if (StrDst)
|
||||
StrDst[0] = '\0';
|
||||
|
|
|
@ -102,7 +102,8 @@ void Tab_DrawTabs (void)
|
|||
if (ClassIcoTab[Gbl.Prefs.IconSet])
|
||||
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),TabTxt,
|
||||
"class=\"TAB_ICO %s_%s\"",
|
||||
ClassIcoTab[Gbl.Prefs.IconSet],The_GetSuffix ());
|
||||
ClassIcoTab[Gbl.Prefs.IconSet],
|
||||
The_GetSuffix ());
|
||||
else
|
||||
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),TabTxt,
|
||||
"class=\"TAB_ICO\"");
|
||||
|
|
17
swad_tag.c
17
swad_tag.c
|
@ -283,7 +283,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
|
|||
unsigned NumTag;
|
||||
MYSQL_ROW row;
|
||||
bool TagHidden = false;
|
||||
HTM_Attributes_t Checked;
|
||||
HTM_Attributes_t Attributes;
|
||||
const char *Ptr;
|
||||
char TagText[Tag_MAX_BYTES_TAG + 1];
|
||||
/*
|
||||
|
@ -338,16 +338,17 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
|
|||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
Checked = HTM_NO_ATTR;
|
||||
Attributes = HTM_NO_ATTR;
|
||||
if (Tags->List)
|
||||
{
|
||||
Ptr = Tags->List;
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,TagText,Tag_MAX_BYTES_TAG);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,TagText,
|
||||
Tag_MAX_BYTES_TAG);
|
||||
if (!strcmp (row[1],TagText))
|
||||
{
|
||||
Checked = HTM_CHECKED;
|
||||
Attributes = HTM_CHECKED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -356,7 +357,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
|
|||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_LABEL_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
|
||||
HTM_INPUT_CHECKBOX ("ChkTag",
|
||||
Checked,
|
||||
Attributes,
|
||||
"value=\"%s\""
|
||||
" onclick=\"checkParent(this,'AllTags');\"",
|
||||
row[1]);
|
||||
|
@ -484,8 +485,7 @@ void Tag_GetAndWriteTagsQst (long QstCod)
|
|||
if ((NumTags = Tag_DB_GetTagsQst (&mysql_res,QstCod)))
|
||||
{
|
||||
/***** Write the tags *****/
|
||||
HTM_UL_Begin ("class=\"Tst_TAG_LIST DAT_SMALL_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_UL_Begin ("class=\"Tst_TAG_LIST DAT_SMALL_%s\"",The_GetSuffix ());
|
||||
for (NumTag = 0;
|
||||
NumTag < NumTags;
|
||||
NumTag++)
|
||||
|
@ -499,8 +499,7 @@ void Tag_GetAndWriteTagsQst (long QstCod)
|
|||
}
|
||||
else
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"DAT_SMALL_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_SMALL_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF ("(%s)",Txt_no_tags);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
|
|
15
swad_test.c
15
swad_test.c
|
@ -364,8 +364,7 @@ void Tst_AssessTest (void)
|
|||
/***** Header *****/
|
||||
if (Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS] == Usr_BELONG)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"Tst_SUBTITLE DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"Tst_SUBTITLE DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF (Txt_Test_No_X_that_you_make_in_this_course,NumTst);
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
@ -376,8 +375,7 @@ void Tst_AssessTest (void)
|
|||
/***** Write total score and grade *****/
|
||||
if (TstVis_IsVisibleTotalScore (TstCfg_GetConfigVisibility ()))
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM DAT_STRONG_%s BOLD\"",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("class=\"CM DAT_STRONG_%s BOLD\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Score);
|
||||
HTM_Double2Decimals (Print.Score);
|
||||
HTM_BR ();
|
||||
|
@ -575,7 +573,7 @@ static void Tst_GenerateChoiceIndexes (struct TstPrn_PrintedQuestion *PrintedQue
|
|||
MYSQL_ROW row;
|
||||
unsigned Index;
|
||||
bool ErrorInIndex;
|
||||
char StrInd[1 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrInd[1 + Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Create test question *****/
|
||||
Qst_QstConstructor (&Question);
|
||||
|
@ -637,7 +635,7 @@ bool Tst_GetParsTst (struct Qst_Questions *Questions,
|
|||
extern const char *Txt_You_must_select_one_ore_more_types_of_answer;
|
||||
extern const char *Txt_The_number_of_questions_must_be_in_the_interval_X;
|
||||
bool Error = false;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned UnsignedNum;
|
||||
|
||||
/***** Tags *****/
|
||||
|
@ -703,7 +701,7 @@ bool Tst_GetParsTst (struct Qst_Questions *Questions,
|
|||
Dat_GetIniEndDatesFromForm ();
|
||||
|
||||
/* Get ordering criteria */
|
||||
Par_GetParMultiToText ("Order",UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetParMultiToText ("Order",UnsignedStr,Cns_MAX_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&UnsignedNum) == 1)
|
||||
Questions->SelectedOrder = (Qst_QuestionsOrder_t)
|
||||
((UnsignedNum < Qst_NUM_TYPES_ORDER_QST) ? UnsignedNum :
|
||||
|
@ -829,8 +827,7 @@ void Tst_GetAndShowTestsStats (void)
|
|||
HTM_TD_LINE_TOP_Txt (Txt_Total);
|
||||
HTM_TD_LINE_TOP_Unsigned (Stats.NumCoursesWithQuestions);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",The_GetSuffix ());
|
||||
HTM_TxtF ("%u (%.1f%%)",
|
||||
Stats.NumCoursesWithPluggableQuestions,
|
||||
Stats.NumCoursesWithQuestions ? (double) Stats.NumCoursesWithPluggableQuestions * 100.0 /
|
||||
|
|
|
@ -155,7 +155,7 @@ static void TstCfg_ShowFormConfig (void)
|
|||
extern const char *Txt_Save_changes;
|
||||
struct Qst_Questions Questions;
|
||||
TstCfg_Pluggable_t Pluggable;
|
||||
char StrMinTimeNxtTstPerQst[Cns_MAX_DECIMAL_DIGITS_ULONG + 1];
|
||||
char StrMinTimeNxtTstPerQst[Cns_MAX_DIGITS_ULONG + 1];
|
||||
|
||||
/***** Create test *****/
|
||||
Qst_Constructor (&Questions);
|
||||
|
@ -217,7 +217,7 @@ static void TstCfg_ShowFormConfig (void)
|
|||
HTM_TD_Begin ("class=\"LB\"");
|
||||
snprintf (StrMinTimeNxtTstPerQst,sizeof (StrMinTimeNxtTstPerQst),"%lu",
|
||||
TstCfg_GetConfigMinTimeNxtTstPerQst ());
|
||||
HTM_INPUT_TEXT ("MinTimeNxtTstPerQst",Cns_MAX_DECIMAL_DIGITS_ULONG,
|
||||
HTM_INPUT_TEXT ("MinTimeNxtTstPerQst",Cns_MAX_DIGITS_ULONG,
|
||||
StrMinTimeNxtTstPerQst,
|
||||
HTM_REQUIRED,
|
||||
"id=\"MinTimeNxtTstPerQst\" size=\"7\""
|
||||
|
@ -256,20 +256,19 @@ static void TstCfg_ShowFormConfig (void)
|
|||
static void TstCfg_PutInputFieldNumQsts (const char *Field,const char *Label,
|
||||
unsigned Value)
|
||||
{
|
||||
char StrValue[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrValue[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
HTM_LABEL_Begin ("for=\"%s\" class=\"DAT_%s\"",
|
||||
Field,The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("for=\"%s\" class=\"DAT_%s\"",Field,The_GetSuffix ());
|
||||
HTM_Txt (Label);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
snprintf (StrValue,sizeof (StrValue),"%u",Value);
|
||||
HTM_INPUT_TEXT (Field,Cns_MAX_DECIMAL_DIGITS_UINT,StrValue,
|
||||
HTM_INPUT_TEXT (Field,Cns_MAX_DIGITS_UINT,StrValue,
|
||||
HTM_REQUIRED,
|
||||
"id=\"%s\" size=\"3\" class=\"INPUT_%s\"",
|
||||
Field,The_GetSuffix ());
|
||||
|
|
|
@ -347,7 +347,7 @@ static void TstPrn_WriteIntAnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd);
|
||||
|
@ -364,7 +364,7 @@ static void TstPrn_WriteFltAnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd);
|
||||
|
@ -416,8 +416,8 @@ static void TstPrn_WriteChoAnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
unsigned NumOpt;
|
||||
unsigned Indexes[Qst_MAX_OPTIONS_PER_QUESTION]; // Indexes of all answers of this question
|
||||
HTM_Attributes_t UsrAnswers[Qst_MAX_OPTIONS_PER_QUESTION];
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x_yy...y"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char Id[3 + Cns_MAX_DIGITS_UINT + 1 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x_yy...y"
|
||||
|
||||
/***** Change format of answers text *****/
|
||||
Qst_ChangeFormatAnswersText (Question);
|
||||
|
@ -503,7 +503,7 @@ static void TstPrn_WriteTxtAnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
unsigned QstInd,
|
||||
__attribute__((unused)) struct Qst_Question *Question)
|
||||
{
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Write input field for the answer *****/
|
||||
snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd);
|
||||
|
@ -718,7 +718,7 @@ static void TstPrn_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
|||
void TstPrn_GetAnswersFromForm (struct TstPrn_Print *Print)
|
||||
{
|
||||
unsigned QstInd;
|
||||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
char StrAns[3 + Cns_MAX_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
/***** Loop for every question getting user's answers *****/
|
||||
for (QstInd = 0;
|
||||
|
@ -1066,14 +1066,14 @@ void TstPrn_GetIndexesFromStr (const char StrIndexesOneQst[Qst_MAX_BYTES_INDEXES
|
|||
{
|
||||
unsigned NumOpt;
|
||||
const char *Ptr;
|
||||
char StrOneIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrOneIndex[Cns_MAX_DIGITS_UINT + 1];
|
||||
|
||||
/***** Get indexes from string *****/
|
||||
for (NumOpt = 0, Ptr = StrIndexesOneQst;
|
||||
NumOpt < Qst_MAX_OPTIONS_PER_QUESTION && *Ptr;
|
||||
NumOpt++)
|
||||
{
|
||||
Par_GetNextStrUntilComma (&Ptr,StrOneIndex,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilComma (&Ptr,StrOneIndex,Cns_MAX_DIGITS_UINT);
|
||||
|
||||
if (sscanf (StrOneIndex,"%u",&(Indexes[NumOpt])) != 1)
|
||||
Err_WrongAnswerIndexExit ();
|
||||
|
@ -1098,7 +1098,7 @@ void TstPrn_GetAnswersFromStr (const char StrAnswersOneQst[Qst_MAX_BYTES_ANSWERS
|
|||
{
|
||||
unsigned NumOpt;
|
||||
const char *Ptr;
|
||||
char StrOneAnswer[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char StrOneAnswer[Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned AnsUsr;
|
||||
|
||||
/***** Initialize all answers to unchecked *****/
|
||||
|
@ -1112,7 +1112,7 @@ void TstPrn_GetAnswersFromStr (const char StrAnswersOneQst[Qst_MAX_BYTES_ANSWERS
|
|||
NumOpt < Qst_MAX_OPTIONS_PER_QUESTION && *Ptr;
|
||||
NumOpt++)
|
||||
{
|
||||
Par_GetNextStrUntilComma (&Ptr,StrOneAnswer,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilComma (&Ptr,StrOneAnswer,Cns_MAX_DIGITS_UINT);
|
||||
|
||||
if (sscanf (StrOneAnswer,"%u",&AnsUsr) != 1)
|
||||
Err_WrongAnswerExit ();
|
||||
|
@ -1804,7 +1804,7 @@ static void TstPrn_ShowUsrsPrints (__attribute__((unused)) void *Args)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,Gbl.Usrs.Other.UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
|
|
@ -133,13 +133,13 @@ unsigned TstVis_GetVisibilityFromForm (void)
|
|||
size_t MaxSizeListVisibilitySelected;
|
||||
char *StrVisibilitySelected;
|
||||
const char *Ptr;
|
||||
char UnsignedStr[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char UnsignedStr[Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned UnsignedNum;
|
||||
TstVis_Visibility_t VisibilityItem;
|
||||
unsigned Visibility = 0; // Nothing selected
|
||||
|
||||
/***** Allocate memory for list of attendance events selected *****/
|
||||
MaxSizeListVisibilitySelected = TstVis_NUM_ITEMS_VISIBILITY * (Cns_MAX_DECIMAL_DIGITS_UINT + 1);
|
||||
MaxSizeListVisibilitySelected = TstVis_NUM_ITEMS_VISIBILITY * (Cns_MAX_DIGITS_UINT + 1);
|
||||
if ((StrVisibilitySelected = malloc (MaxSizeListVisibilitySelected + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
|
@ -153,7 +153,7 @@ unsigned TstVis_GetVisibilityFromForm (void)
|
|||
)
|
||||
{
|
||||
/* Get next visibility item selected */
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UnsignedStr,Cns_MAX_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&UnsignedNum) == 1)
|
||||
if (UnsignedNum < TstVis_NUM_ITEMS_VISIBILITY)
|
||||
{
|
||||
|
|
|
@ -3052,25 +3052,25 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] =
|
|||
,
|
||||
[ActReqInsLog] =
|
||||
#if L==1 // ca
|
||||
"Request logo of the current institution" // Necessita traducció
|
||||
"Sol·licitar canvi de logo de la institució"
|
||||
#elif L==2 // de
|
||||
"Request logo of the current institution" // Need Übersetzung
|
||||
"Fordern Sie eine Änderung des Logos der Institution an"
|
||||
#elif L==3 // en
|
||||
"Request logo of the current institution"
|
||||
"Request change of institution logo"
|
||||
#elif L==4 // es
|
||||
"Solicitar el logo de institución actual"
|
||||
"Solicitar cambio del logo de institución"
|
||||
#elif L==5 // fr
|
||||
"Request logo of the current institution" // Besoin de traduction
|
||||
"Demander le changement du logo de l'établissement"
|
||||
#elif L==6 // gn
|
||||
"Solicitar el logo de institución actual" // Okoteve traducción
|
||||
"Ojerúre oñemoambue haguã institución logotipo"
|
||||
#elif L==7 // it
|
||||
"Request logo of the current institution" // Bisogno di traduzione
|
||||
"Richiedere la modifica del logo dell'istituzione"
|
||||
#elif L==8 // pl
|
||||
"Request logo of the current institution" // Potrzebujesz tlumaczenie
|
||||
"Złóż wniosek o zmianę logo instytucji"
|
||||
#elif L==9 // pt
|
||||
"Request logo of the current institution" // Precisa de tradução
|
||||
"Solicitar alteração da logomarca da instituição"
|
||||
#elif L==10 // tr
|
||||
"Request logo of the current institution" // Çeviri lazim!
|
||||
"Kurumun logosunun değiştirilmesini talep edin"
|
||||
#endif
|
||||
,
|
||||
[ActRecInsLog] =
|
||||
|
|
|
@ -194,7 +194,7 @@ void TmlFrm_EndForm (void)
|
|||
void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||
{
|
||||
char *OnSubmit;
|
||||
char ParStr[7 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char ParStr[7 + Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Create parameter string *****/
|
||||
sprintf (ParStr,Form->ParFormat,Form->ParCod);
|
||||
|
|
82
swad_user.c
82
swad_user.c
|
@ -1305,9 +1305,9 @@ void Usr_WelcomeUsr (void)
|
|||
void Usr_CreateBirthdayStrDB (const struct Usr_Data *UsrDat,
|
||||
char BirthdayStrDB[Usr_BIRTHDAY_STR_DB_LENGTH + 1])
|
||||
{
|
||||
char BirthdayStrTmp[1 + Cns_MAX_DECIMAL_DIGITS_UINT +
|
||||
1 + Cns_MAX_DECIMAL_DIGITS_UINT +
|
||||
1 + Cns_MAX_DECIMAL_DIGITS_UINT +
|
||||
char BirthdayStrTmp[1 + Cns_MAX_DIGITS_UINT +
|
||||
1 + Cns_MAX_DIGITS_UINT +
|
||||
1 + Cns_MAX_DIGITS_UINT +
|
||||
1 + 1];
|
||||
|
||||
if (UsrDat->Birthday.Year == 0 ||
|
||||
|
@ -1384,8 +1384,7 @@ void Usr_WriteLoggedUsrHead (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&ClassSelect,"SEL_ROLE INPUT_%s",
|
||||
The_GetSuffix ()) < 0)
|
||||
if (asprintf (&ClassSelect,"SEL_ROLE INPUT_%s",The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Rol_PutFormToChangeMyRole (ClassSelect);
|
||||
free (ClassSelect);
|
||||
|
@ -2071,8 +2070,7 @@ void Usr_ShowFormsLogoutAndRole (void)
|
|||
HTM_TxtColonNBSP (Txt_Role);
|
||||
HTM_SPAN_End ();
|
||||
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s BOLD\"",
|
||||
The_GetSuffix ());
|
||||
HTM_SPAN_Begin ("class=\"DAT_STRONG_%s BOLD\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
|
@ -2080,8 +2078,7 @@ void Usr_ShowFormsLogoutAndRole (void)
|
|||
{
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Role);
|
||||
if (asprintf (&ClassSelect,"INPUT_%s",
|
||||
The_GetSuffix ()) < 0)
|
||||
if (asprintf (&ClassSelect,"INPUT_%s",The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Rol_PutFormToChangeMyRole (ClassSelect);
|
||||
free (ClassSelect);
|
||||
|
@ -2198,8 +2195,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
|||
HTM_TD_Begin ("class=\"BM %s_%s %s\" title=\"%s\"",
|
||||
UsrDat->Accepted ? "USR_LIST_NUM_N" :
|
||||
"USR_LIST_NUM",
|
||||
The_GetSuffix (),
|
||||
BgColor,
|
||||
The_GetSuffix (),BgColor,
|
||||
UsrDat->Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed);
|
||||
HTM_Txt (UsrDat->Accepted ? "✓" :
|
||||
|
@ -2210,8 +2206,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
|||
HTM_TD_Begin ("class=\"%s_%s RM %s\"",
|
||||
UsrDat->Accepted ? "USR_LIST_NUM_N" :
|
||||
"USR_LIST_NUM",
|
||||
The_GetSuffix (),
|
||||
BgColor);
|
||||
The_GetSuffix (),BgColor);
|
||||
HTM_Unsigned (NumUsr);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2228,8 +2223,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
UsrDat->Accepted ? "DAT_SMALL_STRONG" :
|
||||
"DAT_SMALL",
|
||||
The_GetSuffix (),
|
||||
BgColor);
|
||||
The_GetSuffix (),BgColor);
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2278,8 +2272,7 @@ static void Usr_WriteRowGstAllData (struct Usr_Data *UsrDat)
|
|||
|
||||
/****** Write user's ID ******/
|
||||
HTM_TD_Begin ("class=\"LM DAT_SMALL_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2375,8 +2368,7 @@ static void Usr_WriteRowStdAllData (struct Usr_Data *UsrDat,char *GroupNames)
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
UsrDat->Accepted ? "DAT_SMALL_STRONG" :
|
||||
"DAT_SMALL",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2485,8 +2477,7 @@ static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat)
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
UsrDat->Accepted ? "DAT_SMALL_STRONG" :
|
||||
"DAT_SMALL",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2497,8 +2488,8 @@ static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat)
|
|||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,The_GetColorRows ());
|
||||
Usr_WriteEmail (UsrDat,The_GetColorRows ());
|
||||
Usr_WriteUsrData (The_GetColorRows (),
|
||||
Ins.FullName,
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Ins.FullName,NULL,
|
||||
true,UsrDat->Accepted);
|
||||
|
||||
/***** Write the rest of teacher's data *****/
|
||||
if (ShowData && UsrDat->Tch.CtrCod > 0)
|
||||
|
@ -2552,8 +2543,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat)
|
|||
|
||||
/***** Write number of user *****/
|
||||
HTM_TD_Begin ("class=\"CM USR_LIST_NUM_N_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_Unsigned (NumUsr);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2570,8 +2560,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat)
|
|||
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
|
||||
UsrDat->Accepted ? "DAT_SMALL_STRONG" :
|
||||
"DAT_SMALL",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
HTM_NBSP ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2654,8 +2643,7 @@ static void Usr_WriteUsrData (const char *BgColor,
|
|||
"DAT_SMALL_STRONG") :
|
||||
(NonBreak ? "DAT_SMALL_NOBR" :
|
||||
"DAT_SMALL"),
|
||||
The_GetSuffix (),
|
||||
BgColor);
|
||||
The_GetSuffix (),BgColor);
|
||||
|
||||
/***** Container to limit length *****/
|
||||
HTM_DIV_Begin ("class=\"USR_DAT\"");
|
||||
|
@ -3377,7 +3365,7 @@ bool Usr_FindEncUsrCodInListOfSelectedEncUsrCods (const char *EncryptedUsrCodToF
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,EncryptedUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
if (!strcmp (EncryptedUsrCodToFind,EncryptedUsrCod))
|
||||
return true; // Found!
|
||||
}
|
||||
|
@ -3399,7 +3387,7 @@ bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct Usr_Selecte
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (UsrDat.UsrCod > 0)
|
||||
return true;
|
||||
|
@ -3422,7 +3410,7 @@ unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUs
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
if (UsrDat.UsrCod > 0)
|
||||
NumUsrs++;
|
||||
|
@ -3501,7 +3489,7 @@ void Usr_GetListSelectedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
|||
NumUsr++)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
(*LstSelectedUsrCods)[NumUsr] = UsrDat.UsrCod;
|
||||
}
|
||||
|
@ -3525,12 +3513,12 @@ void Usr_CreateSubqueryUsrCods (long *LstSelectedUsrCods,
|
|||
unsigned NumUsrsInList,
|
||||
char **UsrsSubQuery)
|
||||
{
|
||||
char SubQueryOneUsr[1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char SubQueryOneUsr[1 + Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumUsr;
|
||||
size_t MaxLength;
|
||||
|
||||
/***** Allocate space for subquery *****/
|
||||
MaxLength = (size_t) NumUsrsInList * (size_t) (1 + Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
MaxLength = (size_t) NumUsrsInList * (size_t) (1 + Cns_MAX_DIGITS_LONG);
|
||||
if ((*UsrsSubQuery = malloc (MaxLength + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
(*UsrsSubQuery)[0] = '\0';
|
||||
|
@ -3981,23 +3969,23 @@ static void Usr_PutCheckboxToSelectUser (Rol_Role_t Role,
|
|||
bool UsrIsTheMsgSender,
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
HTM_Attributes_t Checked;
|
||||
HTM_Attributes_t Attributes;
|
||||
char *ParName;
|
||||
|
||||
if (Usr_NameSelUnsel[Role] && Usr_ParUsrCod[Role])
|
||||
{
|
||||
/***** Check box must be checked? *****/
|
||||
if (UsrIsTheMsgSender)
|
||||
Checked = HTM_CHECKED;
|
||||
Attributes = HTM_CHECKED;
|
||||
else
|
||||
/* Check if user is in lists of selected users */
|
||||
Checked = Usr_FindEncUsrCodInListOfSelectedEncUsrCods (EncryptedUsrCod,SelectedUsrs) ? HTM_CHECKED :
|
||||
HTM_NO_ATTR;
|
||||
Attributes = Usr_FindEncUsrCodInListOfSelectedEncUsrCods (EncryptedUsrCod,SelectedUsrs) ? HTM_CHECKED :
|
||||
HTM_NO_ATTR;
|
||||
|
||||
/***** Check box *****/
|
||||
Usr_BuildParName (&ParName,Usr_ParUsrCod[Role],SelectedUsrs->ParSuffix);
|
||||
HTM_INPUT_CHECKBOX (ParName,
|
||||
Checked,
|
||||
Attributes,
|
||||
"value=\"%s\" onclick=\"checkParent(this,'%s')\"",
|
||||
EncryptedUsrCod,Usr_NameSelUnsel[Role]);
|
||||
free (ParName);
|
||||
|
@ -4020,7 +4008,8 @@ static void Usr_PutCheckboxListWithPhotos (void)
|
|||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_INPUT_CHECKBOX ("WithPhotos",
|
||||
(Gbl.Usrs.Listing.WithPhotos ? HTM_CHECKED :
|
||||
HTM_NO_ATTR) | HTM_SUBMIT_ON_CHANGE,
|
||||
HTM_NO_ATTR) |
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"");
|
||||
HTM_Txt (Txt_Display_photos);
|
||||
HTM_LABEL_End ();
|
||||
|
@ -5055,8 +5044,7 @@ void Usr_SeeGuests (void)
|
|||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstGst);
|
||||
Set_PutParsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
HTM_LABEL_End ();
|
||||
|
@ -5199,8 +5187,7 @@ void Usr_SeeStudents (void)
|
|||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstStd);
|
||||
Set_PutParsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
HTM_LABEL_End ();
|
||||
|
@ -5371,8 +5358,7 @@ void Usr_SeeTeachers (void)
|
|||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstTch);
|
||||
Set_PutParsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
HTM_LABEL_End ();
|
||||
|
@ -6214,7 +6200,7 @@ void Usr_PutSelectorNumColsClassPhoto (void)
|
|||
void Usr_ConstructPathUsr (long UsrCod,char PathUsr[PATH_MAX + 1])
|
||||
{
|
||||
char PathAboveUsr[PATH_MAX + 1];
|
||||
char PathUsrTmp[PATH_MAX + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char PathUsrTmp[PATH_MAX + 1 + Cns_MAX_DIGITS_LONG + 1];
|
||||
|
||||
/***** Path for users *****/
|
||||
Fil_CreateDirIfNotExists (Cfg_PATH_USR_PRIVATE);
|
||||
|
|
|
@ -476,7 +476,7 @@ void Usr_DB_BuildQueryToGetUsrsLstCrs (char **Query,Rol_Role_t Role)
|
|||
{
|
||||
unsigned NumPositiveCods = 0;
|
||||
unsigned NumNegativeCods = 0;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char LongStr[Cns_MAX_DIGITS_LONG + 1];
|
||||
unsigned NumGrpSel;
|
||||
long GrpCod;
|
||||
unsigned NumGrpTyp;
|
||||
|
|
|
@ -145,7 +145,7 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDat.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
|
||||
|
||||
|
||||
|
@ -244,7 +244,7 @@ static void ZIP_CreateDirCompressionUsr (struct Usr_Data *UsrDat)
|
|||
char FullNameAndUsrID[NAME_MAX + 1];
|
||||
char PathFolderUsrInsideCrs[128 + PATH_MAX + NAME_MAX];
|
||||
char LinkTmpUsr[PATH_MAX + 1];
|
||||
char Link[PATH_MAX + 1 + Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
char Link[PATH_MAX + 1 + Cns_MAX_DIGITS_UINT + 1];
|
||||
unsigned NumTry;
|
||||
bool Success;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user