Version 16.221.1

This commit is contained in:
Antonio Cañas Vargas 2017-05-23 18:15:59 +02:00
parent ca2b614c2e
commit 3fa0f27557
19 changed files with 272 additions and 261 deletions

View File

@ -473,13 +473,13 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
switch (Gbl.Action.Original) switch (Gbl.Action.Original)
{ {
case ActSeeRecSevGst: case ActSeeRecSevGst:
Usr_PutHiddenParUsrCodAll (ActCnfID_Oth,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActCnfID_Oth,Gbl.Usrs.Select[Rol_UNK]);
break; break;
case ActSeeRecSevStd: case ActSeeRecSevStd:
Usr_PutHiddenParUsrCodAll (ActCnfID_Std,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActCnfID_Std,Gbl.Usrs.Select[Rol_UNK]);
break; break;
case ActSeeRecSevTch: case ActSeeRecSevTch:
Usr_PutHiddenParUsrCodAll (ActCnfID_Tch,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActCnfID_Tch,Gbl.Usrs.Select[Rol_UNK]);
break; break;
} }
} }

View File

@ -1923,9 +1923,9 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqSeeMyTstRes */{1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL}, /* ActReqSeeMyTstRes */{1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL},
/* ActSeeMyTstRes */{1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowMyTestResults ,NULL}, /* ActSeeMyTstRes */{1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowMyTestResults ,NULL},
/* ActSeeOneTstResMe */{1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneTstResMe */{1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL},
/* ActReqSeeUsrTstRes*/{1080,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelUsrsToSeeUsrsTestResults,NULL}, /* ActReqSeeUsrTstRes*/{1080,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelUsrsToSeeUsrsTestResults,NULL},
/* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowUsrsTestResults ,NULL}, /* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowUsrsTestResults ,NULL},
/* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL},
/* ActSeeOneSvy */{ 982,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_SeeOneSurvey ,NULL}, /* ActSeeOneSvy */{ 982,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_SeeOneSurvey ,NULL},
/* ActAnsSvy */{ 983,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_ReceiveSurveyAnswers ,NULL}, /* ActAnsSvy */{ 983,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_ReceiveSurveyAnswers ,NULL},

View File

@ -371,8 +371,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Write first row of data of this attendance event *****/ /***** Write first row of data of this attendance event *****/
/* Forms to remove/edit this attendance event */ /* Forms to remove/edit this attendance event */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\">", "<td rowspan=\"2\" class=\"CONTEXT_COL");
Gbl.RowEvenOdd); if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
switch (Gbl.Usrs.Me.LoggedRole) switch (Gbl.Usrs.Me.LoggedRole)
{ {
case Rol_TCH: case Rol_TCH:
@ -451,8 +453,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Write second row of data of this attendance event *****/ /***** Write second row of data of this attendance event *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">", "<td colspan=\"2\" class=\"LEFT_TOP");
Gbl.RowEvenOdd); if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
/* Author of the attendance event */ /* Author of the attendance event */
Att_WriteAttEventAuthor (Att); Att_WriteAttEventAuthor (Att);
@ -464,8 +468,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
Gbl.RowEvenOdd); if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
if (Gbl.CurrentCrs.Grps.NumGrps) if (Gbl.CurrentCrs.Grps.NumGrps)
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att); Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att);
@ -2258,8 +2264,8 @@ void Att_RegisterMeAsStdInAttEvent (void)
/* Algorithm: /* Algorithm:
1. Get list of students in the groups selected: Gbl.Usrs.LstUsrs[Rol_STD] 1. Get list of students in the groups selected: Gbl.Usrs.LstUsrs[Rol_STD]
2. Mark all students in the groups selected setting Remove=true 2. Mark all students in the groups selected setting Remove=true
3. Get list of students marked as present by me: Gbl.Usrs.Select.Std 3. Get list of students marked as present by me: Gbl.Usrs.Select[Rol_STD]
4. Loop over the list Gbl.Usrs.Select.Std, 4. Loop over the list Gbl.Usrs.Select[Rol_STD],
that holds the list of the students marked as present, that holds the list of the students marked as present,
marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false
5. Delete from att_usr all the students marked as Remove=true 5. Delete from att_usr all the students marked as Remove=true
@ -2301,16 +2307,16 @@ void Att_RegisterStudentsInAttEvent (void)
NumStd++) NumStd++)
Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumStd].Remove = true; Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumStd].Remove = true;
/***** 3. Get list of students marked as present by me: Gbl.Usrs.Select.Std *****/ /***** 3. Get list of students marked as present by me: Gbl.Usrs.Select[Rol_STD] *****/
Usr_GetListsSelectedUsrsCods (); Usr_GetListsSelectedUsrsCods ();
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrData); Usr_UsrDataConstructor (&UsrData);
/***** 4. Loop over the list Gbl.Usrs.Select.Std, /***** 4. Loop over the list Gbl.Usrs.Select[Rol_STD],
that holds the list of the students marked as present, that holds the list of the students marked as present,
marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false *****/ marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false *****/
Ptr = Gbl.Usrs.Select.Std; Ptr = Gbl.Usrs.Select[Rol_STD];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrData.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrData.EncryptedUsrCod,
@ -2863,8 +2869,8 @@ static void Att_GetListSelectedUsrCods (unsigned NumStdsInList,long **LstSelecte
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Loop over the list Gbl.Usrs.Select.All getting users' codes *****/ /***** Loop over the list Gbl.Usrs.Select[Rol_UNK] getting users' codes *****/
for (NumStd = 0, Ptr = Gbl.Usrs.Select.All; for (NumStd = 0, Ptr = Gbl.Usrs.Select[Rol_UNK];
NumStd < NumStdsInList && *Ptr; NumStd < NumStdsInList && *Ptr;
NumStd++) NumStd++)
{ {
@ -3019,7 +3025,7 @@ static void Att_PutParamsToPrintStdsList (void)
if (Gbl.AttEvents.ShowDetails) if (Gbl.AttEvents.ShowDetails)
Par_PutHiddenParamChar ("ShowDetails",'Y'); Par_PutHiddenParamChar ("ShowDetails",'Y');
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
Usr_PutHiddenParUsrCodAll (ActPrnLstStdAtt,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActPrnLstStdAtt,Gbl.Usrs.Select[Rol_UNK]);
if (Gbl.AttEvents.StrAttCodsSelected[0]) if (Gbl.AttEvents.StrAttCodsSelected[0])
Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected); Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected);
} }
@ -3036,7 +3042,7 @@ static void Att_PutButtonToShowDetails (void)
Act_FormStart (Gbl.Action.Act); Act_FormStart (Gbl.Action.Act);
Par_PutHiddenParamChar ("ShowDetails",'Y'); Par_PutHiddenParamChar ("ShowDetails",'Y');
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
if (Gbl.AttEvents.StrAttCodsSelected[0]) if (Gbl.AttEvents.StrAttCodsSelected[0])
Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected); Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected);
Lay_PutConfirmButton (Txt_Show_more_details); Lay_PutConfirmButton (Txt_Show_more_details);
@ -3067,7 +3073,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
{ {
Act_FormStart (Gbl.Action.Act); Act_FormStart (Gbl.Action.Act);
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
} }
/***** Start frame *****/ /***** Start frame *****/

View File

@ -233,13 +233,16 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.221 (2017-05-23)" #define Log_PLATFORM_VERSION "SWAD 16.221.1 (2017-05-23)"
#define CSS_FILE "swad16.209.3.css" #define CSS_FILE "swad16.209.3.css"
#define JS_FILE "swad16.206.3.js" #define JS_FILE "swad16.206.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.221.1: May 23, 2017 Fixed bugs related with new role.
Fixed bug in surveys.
Fixed bug in attendance events. (220260 lines)
Version 16.221: May 23, 2017 Changes in database related with new role. Not finished. (220253 lines) Version 16.221: May 23, 2017 Changes in database related with new role. Not finished. (220253 lines)
8 changes necessary in database: 8 changes necessary in database:
UPDATE announcements SET Roles = (((Roles & 0xFF0) << 1) | (Roles & 0x00F)); UPDATE announcements SET Roles = (((Roles & 0xFF0) << 1) | (Roles & 0x00F));

View File

@ -2444,7 +2444,7 @@ void Brw_PutParamsFileBrowser (Act_Action_t NextAction,
if (Brw_GetIfCrsAssigWorksFileBrowser ()) if (Brw_GetIfCrsAssigWorksFileBrowser ())
{ {
/***** Users selected *****/ /***** Users selected *****/
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select[Rol_UNK]);
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
} }
@ -3206,7 +3206,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
Brw_PutIconShowFigure,Hlp_FILES_Homework_for_teachers,0); Brw_PutIconShowFigure,Hlp_FILES_Homework_for_teachers,0);
/***** List the assignments and works of the selected users *****/ /***** List the assignments and works of the selected users *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod,
@ -4719,7 +4719,8 @@ static void Brw_PutParamsFullTree (void)
if (Brw_GetIfGroupFileBrowser ()) if (Brw_GetIfGroupFileBrowser ())
Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod); Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod);
else if (Brw_GetIfCrsAssigWorksFileBrowser ()) else if (Brw_GetIfCrsAssigWorksFileBrowser ())
Usr_PutHiddenParUsrCodAll (Brw_ActSeeAdm[Gbl.FileBrowser.Type],Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
Gbl.Usrs.Select[Rol_UNK]);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -191,18 +191,15 @@ void Gbl_InitializeGlobals (void)
{ {
Gbl.Usrs.LstUsrs[Role].Lst = NULL; Gbl.Usrs.LstUsrs[Role].Lst = NULL;
Gbl.Usrs.LstUsrs[Role].NumUsrs = 0; Gbl.Usrs.LstUsrs[Role].NumUsrs = 0;
Gbl.Usrs.Select[Role] = NULL;
} }
Gbl.Usrs.ListOtherRecipients = NULL;
Gbl.ExamAnns.NumExaAnns = 0; Gbl.ExamAnns.NumExaAnns = 0;
Gbl.ExamAnns.Lst = NULL; Gbl.ExamAnns.Lst = NULL;
Gbl.ExamAnns.HighlightExaCod = -1L; Gbl.ExamAnns.HighlightExaCod = -1L;
Gbl.ExamAnns.HighlightDate[0] = '\0'; // No exam announcements highlighted Gbl.ExamAnns.HighlightDate[0] = '\0'; // No exam announcements highlighted
Gbl.Usrs.Select.All =
Gbl.Usrs.Select.Std =
Gbl.Usrs.Select.Tch =
Gbl.Usrs.ListOtherRecipients = NULL;
Gbl.Msg.Subject[0] = '\0'; Gbl.Msg.Subject[0] = '\0';
Gbl.Msg.ShowOnlyUnreadMsgs = false; Gbl.Msg.ShowOnlyUnreadMsgs = false;
Gbl.Msg.ExpandedMsgCod = -1L; Gbl.Msg.ExpandedMsgCod = -1L;

View File

@ -374,12 +374,7 @@ struct Globals
unsigned NumIDToConfirm; // Used as hidden parameter to confirm a user's ID unsigned NumIDToConfirm; // Used as hidden parameter to confirm a user's ID
} Other; // Another user, used for example to register in / remove from a course } Other; // Another user, used for example to register in / remove from a course
struct ListUsrs LstUsrs[Rol_NUM_ROLES]; struct ListUsrs LstUsrs[Rol_NUM_ROLES];
struct char *Select[Rol_NUM_ROLES]; // Lists of ID of users from a form
{
char *All;
char *Std;
char *Tch;
} Select; // Lists of ID of users from a form
char *ListOtherRecipients; // List of ID or nicks of users written explicitely on a form char *ListOtherRecipients; // List of ID or nicks of users written explicitely on a form
struct struct
{ {

View File

@ -720,11 +720,11 @@ void Msg_RecMsgFromUsr (void)
Image.Quality = Msg_IMAGE_SAVED_QUALITY; Image.Quality = Msg_IMAGE_SAVED_QUALITY;
Img_GetImageFromForm (-1,&Image,NULL); Img_GetImageFromForm (-1,&Image,NULL);
/***** Loop over the list Gbl.Usrs.Select.All, that holds the list of the /***** Loop over the list Gbl.Usrs.Select[Rol_UNK], that holds the list of the
recipients, creating a received message for each recipient *****/ recipients, creating a received message for each recipient *****/
Str_ChangeFormat (Str_FROM_FORM,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_FORM,Str_TO_RIGOROUS_HTML,
Content,Cns_MAX_BYTES_LONG_TEXT,false); Content,Cns_MAX_BYTES_LONG_TEXT,false);
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
NumRecipients = 0; NumRecipients = 0;
while (*Ptr) while (*Ptr)
{ {

View File

@ -73,7 +73,6 @@ const char *Ntf_WSNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
/* Users tab */ /* Users tab */
"enrollmentStudent", // Ntf_EVENT_ENROLMENT_STD // TODO: Change to "enrolmentStudent" carefully in future versions "enrollmentStudent", // Ntf_EVENT_ENROLMENT_STD // TODO: Change to "enrolmentStudent" carefully in future versions
"enrollmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Change to "enrolmentTeacher" carefully in future versions
"enrollmentTeacher", // Ntf_EVENT_ENROLMENT_TCH // TODO: Change to "enrolmentTeacher" carefully in future versions "enrollmentTeacher", // Ntf_EVENT_ENROLMENT_TCH // TODO: Change to "enrolmentTeacher" carefully in future versions
"enrollmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST // TODO: Change to "enrolmentRequest" carefully in future versions "enrollmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST // TODO: Change to "enrolmentRequest" carefully in future versions
@ -91,9 +90,11 @@ const char *Ntf_WSNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
"message", // Ntf_EVENT_MESSAGE "message", // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
"survey", // Ntf_EVENT_SURVEY
/* Profile tab */ /* Profile tab */
"survey", // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"enrolmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] = static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] =
@ -112,7 +113,6 @@ static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] =
/* Users tab */ /* Users tab */
ActReqAccEnrStd, // Ntf_EVENT_ENROLMENT_STD ActReqAccEnrStd, // Ntf_EVENT_ENROLMENT_STD
ActReqAccEnrNET, // Ntf_EVENT_ENROLMENT_NED_TCH
ActReqAccEnrTch, // Ntf_EVENT_ENROLMENT_TCH ActReqAccEnrTch, // Ntf_EVENT_ENROLMENT_TCH
ActSeeSignUpReq, // Ntf_EVENT_ENROLMENT_REQUEST ActSeeSignUpReq, // Ntf_EVENT_ENROLMENT_REQUEST
@ -130,9 +130,11 @@ static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] =
ActExpRcvMsg, // Ntf_EVENT_MESSAGE ActExpRcvMsg, // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
ActSeeAllSvy, // Ntf_EVENT_SURVEY TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
/* Profile tab */ /* Profile tab */
ActSeeAllSvy, // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
ActReqAccEnrNET, // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
/*****************************************************************************/ /*****************************************************************************/
@ -156,7 +158,6 @@ static const char *Ntf_ParamNotifMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
/* Users tab */ /* Users tab */
"NotifyNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STD "NotifyNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STD
"NotifyNtfEventEnrolmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH
"NotifyNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TCH "NotifyNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TCH
"NotifyNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST "NotifyNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST
@ -174,9 +175,11 @@ static const char *Ntf_ParamNotifMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
"NotifyNtfEventMessage", // Ntf_EVENT_MESSAGE "NotifyNtfEventMessage", // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
"NotifyNtfEventSurvey", // Ntf_EVENT_SURVEY
/* Profile tab */ /* Profile tab */
"NotifyNtfEventSurvey", // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"NotifyNtfEventEnrolmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
// Email me about notification events // Email me about notification events
@ -196,7 +199,6 @@ static const char *Ntf_ParamEmailMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
/* Users tab */ /* Users tab */
"EmailNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STD "EmailNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STD
"EmailNtfEventEnrolmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH
"EmailNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TCH "EmailNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TCH
"EmailNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST "EmailNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST
@ -214,9 +216,11 @@ static const char *Ntf_ParamEmailMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
"EmailNtfEventMessage", // Ntf_EVENT_MESSAGE "EmailNtfEventMessage", // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
"EmailNtfEventSurvey", // Ntf_EVENT_SURVEY
/* Profile tab */ /* Profile tab */
"EmailNtfEventSurvey", // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"EmailNtfEventEnrolmentNonEditingTeacher", // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
// Icons for notification events // Icons for notification events
@ -236,7 +240,6 @@ static const char *Ntf_Icons[Ntf_NUM_NOTIFY_EVENTS] =
/* Users tab */ /* Users tab */
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_STD "adduser16x16.gif", // Ntf_EVENT_ENROLMENT_STD
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_NED_TCH
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_TCH "adduser16x16.gif", // Ntf_EVENT_ENROLMENT_TCH
"enrollmentrequest16x16.gif", // Ntf_EVENT_ENROLMENT_REQUEST "enrollmentrequest16x16.gif", // Ntf_EVENT_ENROLMENT_REQUEST
@ -254,9 +257,11 @@ static const char *Ntf_Icons[Ntf_NUM_NOTIFY_EVENTS] =
"msg64x64.gif", // Ntf_EVENT_MESSAGE "msg64x64.gif", // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
"survey16x16.gif", // Ntf_EVENT_SURVEY
/* Profile tab */ /* Profile tab */
"survey16x16.gif", // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1023,7 +1023,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
/* Link to print view */ /* Link to print view */
Act_FormStart (ActPrnRecSevGst); Act_FormStart (ActPrnRecSevGst);
Usr_PutHiddenParUsrCodAll (ActPrnRecSevGst,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActPrnRecSevGst,Gbl.Usrs.Select[Rol_UNK]);
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -1036,7 +1036,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
// ...inscription in any course // ...inscription in any course
/***** List the records *****/ /***** List the records *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
@ -1218,7 +1218,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
/* Link to print view */ /* Link to print view */
Act_FormStart (ActPrnRecSevStd); Act_FormStart (ActPrnRecSevStd);
Usr_PutHiddenParUsrCodAll (ActPrnRecSevStd,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActPrnRecSevStd,Gbl.Usrs.Select[Rol_UNK]);
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -1228,7 +1228,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** List the records *****/ /***** List the records *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
@ -1435,7 +1435,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
/* Link to print view */ /* Link to print view */
Act_FormStart (ActPrnRecSevTch); Act_FormStart (ActPrnRecSevTch);
Usr_PutHiddenParUsrCodAll (ActPrnRecSevTch,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActPrnRecSevTch,Gbl.Usrs.Select[Rol_UNK]);
Par_PutHiddenParamChar ("ParamOfficeHours",'Y'); Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
Par_PutHiddenParamChar ("ShowOfficeHours", Par_PutHiddenParamChar ("ShowOfficeHours",
ShowOfficeHours ? 'Y' : ShowOfficeHours ? 'Y' :
@ -1450,7 +1450,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** List the records *****/ /***** List the records *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
@ -1590,7 +1590,7 @@ static void Rec_PutParamsShowOfficeHoursOneTch (void)
static void Rec_PutParamsShowOfficeHoursSeveralTchs (void) static void Rec_PutParamsShowOfficeHoursSeveralTchs (void)
{ {
Usr_PutHiddenParUsrCodAll (ActSeeRecSevTch,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActSeeRecSevTch,Gbl.Usrs.Select[Rol_UNK]);
Par_PutHiddenParamChar ("ParamOfficeHours",'Y'); Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
} }
@ -1770,7 +1770,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
Act_FormStartAnchor (ActRcvRecOthUsr,Anchor); Act_FormStartAnchor (ActRcvRecOthUsr,Anchor);
Par_PutHiddenParamLong ("OriginalActCod", Par_PutHiddenParamLong ("OriginalActCod",
Act_Actions[ActSeeRecSevStd].ActCod); // Original action, used to know where we came from Act_Actions[ActSeeRecSevStd].ActCod); // Original action, used to know where we came from
Usr_PutHiddenParUsrCodAll (ActRcvRecOthUsr,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActRcvRecOthUsr,Gbl.Usrs.Select[Rol_UNK]);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
break; break;
case Rec_CRS_PRINT_ONE_RECORD: case Rec_CRS_PRINT_ONE_RECORD:

View File

@ -304,7 +304,6 @@ void Soc_ShowTimelineGbl2 (void)
/* Users tab */ /* Users tab */
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_STD Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_STD
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_NED_TCH
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_TCH Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_TCH
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_REQUEST Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_REQUEST
@ -322,9 +321,11 @@ void Soc_ShowTimelineGbl2 (void)
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_MESSAGE Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_MESSAGE
/* Statistics tab */ /* Statistics tab */
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_SURVEY
/* Profile tab */ /* Profile tab */
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
}; };
/***** Initialize social note code to -1 ==> no highlighted note *****/ /***** Initialize social note code to -1 ==> no highlighted note *****/

View File

@ -951,8 +951,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
Sta_AskShowGblHits (); Sta_AskShowGblHits ();
/***** The following types of query will never give a valid result *****/ /***** The following types of query will never give a valid result *****/
if ((Gbl.Stat.Role == Sta_ALL_USRS || if ((Gbl.Stat.Role == Sta_ROLE_ALL_USRS ||
Gbl.Stat.Role == Sta_UNKNOWN_USRS) && Gbl.Stat.Role == Sta_ROLE_UNKNOWN_USRS) &&
(Gbl.Stat.CountType == Sta_DISTINCT_USRS || (Gbl.Stat.CountType == Sta_DISTINCT_USRS ||
Gbl.Stat.CountType == Sta_CLICKS_PER_USR)) Gbl.Stat.CountType == Sta_CLICKS_PER_USR))
{ {
@ -1215,11 +1215,11 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
/* Type of users */ /* Type of users */
switch (Gbl.Stat.Role) switch (Gbl.Stat.Role)
{ {
case Sta_IDENTIFIED_USRS: case Sta_ROLE_IDENTIFIED_USRS:
sprintf (StrRole," AND %s.Role<>%u", sprintf (StrRole," AND %s.Role<>%u",
LogTable,(unsigned) Rol_UNK); LogTable,(unsigned) Rol_UNK);
break; break;
case Sta_ALL_USRS: case Sta_ROLE_ALL_USRS:
switch (Gbl.Stat.CountType) switch (Gbl.Stat.CountType)
{ {
case Sta_TOTAL_CLICKS: case Sta_TOTAL_CLICKS:
@ -1234,43 +1234,43 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
break; break;
} }
break; break;
case Sta_INS_ADMINS: case Sta_ROLE_INS_ADMINS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_INS_ADM); LogTable,(unsigned) Rol_INS_ADM);
break; break;
case Sta_CTR_ADMINS: case Sta_ROLE_CTR_ADMINS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_CTR_ADM); LogTable,(unsigned) Rol_CTR_ADM);
break; break;
case Sta_DEG_ADMINS: case Sta_ROLE_DEG_ADMINS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_DEG_ADM); LogTable,(unsigned) Rol_DEG_ADM);
break; break;
case Sta_TEACHERS: case Sta_ROLE_TEACHERS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_TCH); LogTable,(unsigned) Rol_TCH);
break; break;
case Sta_NON_EDITING_TEACHERS: case Sta_ROLE_NON_EDITING_TEACHERS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_NET); LogTable,(unsigned) Rol_NET);
break; break;
case Sta_STUDENTS: case Sta_ROLE_STUDENTS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_STD); LogTable,(unsigned) Rol_STD);
break; break;
case Sta_VISITORS: case Sta_ROLE_USERS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_USR); LogTable,(unsigned) Rol_USR);
break; break;
case Sta_GUESTS: case Sta_ROLE_GUESTS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_GST); LogTable,(unsigned) Rol_GST);
break; break;
case Sta_UNKNOWN_USRS: case Sta_ROLE_UNKNOWN_USRS:
sprintf (StrRole," AND %s.Role=%u", sprintf (StrRole," AND %s.Role=%u",
LogTable,(unsigned) Rol_UNK); LogTable,(unsigned) Rol_UNK);
break; break;
case Sta_ME: case Sta_ROLE_ME:
sprintf (StrRole," AND %s.UsrCod=%ld", sprintf (StrRole," AND %s.UsrCod=%ld",
LogTable,Gbl.Usrs.Me.UsrDat.UsrCod); LogTable,Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
@ -1304,7 +1304,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
Sta_MAX_BYTES_QUERY_ACCESS); Sta_MAX_BYTES_QUERY_ACCESS);
LengthQuery = strlen (Query); LengthQuery = strlen (Query);
NumUsr = 0; NumUsr = 0;
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
@ -1640,7 +1640,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
Par_PutHiddenParamLong ("FirstRow",FirstRow - Gbl.Stat.RowsPerPage); Par_PutHiddenParamLong ("FirstRow",FirstRow - Gbl.Stat.RowsPerPage);
Par_PutHiddenParamLong ("LastRow" ,FirstRow - 1); Par_PutHiddenParamLong ("LastRow" ,FirstRow - 1);
Par_PutHiddenParamLong ("RowsPage",Gbl.Stat.RowsPerPage); Par_PutHiddenParamLong ("RowsPage",Gbl.Stat.RowsPerPage);
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
} }
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20%%;\">"); fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20%%;\">");
if (FirstRow > 1) if (FirstRow > 1)
@ -1675,7 +1675,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
Par_PutHiddenParamUnsigned ("FirstRow" ,(unsigned) (LastRow + 1)); Par_PutHiddenParamUnsigned ("FirstRow" ,(unsigned) (LastRow + 1));
Par_PutHiddenParamUnsigned ("LastRow" ,(unsigned) (LastRow + Gbl.Stat.RowsPerPage)); Par_PutHiddenParamUnsigned ("LastRow" ,(unsigned) (LastRow + Gbl.Stat.RowsPerPage));
Par_PutHiddenParamUnsigned ("RowsPage" ,(unsigned) Gbl.Stat.RowsPerPage); Par_PutHiddenParamUnsigned ("RowsPage" ,(unsigned) Gbl.Stat.RowsPerPage);
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
} }
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"width:20%%;\">"); fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"width:20%%;\">");
if (LastRow < NumRows) if (LastRow < NumRows)
@ -2149,7 +2149,7 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
Par_PutHiddenParamUnsigned ("CountType",(unsigned) Gbl.Stat.CountType); Par_PutHiddenParamUnsigned ("CountType",(unsigned) Gbl.Stat.CountType);
Par_PutHiddenParamUnsigned ("StatAct" ,(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamUnsigned ("StatAct" ,(unsigned) Gbl.Stat.NumAction);
if (Gbl.Action.Act == ActSeeAccCrs) if (Gbl.Action.Act == ActSeeAccCrs)
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
else // Gbl.Action.Act == ActSeeAccGbl else // Gbl.Action.Act == ActSeeAccGbl
{ {
Par_PutHiddenParamUnsigned ("Role",(unsigned) Gbl.Stat.Role); Par_PutHiddenParamUnsigned ("Role",(unsigned) Gbl.Stat.Role);

View File

@ -36,20 +36,20 @@
#define Sta_NUM_ROLES_STAT 12 #define Sta_NUM_ROLES_STAT 12
typedef enum typedef enum
{ {
Sta_IDENTIFIED_USRS = 0, Sta_ROLE_IDENTIFIED_USRS = 0,
Sta_ALL_USRS = 1, Sta_ROLE_ALL_USRS = 1,
Sta_INS_ADMINS = 2, Sta_ROLE_INS_ADMINS = 2,
Sta_CTR_ADMINS = 3, Sta_ROLE_CTR_ADMINS = 3,
Sta_DEG_ADMINS = 4, Sta_ROLE_DEG_ADMINS = 4,
Sta_TEACHERS = 5, Sta_ROLE_TEACHERS = 5,
Sta_NON_EDITING_TEACHERS = 6, Sta_ROLE_NON_EDITING_TEACHERS = 6,
Sta_STUDENTS = 7, Sta_ROLE_STUDENTS = 7,
Sta_VISITORS = 8, Sta_ROLE_USERS = 8,
Sta_GUESTS = 9, Sta_ROLE_GUESTS = 9,
Sta_UNKNOWN_USRS = 10, Sta_ROLE_UNKNOWN_USRS = 10,
Sta_ME = 11, Sta_ROLE_ME = 11,
} Sta_Role_t; } Sta_Role_t;
#define Sta_ROLE_DEFAULT Sta_IDENTIFIED_USRS #define Sta_ROLE_DEFAULT Sta_ROLE_IDENTIFIED_USRS
#define Sta_NUM_ACTION_DEFAULT ActAll #define Sta_NUM_ACTION_DEFAULT ActAll

View File

@ -444,8 +444,10 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
/***** Write first row of data of this assignment *****/ /***** Write first row of data of this assignment *****/
/* Forms to remove/edit this assignment */ /* Forms to remove/edit this assignment */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\">", "<td rowspan=\"2\" class=\"CONTEXT_COL");
Gbl.RowEvenOdd); if (!ShowOnlyThisSvyComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
if (Svy.Status.ICanEdit) if (Svy.Status.ICanEdit)
Svy_PutFormsToRemEditOneSvy (Svy.SvyCod,Svy.Status.Visible); Svy_PutFormsToRemEditOneSvy (Svy.SvyCod,Svy.Status.Visible);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -648,7 +650,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
if (ShowOnlyThisSvyComplete) if (ShowOnlyThisSvyComplete)
{ {
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"4\">"); "<td colspan=\"5\">");
Svy_ListSvyQuestions (&Svy,SvyQst); Svy_ListSvyQuestions (&Svy,SvyQst);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -7132,7 +7132,7 @@ void Tst_ShowUsrsTestResults (void)
Tst_ShowHeaderTestResults (); Tst_ShowHeaderTestResults ();
/***** List the assignments and works of the selected users *****/ /***** List the assignments and works of the selected users *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod,

View File

@ -658,19 +658,6 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR_NO_HTML[Ntf_NUM_NOTIFY_EVENTS][1 + Txt_NU
"Nova inscrição como estudante", "Nova inscrição como estudante",
}, },
{ {
// Ntf_EVENT_ENROLMENT_NED_TCH
"",
"Nova inscripció com a professor/a no editor/a",
"New Einschreibung als nicht bearbeiteter Lehrkraft",
"New enrolment as a non-editing teacher",
"Nueva inscripción como profesor/a no editor/a",
"Nouvelle inscription en tant qu'enseignant/e non-éditeur/trice",
"Nueva inscripción como profesor/a no editor/a", // Okoteve traducción
"Nuova iscrizione come professore/ssa non-editing",
"Nowe zapisy jako nauczyciel nie edytujacy",
"Nova inscrição como professor/a não editor/a",
},
{
// Ntf_EVENT_ENROLMENT_TCH // Ntf_EVENT_ENROLMENT_TCH
"", "",
"Nova inscripció com a professor/a", "Nova inscripció com a professor/a",
@ -814,7 +801,7 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR_NO_HTML[Ntf_NUM_NOTIFY_EVENTS][1 + Txt_NU
"Nova mensagem", "Nova mensagem",
}, },
{ {
// Ntf_EVENT_SURVEY // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"", "",
"Nova enquesta", "Nova enquesta",
"Neuer Umfrage", "Neuer Umfrage",
@ -826,6 +813,19 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR_NO_HTML[Ntf_NUM_NOTIFY_EVENTS][1 + Txt_NU
"Nowe badania", "Nowe badania",
"Novo inqu&eacute;rito", "Novo inqu&eacute;rito",
}, },
{
// Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
"",
"Nova inscripció com a professor/a no editor/a",
"New Einschreibung als nicht bearbeiteter Lehrkraft",
"New enrolment as a non-editing teacher",
"Nueva inscripción como profesor/a no editor/a",
"Nouvelle inscription en tant qu'enseignant/e non-éditeur/trice",
"Nueva inscripción como profesor/a no editor/a", // Okoteve traducción
"Nuova iscrizione come professore/ssa non-editing",
"Nowe zapisy jako nauczyciel nie edytujacy",
"Nova inscrição como professor/a não editor/a",
},
}; };
const char *Txt_NOTIFY_EVENTS_There_is_a_new_event_NO_HTML[1 + Txt_NUM_LANGUAGES] = // Warning: it is very important to include %s in the following sentences const char *Txt_NOTIFY_EVENTS_There_is_a_new_event_NO_HTML[1 + Txt_NUM_LANGUAGES] = // Warning: it is very important to include %s in the following sentences
@ -26465,26 +26465,6 @@ const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS] =
"Novas inscri&ccedil;&otilde;es como estudante" "Novas inscri&ccedil;&otilde;es como estudante"
#endif #endif
, ,
#if L==1 // Ntf_EVENT_ENROLMENT_NED_TCH
"Novas inscripci&oacute;s com a professor/a no editor/a"
#elif L==2
"New Einschreibungen als nicht bearbeiteter Lehrkraft"
#elif L==3
"New enrolments as a non-editing teacher"
#elif L==4
"Nuevas inscripciones como profesor/a/a no editor/a"
#elif L==5
"Nouvelles inscriptions en tant qu'enseignant/e non-&eacute;diteur/trice"
#elif L==6
"Nuevas inscripciones como profesor/a no editor/a" // Okoteve traducción
#elif L==7
"Nuova iscrizione come professore/ssa non-editing"
#elif L==8
"Nowe zapisy jako nauczyciel nie edytuj&aogon;cy"
#elif L==9
"Novas inscri&ccedil;&otilde;es como professor/a n&atilde;o editor/a"
#endif
,
#if L==1 // Ntf_EVENT_ENROLMENT_TCH #if L==1 // Ntf_EVENT_ENROLMENT_TCH
"Novas inscripci&oacute;s com a professor" "Novas inscripci&oacute;s com a professor"
#elif L==2 #elif L==2
@ -26705,7 +26685,7 @@ const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS] =
"Novas mensagens" "Novas mensagens"
#endif #endif
, ,
#if L==1 // Ntf_EVENT_SURVEY #if L==1 // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"Noves enquestes" "Noves enquestes"
#elif L==2 #elif L==2
"Neue Umfragen" "Neue Umfragen"
@ -26723,6 +26703,26 @@ const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS] =
"Nowe badania" "Nowe badania"
#elif L==9 #elif L==9
"Novos inqu&eacute;ritos" "Novos inqu&eacute;ritos"
#endif
,
#if L==1 // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
"Novas inscripci&oacute;s com a professor/a no editor/a"
#elif L==2
"New Einschreibungen als nicht bearbeiteter Lehrkraft"
#elif L==3
"New enrolments as a non-editing teacher"
#elif L==4
"Nuevas inscripciones como profesor/a/a no editor/a"
#elif L==5
"Nouvelles inscriptions en tant qu'enseignant/e non-&eacute;diteur/trice"
#elif L==6
"Nuevas inscripciones como profesor/a no editor/a" // Okoteve traducción
#elif L==7
"Nuova iscrizione come professore/ssa non-editing"
#elif L==8
"Nowe zapisy jako nauczyciel nie edytuj&aogon;cy"
#elif L==9
"Novas inscri&ccedil;&otilde;es como professor/a n&atilde;o editor/a"
#endif #endif
}; };
@ -26888,28 +26888,8 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR[Ntf_NUM_NOTIFY_EVENTS] =
"Inscri&ccedil;&atilde;o como estudante" "Inscri&ccedil;&atilde;o como estudante"
#endif #endif
, ,
#if L==1 // Ntf_EVENT_ENROLMENT_NED_TCH
"Novas inscripci&oacute;s com a professor/a no editor/a"
#elif L==2
"New Einschreibungen als nicht bearbeiteter Lehrkraft"
#elif L==3
"New enrolments as a non-editing teacher"
#elif L==4
"Nuevas inscripciones como profesor/a/a no editor/a"
#elif L==5
"Nouvelles inscriptions en tant qu'enseignant/e non-&eacute;diteur/trice"
#elif L==6
"Nuevas inscripciones como profesor/a no editor/a" // Okoteve traducción
#elif L==7
"Nuova iscrizione come professore/ssa non-editing"
#elif L==8
"Nowe zapisy jako nauczyciel nie edytuj&aogon;cy"
#elif L==9
"Novas inscri&ccedil;&otilde;es como professor/a n&atilde;o editor/a"
#endif
,
#if L==1 // Ntf_EVENT_ENROLMENT_TCH #if L==1 // Ntf_EVENT_ENROLMENT_TCH
"Inscripci&oacute; com a professor" "Inscripci&oacute; com a professor/a"
#elif L==2 #elif L==2
"Einschreibung als Lehrkraft" "Einschreibung als Lehrkraft"
#elif L==3 #elif L==3
@ -26921,11 +26901,11 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR[Ntf_NUM_NOTIFY_EVENTS] =
#elif L==6 #elif L==6
"Inscripci&oacute;n como profesor/a" // Okoteve traducción "Inscripci&oacute;n como profesor/a" // Okoteve traducción
#elif L==7 #elif L==7
"Iscrizione come professore" "Iscrizione come professore/ssa"
#elif L==8 #elif L==8
"Zapisy jako nauczyciel" "Zapisy jako nauczyciel"
#elif L==9 #elif L==9
"Inscri&ccedil;&atilde;o como professor" "Inscri&ccedil;&atilde;o como professor/a"
#endif #endif
, ,
#if L==1 // Ntf_EVENT_ENROLMENT_REQUEST #if L==1 // Ntf_EVENT_ENROLMENT_REQUEST
@ -27128,7 +27108,7 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR[Ntf_NUM_NOTIFY_EVENTS] =
"Mensagem" "Mensagem"
#endif #endif
, ,
#if L==1 // Ntf_EVENT_SURVEY #if L==1 // Ntf_EVENT_SURVEY // TODO: Move to assessment tab (also necessary in database) !!!!!!!!!
"Enquesta" "Enquesta"
#elif L==2 #elif L==2
"Umfrage" "Umfrage"
@ -27146,6 +27126,26 @@ const char *Txt_NOTIFY_EVENTS_SINGULAR[Ntf_NUM_NOTIFY_EVENTS] =
"Badania" "Badania"
#elif L==9 #elif L==9
"Inqu&eacute;rito" "Inqu&eacute;rito"
#endif
,
#if L==1 // Ntf_EVENT_ENROLMENT_NED_TCH // TODO: Move to users tab (also necessary in database) !!!!!!!!!
"Inscripci&oacute; com a professor/a no editor/a"
#elif L==2
"Einschreibung als nicht bearbeiteter Lehrkraft"
#elif L==3
"Enrolment as a non-editing teacher"
#elif L==4
"Inscripci&oacute;n como profesor/a no editor/a"
#elif L==5
"Inscription en tant qu'enseignant non-&eacute;diteur/trice"
#elif L==6
"Inscripci&oacute;n como profesor/a no editor/a" // Okoteve traducción
#elif L==7
"Iscrizione come professore/ssa non-editing"
#elif L==8
"Zapisy jako nauczyciel nie edytuj&aogon;cy"
#elif L==9
"Inscri&ccedil;&atilde;o como professor/a n&atilde;o editor/a"
#endif #endif
}; };
@ -31888,7 +31888,7 @@ const char *Txt_Role =
#endif #endif
const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] = const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
{ // Sta_IDENTIFIED_USRS { // Sta_ROLE_IDENTIFIED_USRS
#if L==1 #if L==1
"identificats" "identificats"
#elif L==2 #elif L==2
@ -31908,7 +31908,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"identificados" "identificados"
#endif #endif
, // Sta_ALL_USRS , // Sta_ROLE_ALL_USRS
#if L==1 #if L==1
"identificats o desconeguts" "identificats o desconeguts"
#elif L==2 #elif L==2
@ -31928,7 +31928,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"identificados ou desconhecidos" "identificados ou desconhecidos"
#endif #endif
, // Sta_INS_ADMINS , // Sta_ROLE_INS_ADMINS
#if L==1 #if L==1
"administradors d'institucions" "administradors d'institucions"
#elif L==2 #elif L==2
@ -31948,7 +31948,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"administradores de institu&ccedil;&otilde;es" "administradores de institu&ccedil;&otilde;es"
#endif #endif
, // Sta_CTR_ADMINS , // Sta_ROLE_CTR_ADMINS
#if L==1 #if L==1
"administradors de centres" "administradors de centres"
#elif L==2 #elif L==2
@ -31968,7 +31968,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"administradores de centros" "administradores de centros"
#endif #endif
, // Sta_DEG_ADMINS , // Sta_ROLE_DEG_ADMINS
#if L==1 #if L==1
"administradors de titulacions" "administradors de titulacions"
#elif L==2 #elif L==2
@ -31988,7 +31988,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"administradores de graus" "administradores de graus"
#endif #endif
, // Sta_TEACHERS , // Sta_ROLE_TEACHERS
#if L==1 #if L==1
"professors" "professors"
#elif L==2 #elif L==2
@ -32008,7 +32008,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"professores" "professores"
#endif #endif
, // Sta_NON_EDITING_TEACHERS , // Sta_ROLE_NON_EDITING_TEACHERS
#if L==1 #if L==1
"professors no editors" "professors no editors"
#elif L==2 #elif L==2
@ -32028,7 +32028,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"professores n&atilde;o editores" "professores n&atilde;o editores"
#endif #endif
, // Sta_STUDENTS , // Sta_ROLE_STUDENTS
#if L==1 #if L==1
"estudiants" "estudiants"
#elif L==2 #elif L==2
@ -32048,27 +32048,27 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"estudantes" "estudantes"
#endif #endif
, // Sta_VISITORS , // Sta_ROLE_USERS
#if L==1 #if L==1
"visitants" "usuaris"
#elif L==2 #elif L==2
"Besucher" "Benutzer"
#elif L==3 #elif L==3
"visitors" "users"
#elif L==4 #elif L==4
"visitantes" "usuarios"
#elif L==5 #elif L==5
"visiteurs" "utilisateurs"
#elif L==6 #elif L==6
"visitantes" // Okoteve traducción "puruh&aacute;ra"
#elif L==7 #elif L==7
"visitatori" "utenti"
#elif L==8 #elif L==8
"odwiedzaj&aogon;cy" "u&zdot;ytkownicy"
#elif L==9 #elif L==9
"visitantes" "utilizadores"
#endif #endif
, // Sta_GUESTS , // Sta_ROLE_GUESTS
#if L==1 #if L==1
"convidats (sense assignatures)" "convidats (sense assignatures)"
#elif L==2 #elif L==2
@ -32088,7 +32088,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"convidados (sem disciplinas)" "convidados (sem disciplinas)"
#endif #endif
, // Sta_UNKNOWN_USRS , // Sta_ROLE_UNKNOWN_USRS
#if L==1 #if L==1
"desconeguts" "desconeguts"
#elif L==2 #elif L==2
@ -32108,7 +32108,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==9 #elif L==9
"desconhecidos" "desconhecidos"
#endif #endif
, // Sta_ME , // Sta_ROLE_ME
#if L==1 #if L==1
"jo" "jo"
#elif L==2 #elif L==2

View File

@ -159,6 +159,7 @@ static void Usr_AllocateUsrsList (Rol_Role_t Role);
static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs,const char *OnSubmit); static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs,const char *OnSubmit);
static void Usr_ShowWarningListIsTooBig (unsigned NumUsrs); static void Usr_ShowWarningListIsTooBig (unsigned NumUsrs);
static void Usr_AllocateListSelectedUsrCod (Rol_Role_t Role);
static void Usr_AllocateListOtherRecipients (void); static void Usr_AllocateListOtherRecipients (void);
static void Usr_FormToSelectUsrListType (Act_Action_t NextAction,Usr_ShowUsrsType_t ListType); static void Usr_FormToSelectUsrListType (Act_Action_t NextAction,Usr_ShowUsrsType_t ListType);
@ -5208,57 +5209,91 @@ void Usr_GetListsSelectedUsrsCods (void)
unsigned Length; unsigned Length;
/***** Allocate memory for the lists of users *****/ /***** Allocate memory for the lists of users *****/
Usr_AllocateListSelectedUsrCodAll (); Usr_AllocateListSelectedUsrCod (Rol_UNK);
Usr_AllocateListSelectedUsrCodTch (); Usr_AllocateListSelectedUsrCod (Rol_GST);
Usr_AllocateListSelectedUsrCodStd (); Usr_AllocateListSelectedUsrCod (Rol_STD);
Usr_AllocateListSelectedUsrCod (Rol_NET);
Usr_AllocateListSelectedUsrCod (Rol_TCH);
/***** Get selected users *****/ /***** Get selected users *****/
if (Gbl.Session.IsOpen) // If the session is open, get parameter from DB if (Gbl.Session.IsOpen) // If the session is open, get parameter from DB
{ {
Ses_GetHiddenParFromDB (Gbl.Action.Act,"UsrCodAll",Gbl.Usrs.Select.All, Ses_GetHiddenParFromDB (Gbl.Action.Act,"UsrCodAll",Gbl.Usrs.Select[Rol_UNK],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,Gbl.Usrs.Select.All, Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,Gbl.Usrs.Select[Rol_UNK],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS,true); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS,true);
} }
else else
Par_GetParMultiToText ("UsrCodAll",Gbl.Usrs.Select.All, Par_GetParMultiToText ("UsrCodAll",Gbl.Usrs.Select[Rol_UNK],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
Par_GetParMultiToText ("UsrCodTch",Gbl.Usrs.Select.Tch, Par_GetParMultiToText ("UsrCodGst",Gbl.Usrs.Select[Rol_GST],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Teachers or guests Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Guests
Par_GetParMultiToText ("UsrCodStd",Gbl.Usrs.Select[Rol_STD],
Par_GetParMultiToText ("UsrCodStd",Gbl.Usrs.Select.Std,
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Students Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Students
Par_GetParMultiToText ("UsrCodNET",Gbl.Usrs.Select[Rol_NET],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Non-editing teachers
Par_GetParMultiToText ("UsrCodTch",Gbl.Usrs.Select[Rol_TCH],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Teachers
/* /*
sprintf (Gbl.Alert.Txt,"UsrCodAll = %s / UsrCodTch = %s / UsrCodStd = %s", sprintf (Gbl.Alert.Txt,"UsrCodAll = %s / UsrCodTch = %s / UsrCodStd = %s",
Gbl.Usrs.Select.All,Gbl.Usrs.Select.Tch,Gbl.Usrs.Select.Std); Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select.Tch,Gbl.Usrs.Select.Std);
Lay_ShowErrorAndExit (Gbl.Alert.Txt); Lay_ShowErrorAndExit (Gbl.Alert.Txt);
*/ */
/***** Add teachers to the list with all selected users *****/ /***** Add guests to the list with all selected users *****/
if (Gbl.Usrs.Select.Tch[0]) if (Gbl.Usrs.Select[Rol_GST][0])
{ {
if (Gbl.Usrs.Select.All[0]) if (Gbl.Usrs.Select[Rol_UNK][0])
if ((Length = strlen (Gbl.Usrs.Select.All)) < if ((Length = strlen (Gbl.Usrs.Select[Rol_UNK])) <
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS) Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{ {
Gbl.Usrs.Select.All[Length ] = Par_SEPARATOR_PARAM_MULTIPLE; Gbl.Usrs.Select[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
Gbl.Usrs.Select.All[Length + 1] = '\0'; Gbl.Usrs.Select[Rol_UNK][Length + 1] = '\0';
} }
Str_Concat (Gbl.Usrs.Select.All,Gbl.Usrs.Select.Tch, Str_Concat (Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select[Rol_GST],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
} }
/***** Add students to the list with all selected users *****/ /***** Add students to the list with all selected users *****/
if (Gbl.Usrs.Select.Std[0]) if (Gbl.Usrs.Select[Rol_STD][0])
{ {
if (Gbl.Usrs.Select.All[0]) if (Gbl.Usrs.Select[Rol_UNK][0])
if ((Length = strlen (Gbl.Usrs.Select.All)) < if ((Length = strlen (Gbl.Usrs.Select[Rol_UNK])) <
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS) Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{ {
Gbl.Usrs.Select.All[Length ] = Par_SEPARATOR_PARAM_MULTIPLE; Gbl.Usrs.Select[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
Gbl.Usrs.Select.All[Length + 1] = '\0'; Gbl.Usrs.Select[Rol_UNK][Length + 1] = '\0';
} }
Str_Concat (Gbl.Usrs.Select.All,Gbl.Usrs.Select.Std, Str_Concat (Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select[Rol_STD],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
}
/***** Add non-editing teachers to the list with all selected users *****/
if (Gbl.Usrs.Select[Rol_NET][0])
{
if (Gbl.Usrs.Select[Rol_UNK][0])
if ((Length = strlen (Gbl.Usrs.Select[Rol_UNK])) <
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{
Gbl.Usrs.Select[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
Gbl.Usrs.Select[Rol_UNK][Length + 1] = '\0';
}
Str_Concat (Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select[Rol_NET],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
}
/***** Add teachers to the list with all selected users *****/
if (Gbl.Usrs.Select[Rol_TCH][0])
{
if (Gbl.Usrs.Select[Rol_UNK][0])
if ((Length = strlen (Gbl.Usrs.Select[Rol_UNK])) <
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{
Gbl.Usrs.Select[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
Gbl.Usrs.Select[Rol_UNK][Length + 1] = '\0';
}
Str_Concat (Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select[Rol_TCH],
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
} }
} }
@ -5284,8 +5319,8 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
bool Error = false; bool Error = false;
/***** Allocate memory for the lists of users's IDs *****/ /***** Allocate memory for the lists of users's IDs *****/
Usr_AllocateListSelectedUsrCodAll (); Usr_AllocateListSelectedUsrCod (Rol_UNK);
LengthSelectedUsrsCods = strlen (Gbl.Usrs.Select.All); LengthSelectedUsrsCods = strlen (Gbl.Usrs.Select[Rol_UNK]);
/***** Allocate memory for the lists of recipients written explicetely *****/ /***** Allocate memory for the lists of recipients written explicetely *****/
Usr_AllocateListOtherRecipients (); Usr_AllocateListOtherRecipients ();
@ -5419,7 +5454,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
if (LengthUsrCod < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS) if (LengthUsrCod < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{ {
/* Add user */ /* Add user */
Str_Copy (Gbl.Usrs.Select.All, Str_Copy (Gbl.Usrs.Select[Rol_UNK],
UsrDat.EncryptedUsrCod, UsrDat.EncryptedUsrCod,
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
LengthSelectedUsrsCods = LengthUsrCod; LengthSelectedUsrsCods = LengthUsrCod;
@ -5431,11 +5466,11 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS) Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
{ {
/* Add separator */ /* Add separator */
Gbl.Usrs.Select.All[LengthSelectedUsrsCods] = Par_SEPARATOR_PARAM_MULTIPLE; Gbl.Usrs.Select[Rol_UNK][LengthSelectedUsrsCods] = Par_SEPARATOR_PARAM_MULTIPLE;
LengthSelectedUsrsCods++; LengthSelectedUsrsCods++;
/* Add user */ /* Add user */
Str_Copy (Gbl.Usrs.Select.All + LengthSelectedUsrsCods, Str_Copy (Gbl.Usrs.Select[Rol_UNK] + LengthSelectedUsrsCods,
UsrDat.EncryptedUsrCod, UsrDat.EncryptedUsrCod,
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
LengthSelectedUsrsCods += LengthUsrCod; LengthSelectedUsrsCods += LengthUsrCod;
@ -5458,16 +5493,16 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
/*****************************************************************************/ /*****************************************************************************/
/************** Find if encrypted user's code is yet in list *****************/ /************** Find if encrypted user's code is yet in list *****************/
/*****************************************************************************/ /*****************************************************************************/
// Returns true if EncryptedUsrCodToFind is in Gbl.Usrs.Select.All // Returns true if EncryptedUsrCodToFind is in Gbl.Usrs.Select[Rol_UNK]
bool Usr_FindUsrCodInListOfSelectedUsrs (const char *EncryptedUsrCodToFind) bool Usr_FindUsrCodInListOfSelectedUsrs (const char *EncryptedUsrCodToFind)
{ {
const char *Ptr; const char *Ptr;
char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
if (Gbl.Usrs.Select.All) if (Gbl.Usrs.Select[Rol_UNK])
{ {
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,EncryptedUsrCod,
@ -5489,8 +5524,8 @@ unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void)
unsigned NumUsrs = 0; unsigned NumUsrs = 0;
struct UsrData UsrDat; struct UsrData UsrDat;
/***** Loop over the list Gbl.Usrs.Select.All to count the number of users *****/ /***** Loop over the list Gbl.Usrs.Select[Rol_UNK] to count the number of users *****/
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
@ -5502,69 +5537,38 @@ unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void)
return NumUsrs; return NumUsrs;
} }
/*****************************************************************************/
/********************* Allocate memory for list of users *********************/
/*****************************************************************************/
void Usr_AllocateListSelectedUsrCodAll (void)
{
if (!Gbl.Usrs.Select.All)
{
if ((Gbl.Usrs.Select.All = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store list of users.");
Gbl.Usrs.Select.All[0] = '\0';
}
}
/*****************************************************************************/ /*****************************************************************************/
/****************** Allocate memory for list of students *********************/ /****************** Allocate memory for list of students *********************/
/*****************************************************************************/ /*****************************************************************************/
// Role = Rol_UNK here means all users
void Usr_AllocateListSelectedUsrCodStd (void) static void Usr_AllocateListSelectedUsrCod (Rol_Role_t Role)
{ {
if (!Gbl.Usrs.Select.Std) if (!Gbl.Usrs.Select[Role])
{ {
if ((Gbl.Usrs.Select.Std = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL) if ((Gbl.Usrs.Select[Role] = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store list of users."); Lay_ShowErrorAndExit ("Not enough memory to store list of users.");
Gbl.Usrs.Select.Std[0] = '\0'; Gbl.Usrs.Select[Role][0] = '\0';
}
}
/*****************************************************************************/
/************* Allocate memory for list of teachers or guests ****************/
/*****************************************************************************/
void Usr_AllocateListSelectedUsrCodTch (void)
{
if (!Gbl.Usrs.Select.Tch)
{
if ((Gbl.Usrs.Select.Tch = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store list of users.");
Gbl.Usrs.Select.Tch[0] = '\0';
} }
} }
/*****************************************************************************/ /*****************************************************************************/
/************ Free memory used by list of selected users' codes **************/ /************ Free memory used by list of selected users' codes **************/
/*****************************************************************************/ /*****************************************************************************/
// Role = Rol_UNK here means all users
void Usr_FreeListsSelectedUsrsCods (void) void Usr_FreeListsSelectedUsrsCods (void)
{ {
if (Gbl.Usrs.Select.All) Rol_Role_t Role;
{
free ((void *) Gbl.Usrs.Select.All); for (Role = (Rol_Role_t) 0;
Gbl.Usrs.Select.All = NULL; Role < Rol_NUM_ROLES;
} Role++)
if (Gbl.Usrs.Select.Tch) if (Gbl.Usrs.Select[Role])
{ {
free ((void *) Gbl.Usrs.Select.Tch); free ((void *) Gbl.Usrs.Select[Role]);
Gbl.Usrs.Select.Tch = NULL; Gbl.Usrs.Select[Role] = NULL;
} }
if (Gbl.Usrs.Select.Std)
{
free ((void *) Gbl.Usrs.Select.Std);
Gbl.Usrs.Select.Std = NULL;
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -5684,7 +5688,7 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction)
Att_PutParamAttCod (Gbl.AttEvents.AttCod); Att_PutParamAttCod (Gbl.AttEvents.AttCod);
break; break;
case ActReqMsgUsr: case ActReqMsgUsr:
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select[Rol_UNK]);
Msg_PutHiddenParamOtherRecipients (); Msg_PutHiddenParamOtherRecipients ();
Msg_PutHiddenParamsSubjectAndContent (); Msg_PutHiddenParamsSubjectAndContent ();
if (Gbl.Msg.Reply.IsReply) if (Gbl.Msg.Reply.IsReply)

View File

@ -352,9 +352,6 @@ void Usr_GetListsSelectedUsrsCods (void);
bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs); bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs);
bool Usr_FindUsrCodInListOfSelectedUsrs (const char *EncryptedUsrCodToFind); bool Usr_FindUsrCodInListOfSelectedUsrs (const char *EncryptedUsrCodToFind);
unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void); unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void);
void Usr_AllocateListSelectedUsrCodAll (void);
void Usr_AllocateListSelectedUsrCodStd (void);
void Usr_AllocateListSelectedUsrCodTch (void);
void Usr_FreeListsSelectedUsrsCods (void); void Usr_FreeListsSelectedUsrsCods (void);
void Usr_FreeListOtherRecipients (void); void Usr_FreeListOtherRecipients (void);

View File

@ -129,7 +129,7 @@ void ZIP_PutLinkToCreateZIPAsgWrk (void)
static void ZIP_PutLinkToCreateZIPAsgWrkParams (void) static void ZIP_PutLinkToCreateZIPAsgWrkParams (void)
{ {
Usr_PutHiddenParUsrCodAll (ActAdmAsgWrkCrs,Gbl.Usrs.Select.All); Usr_PutHiddenParUsrCodAll (ActAdmAsgWrkCrs,Gbl.Usrs.Select[Rol_UNK]);
if (Gbl.FileBrowser.FullTree) if (Gbl.FileBrowser.FullTree)
Par_PutHiddenParamChar ("FullTree",'Y'); Par_PutHiddenParamChar ("FullTree",'Y');
Par_PutHiddenParamChar ("CreateZIP",'Y'); Par_PutHiddenParamChar ("CreateZIP",'Y');
@ -175,7 +175,7 @@ void ZIP_CreateZIPAsgWrk (void)
/* Create temporary directory for each selected user /* Create temporary directory for each selected user
inside the directory used for compression */ inside the directory used for compression */
Ptr = Gbl.Usrs.Select.All; Ptr = Gbl.Usrs.Select[Rol_UNK];
while (*Ptr) while (*Ptr)
{ {
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod, Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,