Version19.18.2

This commit is contained in:
Antonio Cañas Vargas 2019-09-28 15:03:22 +02:00
parent f6d93a3c57
commit f6c46d188d
21 changed files with 105 additions and 86 deletions

View File

@ -5481,3 +5481,15 @@ void Act_AdjustCurrentAction (void)
Tab_SetCurrentTab ();
}
}
/*****************************************************************************/
/*** Write error message and exit when no permission to perform an action ****/
/*****************************************************************************/
void Act_NoPermissionExit (void)
{
extern const char *Txt_You_dont_have_permission_to_perform_this_action;
Lay_ShowErrorAndExit (Txt_You_dont_have_permission_to_perform_this_action);
}

View File

@ -1687,4 +1687,6 @@ char *Act_GetActionTextFromDB (long ActCod,
void Act_AdjustActionWhenNoUsrLogged (void);
void Act_AdjustCurrentAction (void);
void Act_NoPermissionExit (void);
#endif

View File

@ -41,6 +41,7 @@
#include "swad_pagination.h"
#include "swad_parameter.h"
#include "swad_photo.h"
#include "swad_role.h"
#include "swad_setting.h"
#include "swad_string.h"
#include "swad_table.h"
@ -499,7 +500,7 @@ static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView)
Frm_StartForm (ActFrmCreAsgCrs);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,Brw_INTERNAL_NAME_ROOT_FOLDER_ASSIGNMENTS,

View File

@ -471,10 +471,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.18.1 (2019-09-28)"
#define Log_PLATFORM_VERSION "SWAD 19.18.2 (2019-09-28)"
#define CSS_FILE "swad19.15.css"
#define JS_FILE "swad19.15.js"
/*
Version 19.18.2: Sep 28, 2019 Code refactoring. (246585 lines)
Version 19.18.1: Sep 28, 2019 Students will not see hidden games. (246571 lines)
Version 19.18: Sep 28, 2019 New module swad_match_result for match results. (246540 lines)
Version 19.17.3: Sep 28, 2019 Code refactoring removing matches and games. (246446 lines)

View File

@ -38,6 +38,7 @@
#include "swad_hierarchy.h"
#include "swad_parameter.h"
#include "swad_photo.h"
#include "swad_role.h"
#include "swad_string.h"
#include "swad_table.h"
#include "swad_user.h"
@ -687,7 +688,7 @@ static void Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Rol_Role_t
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -842,7 +843,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
Frm_StartFormUnique (ActSeeRecOneTch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
@ -1007,7 +1008,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
if (NumUsrs)
@ -1061,7 +1062,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
Frm_StartForm (ActSeeRecOneTch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
}

View File

@ -2034,7 +2034,7 @@ void Crs_RemoveCourse (void)
}
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/
@ -2406,7 +2406,7 @@ void Crs_ChangeInsCrsCod (void)
Crs_EditingCrs->ShrtName);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/
@ -2601,7 +2601,7 @@ void Crs_ChangeCrsYear (void)
NewYear);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/
@ -2754,7 +2754,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
}
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/

View File

@ -231,7 +231,7 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole)
case Rol_TCH:
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
/***** Update the role of a user in a course *****/
@ -274,7 +274,7 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
case Rol_TCH:
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
/***** Register user in current course in database *****/
@ -338,7 +338,7 @@ static void Enr_NotifyAfterEnrolment (struct UsrData *UsrDat,Rol_Role_t NewRole)
break;
default:
NotifyEvent = Ntf_EVENT_UNKNOWN;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
/***** Remove possible enrolment request ******/
@ -425,7 +425,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
Frm_StartForm (ActAccEnrTch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
Btn_PutCreateButtonInline (Txt_Confirm_my_enrolment);
Frm_EndForm ();
@ -443,7 +443,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
Frm_StartForm (ActRemMe_Tch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
Btn_PutRemoveButtonInline (Txt_Remove_me_from_this_course);
Frm_EndForm ();
@ -465,7 +465,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
break;
default:
NotifyEvent = Ntf_EVENT_UNKNOWN;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Ntf_MarkNotifAsSeen (NotifyEvent,-1L,Gbl.Hierarchy.Crs.CrsCod,
@ -636,7 +636,7 @@ static void Enr_ReqAdminUsrs (Rol_Role_t Role)
Enr_ReqAnotherUsrIDToRegisterRemove (Role);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
}
@ -689,7 +689,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
default:
NextAction = ActUnk;
Title = NULL;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -714,7 +714,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
default:
NextAction = ActUnk;
Title = NULL;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Frm_StartForm (NextAction);
@ -1078,16 +1078,16 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
case Rol_STD:
if (Gbl.Usrs.Me.Role.Logged < Rol_TCH) // Can I register/remove students?
// No, I can not
Lay_ShowErrorAndExit ("You are not allowed to perform this action.");
Act_NoPermissionExit ();
break;
case Rol_NET:
case Rol_TCH:
if (Gbl.Usrs.Me.Role.Logged < Rol_DEG_ADM) // Can I register/remove teachers?
// No, I can not
Lay_ShowErrorAndExit ("You are not allowed to perform this action.");
Act_NoPermissionExit ();
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -1141,7 +1141,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
WhatToDo.RegisterUsrs = false;
}
else
Lay_ShowErrorAndExit ("You are not allowed to perform this action.");
Act_NoPermissionExit ();
break;
default:
Lay_ShowErrorAndExit ("Wrong registering / removing specification.");
@ -1988,7 +1988,7 @@ void Enr_SignUpInCrs (void)
if (!(RoleFromForm == Rol_STD ||
RoleFromForm == Rol_NET ||
RoleFromForm == Rol_TCH))
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
/***** Try to get and old request of the same user in the same course from database *****/
if (DB_QuerySELECT (&mysql_res,"can not get enrolment request",
@ -2143,7 +2143,7 @@ void Enr_AskIfRejectSignUp (void)
Btn_REMOVE_BUTTON,Txt_Reject);
}
else
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
}
else
@ -2208,7 +2208,7 @@ void Enr_ShowEnrolmentRequests (void)
(1 << Rol_TCH));
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
}
@ -2413,7 +2413,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2535,7 +2535,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2631,7 +2631,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2703,7 +2703,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2753,7 +2753,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2778,7 +2778,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
RolesSelected);
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
break;
@ -2923,7 +2923,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
break;
default:
NextAction = ActUnk;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Frm_StartForm (NextAction);
@ -3070,7 +3070,7 @@ void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role)
default:
NextAction = ActUnk;
TitleText = NULL;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
Lay_PutContextualLinkIconText (NextAction,NULL,NULL,
"users-cog.svg",
@ -3151,7 +3151,7 @@ static void Enr_ReqAnotherUsrIDToRegisterRemove (Rol_Role_t Role)
break;
default:
NextAction = ActUnk;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Enr_WriteFormToReqAnotherUsrID (NextAction,NULL);
@ -3784,7 +3784,7 @@ void Enr_CreateNewUsr1 (void)
Gbl.Action.Act = ActCreTch;
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Tab_SetCurrentTab ();
@ -3916,7 +3916,7 @@ void Enr_ModifyUsr1 (void)
Gbl.Action.Act = ActUpdTch;
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Tab_SetCurrentTab ();
@ -4078,7 +4078,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
break;
default:
NextAction = ActUnk;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Frm_StartForm (NextAction);

View File

@ -53,6 +53,7 @@
#include "swad_parameter.h"
#include "swad_photo.h"
#include "swad_profile.h"
#include "swad_role.h"
#include "swad_string.h"
#include "swad_table.h"
#include "swad_timeline.h"
@ -1941,7 +1942,7 @@ void Brw_GetParAndInitFileBrowser (void)
Brw_ADMI_MRK_CRS;
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
break;
@ -3343,7 +3344,7 @@ static void Brw_GetSelectedGroupData (struct GroupData *GrpDat,bool AbortOnError
else if (!Grp_GetIfIBelongToGrp (GrpDat->GrpCod))
{
if (AbortOnError)
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
GrpDat->GrpCod = -1L;
}
}
@ -3384,7 +3385,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
break;
default:
NextAction = ActUnk;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Frm_StartForm (NextAction);
@ -4024,7 +4025,7 @@ static void Brw_WriteSubtitleOfFileBrowser (void)
break;
default:
Subtitle[0] = '\0';
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
break;
@ -10244,7 +10245,7 @@ void Brw_ChgFileMetadata (void)
}
else
/***** Write error message and exit *****/
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Show again the file browser *****/
Brw_ShowAgainFileBrowserOrWorks ();

View File

@ -3917,7 +3917,7 @@ static void For_RestrictAccess (void)
break;
}
if (!ICanSeeForum)
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/

View File

@ -180,7 +180,7 @@ static void Gam_ListAllGames (void)
case Rol_INS_ADM:
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -660,7 +660,7 @@ void Gam_GetListGames (void)
Lay_NotEnoughMemoryExit ();
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}

View File

@ -1750,7 +1750,7 @@ void Ins_RemoveInstitution (void)
/***** Check if this institution has users *****/
if (!Ins_CheckIfICanEdit (Ins_EditingIns))
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
else if (Ins_EditingIns->Ctrs.Num ||
Ins_EditingIns->NumUsrsWhoClaimToBelongToIns ||
Ins_EditingIns->NumUsrs) // Institution has centres or users ==> don't remove

View File

@ -1352,17 +1352,6 @@ void Lay_WrongScopeExit (void)
Lay_ShowErrorAndExit ("Wrong scope.");
}
/*****************************************************************************/
/*** Write error message and exit when no permission to perform an action ****/
/*****************************************************************************/
void Lay_NoPermissionExit (void)
{
extern const char *Txt_You_dont_have_permission_to_perform_this_action;
Lay_ShowErrorAndExit (Txt_You_dont_have_permission_to_perform_this_action);
}
/*****************************************************************************/
/******* Write error message, close files, remove lock file, and exit ********/
/*****************************************************************************/

View File

@ -79,7 +79,7 @@ void Lay_EndArticle (void);
void Lay_NotEnoughMemoryExit (void);
void Lay_WrongScopeExit (void);
void Lay_NoPermissionExit (void);
void Act_NoPermissionExit (void);
void Lay_ShowErrorAndExit (const char *Txt);
void Lay_RefreshNotifsAndConnected (void);

View File

@ -147,7 +147,7 @@ int main (void)
/***** Check if the user have permission to execute the action *****/
if (!Act_CheckIfIHavePermissionToExecuteAction (Gbl.Action.Act))
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Update most frequently used actions *****/
MFU_UpdateMFUActions ();

View File

@ -42,6 +42,7 @@
#include "swad_parameter.h"
#include "swad_photo.h"
#include "swad_project.h"
#include "swad_role.h"
#include "swad_setting.h"
#include "swad_string.h"
#include "swad_table.h"
@ -646,7 +647,7 @@ static void Prj_GetHiddenParamHidVis (void)
(unsigned) Prj_FILTER_VISIBL_DEFAULT);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
}
@ -2482,7 +2483,7 @@ void Prj_GetListProjects (void)
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -2838,7 +2839,7 @@ void Prj_ReqRemProject (void)
Prj.Title);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -2901,7 +2902,7 @@ void Prj_RemoveProject (void)
Prj.Title);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -2936,7 +2937,7 @@ void Prj_HideProject (void)
" WHERE PrjCod=%ld AND CrsCod=%ld",
Prj.PrjCod,Gbl.Hierarchy.Crs.CrsCod);
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -2971,7 +2972,7 @@ void Prj_ShowProject (void)
" WHERE PrjCod=%ld AND CrsCod=%ld",
Prj.PrjCod,Gbl.Hierarchy.Crs.CrsCod);
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -3009,7 +3010,7 @@ void Prj_LockProjectEdition (void)
Prj_FormLockUnlock (&Prj);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -3052,7 +3053,7 @@ void Prj_UnlockProjectEdition (void)
Prj_FormLockUnlock (&Prj);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);
@ -3098,7 +3099,7 @@ void Prj_ReqLockAllProjectsEdition (void)
Prj_FreeListProjects ();
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Show projects again *****/
Prj_ShowProjectsInCurrentPage ();
@ -3132,7 +3133,7 @@ void Prj_ReqUnlockAllProjectsEdition (void)
Prj_FreeListProjects ();
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Show projects again *****/
Prj_ShowProjectsInCurrentPage ();
@ -3169,7 +3170,7 @@ void Prj_LockAllProjectsEdition (void)
Prj_FreeListProjects ();
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Show projects again *****/
Prj_ShowProjectsInCurrentPage ();
@ -3202,7 +3203,7 @@ void Prj_UnlockAllProjectsEdition (void)
Prj_FreeListProjects ();
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Show projects again *****/
Prj_ShowProjectsInCurrentPage ();
@ -3633,7 +3634,7 @@ void Prj_RecFormProject (void)
Prj_RequestCreatOrEditPrj (Prj.PrjCod);
}
else
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
/***** Free memory of the project *****/
Prj_FreeMemProject (&Prj);

View File

@ -1700,7 +1700,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
case Rec_CRS_PRINT_SEVERAL_RECORDS:
break;
default:
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
}
@ -1717,7 +1717,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
}
}
else // Not me ==> I am a student trying to do something forbidden
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
break;
case Rol_NET:
break;
@ -1736,7 +1736,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
/***** Start box and table *****/
@ -3793,7 +3793,7 @@ Rol_Role_t Rec_GetRoleFromRecordForm (void)
break;
}
if (!RoleOK)
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
return Role;
}

View File

@ -636,3 +636,12 @@ Rol_Role_t Rol_GetRequestedRole (long UsrCod)
return Role;
}
/*****************************************************************************/
/************* Show error message about wrong role and exit ******************/
/*****************************************************************************/
void Rol_WrongRoleExit (void)
{
Lay_ShowErrorAndExit ("Wrong role.");
}

View File

@ -62,4 +62,6 @@ unsigned Rol_GetSelectedRoles (void);
Rol_Role_t Rol_GetRequestedRole (long UsrCod);
void Rol_WrongRoleExit (void);
#endif

View File

@ -1702,7 +1702,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
/* Get logged role */
if (sscanf (row[2],"%u",&RoleFromLog) != 1)
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
/* Write the number of row */
fprintf (Gbl.F.Out,"<tr>"

View File

@ -2003,7 +2003,7 @@ static void Svy_SetDefaultAndAllowedScope (struct Survey *Svy)
}
if (!ICanEdit)
Lay_NoPermissionExit ();
Act_NoPermissionExit ();
}
/*****************************************************************************/

View File

@ -1137,7 +1137,7 @@ unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole,
break;
default:
SubQueryRole[0] = '\0';
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
DB_Query ("can not create temporary table",
@ -5038,7 +5038,7 @@ void Usr_SearchListUsrs (Rol_Role_t Role)
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -5553,7 +5553,7 @@ static void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,Hie_Level_t Sc
}
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
@ -6322,7 +6322,7 @@ void Usr_PutCheckboxToSelectAllUsers (Rol_Role_t Role)
Usr_NameSelUnsel[Role],
Usr_ParamUsrCod[Role]);
else
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
Sex = Usr_GetSexOfUsrsLst (Role);
fprintf (Gbl.F.Out,"%s:"
"</label>"
@ -6399,7 +6399,7 @@ static void Usr_PutCheckboxToSelectUser (Rol_Role_t Role,
fprintf (Gbl.F.Out," />");
}
else
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
}
/*****************************************************************************/
@ -9623,7 +9623,7 @@ float Usr_GetNumUsrsPerCrs (Rol_Role_t Role)
case Rol_TCH:
return (float) Gbl.Hierarchy.Crs.NumUsrs[Rol_UNK]; // Teachers
default:
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break; // Not reached
}
break;
@ -9768,7 +9768,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
break;
default:
NextAction = ActUnk;
Lay_ShowErrorAndExit ("Wrong role.");
Rol_WrongRoleExit ();
break;
}
Frm_StartForm (NextAction);