Version 15.203.2

This commit is contained in:
Antonio Cañas Vargas 2016-04-23 23:39:07 +02:00
parent fd6fbdd664
commit 9673c07fd1
20 changed files with 40 additions and 23 deletions

View File

@ -349,6 +349,7 @@ static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned Min
void ID_WriteUsrIDs (struct UsrData *UsrDat)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
unsigned NumID;
bool ItsMe = (UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod);
bool ICanSeeUsrID;
@ -363,7 +364,8 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat)
{
ICanSeeUsrID = ID_ICanSeeAnotherUsrID (UsrDat);
ICanConfirmUsrID = ICanSeeUsrID &&
!Gbl.Form.Inside; // Not inside a form
!Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_MAIN_WINDOW; // Only in main window
}
for (NumID = 0;

View File

@ -53,7 +53,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/
@ -159,6 +158,7 @@ void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
void QR_ExamAnnnouncement (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Link_to_announcement_of_exam;
/***** Show QR code with direct link to the exam announcement *****/

View File

@ -134,13 +134,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.203.1 (2016-04-23)"
#define Log_PLATFORM_VERSION "SWAD 15.203.2 (2016-04-23)"
#define CSS_FILE "swad15.203.css"
#define JS_FILE "swad15.197.js"
// 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
/*
Version 15.203.2: Apr 23, 2016 New form to confirm another user's ID. Not finished. (201104 lines)
Version 15.203.1: Apr 23, 2016 New form to confirm another user's ID. Not finished. (201090 lines)
Version 15.203: Apr 23, 2016 Changes in layout and CSS related to record card. (201076 lines)
Version 15.202.19:Apr 23, 2016 User's ID is shown in green or red in user's account. (201120 lines)

View File

@ -46,7 +46,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@ -1107,6 +1106,7 @@ void Cty_WriteSelectorOfCountry (void)
void Cty_WriteCountryName (long CtyCod,const char *Class)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
char ActTxt[Act_MAX_LENGTH_ACTION_TXT+1];

View File

@ -53,7 +53,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*************************** Public constants ********************************/
@ -142,6 +141,7 @@ void Crs_PrintConfiguration (void)
static void Crs_Configuration (bool PrintView)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Course;
extern const char *Txt_Short_name;
@ -443,6 +443,7 @@ void Crs_ChangeCourseConfig (void)
static void Crs_WriteListMyCoursesToSelectOne (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormDark[The_NUM_THEMES];
extern const char *Txt_My_courses;

View File

@ -8126,12 +8126,12 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow)
static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Upload_files;
extern const char *Txt_or_you_can_upload_new_files_to_the_folder_X;
extern const char *Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here;
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
extern const char *Txt_Done;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/***** Start frame *****/
fprintf (Gbl.F.Out,"<div id=\"dropzone-upload\">");

View File

@ -48,7 +48,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*********************** Private constants and types *************************/
@ -2219,6 +2218,7 @@ void For_SetForumName (For_ForumType_t ForumType,
static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct,const char *Icon,const char *ForumName,bool ShowNumOfPosts,
unsigned Level,bool IsLastItemInLevel[1+For_FORUM_MAX_LEVELS])
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Copy_not_allowed;

View File

@ -56,8 +56,6 @@ struct Globals Gbl; // All the global parameters and variables must be in this s
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
/*****************************************************************************/
@ -117,7 +115,6 @@ void Gbl_InitializeGlobals (void)
Gbl.Error = false;
Gbl.Layout.WritingHTMLStart =
Gbl.Layout.HTMLStartWritten =
Gbl.Layout.DivsEndWritten =
@ -439,6 +436,8 @@ void Gbl_InitializeGlobals (void)
void Gbl_Cleanup (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
if (!Gbl.Action.UsesAJAX &&
!Gbl.WebService.IsWebService &&
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_MAIN_WINDOW &&

View File

@ -41,7 +41,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*************************** Internal constants ******************************/
@ -493,6 +492,7 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss)
static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t IndicatorsLayout,unsigned NumCrss,MYSQL_RES *mysql_res)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Degree;
extern const char *Txt_Course;
extern const char *Txt_Institutional_BR_code;

View File

@ -52,7 +52,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Public constants *****************************/
@ -103,6 +102,7 @@ static void Lay_HelpTextEditor (const char *Text,const char *InlineMath,const ch
void Lay_WriteStartOfPage (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
extern const unsigned Txt_Current_CGI_SWAD_Language;
extern const char *The_TabOnBgColors[The_NUM_THEMES];
@ -341,6 +341,8 @@ void Lay_WriteStartOfPage (void)
static void Lay_WriteEndOfPage (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
if (!Gbl.Layout.DivsEndWritten)
{
/***** End of central part of main zone *****/
@ -393,6 +395,7 @@ static void Lay_WritePageTitle (void)
static void Lay_WriteRedirectionToMyLanguage (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
fprintf (Gbl.F.Out,"<meta http-equiv=\"refresh\""
@ -409,6 +412,7 @@ static void Lay_WriteRedirectionToMyLanguage (void)
static void Lay_WriteScripts (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_MONTHS_CAPS[12];
extern const char *Txt_DAYS_CAPS[7];
extern const char *Txt_Exam_of_X;
@ -640,6 +644,8 @@ static void Lay_WriteScriptInit (void)
static void Lay_WriteScriptParamsAJAX (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/***** Start script *****/
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">\n");
@ -891,6 +897,7 @@ static void Lay_WriteBreadcrumb (void)
static void Lay_WriteTitleAction (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTitleAction[The_NUM_THEMES];
extern const char *The_ClassSubtitleAction[The_NUM_THEMES];
extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS];
@ -1345,6 +1352,8 @@ void Lay_EndRoundFrameWithButton (Lay_Button_t Button,const char *TxtButton)
void Lay_ShowErrorAndExit (const char *Message)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/***** Unlock tables if locked *****/
if (Gbl.DB.LockedTables)
{

View File

@ -44,7 +44,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@ -1342,6 +1341,7 @@ bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char *NewEmail)
bool Mai_SendMailMsgToConfirmEmail (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_If_you_just_request_from_X_the_confirmation_of_your_email_Y_NO_HTML;
extern const char *Txt_Confirmation_of_your_email_NO_HTML;
extern const char *Txt_There_was_a_problem_sending_an_email_automatically;

View File

@ -49,7 +49,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/******************************* Internal types ******************************/
@ -69,6 +68,7 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
int main (int argc, char *argv[])
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_dont_have_permission_to_perform_this_action;
/*

View File

@ -40,7 +40,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Private constants ****************************/
@ -221,6 +220,7 @@ Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
void Mnu_WriteMenuThisTab (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTxtMenuOn[The_NUM_THEMES];
extern const char *The_ClassTxtMenuOff[The_NUM_THEMES];
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];

View File

@ -51,7 +51,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@ -3238,6 +3237,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,const char *Subject,
static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_MSG_Sent;
extern const char *Txt_MSG_Sent_and_deleted;
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];

View File

@ -52,7 +52,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Public constants *****************************/
@ -1033,6 +1032,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char SpecialFullName [3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];
char SpecialShortName[3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+6];
char SpecialSurnames [2*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];

View File

@ -51,7 +51,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@ -2000,6 +1999,7 @@ void Rec_ShowCommonRecordUnmodifiable (struct UsrData *UsrDat)
void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
struct UsrData *UsrDat)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Save_changes;
extern const char *Txt_Register;

View File

@ -58,7 +58,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@ -277,6 +276,7 @@ void Sta_GetRemoteAddr (void)
void Sta_LogAccess (const char *Comments)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char Query[2048];
long LogCod;
Rol_Role_t RoleToStore = (Gbl.Action.Act == ActLogOut) ? Gbl.Usrs.Me.LoggedRoleBeforeCloseSession :
@ -728,6 +728,7 @@ static void Sta_WriteSelectorCountType (void)
static void Sta_WriteSelectorAction (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Action;
extern const char *Txt_TABS_SHORT_TXT[Tab_NUM_TABS];
@ -755,7 +756,8 @@ static void Sta_WriteSelectorAction (void)
if (Txt_TABS_SHORT_TXT[Act_Actions[NumAction].Tab])
fprintf (Gbl.F.Out,"%s &gt; ",
Txt_TABS_SHORT_TXT[Act_Actions[NumAction].Tab]);
fprintf (Gbl.F.Out,"%s",Act_GetActionTextFromDB (Act_Actions[NumAction].ActCod,ActTxt));
fprintf (Gbl.F.Out,"%s",
Act_GetActionTextFromDB (Act_Actions[NumAction].ActCod,ActTxt));
}
fprintf (Gbl.F.Out,"</select>"
@ -796,6 +798,7 @@ void Sta_SeeCrsAccesses (void)
static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_must_select_one_ore_more_users;
extern const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed;
extern const char *Txt_The_date_range_must_be_less_than_or_equal_to_X_days;

View File

@ -34,7 +34,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Private constants ****************************/
@ -202,6 +201,7 @@ static bool Tab_CheckIfICanViewTab (Act_Tab_t Tab)
void Tab_DrawBreadcrumb (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_TabOnBgColors[The_NUM_THEMES];
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
@ -273,6 +273,7 @@ static void Tab_WriteBreadcrumbTab (void)
static void Tab_WriteBreadcrumbAction (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
const char *Title = Act_GetTitleAction (Gbl.Action.Act);
@ -292,6 +293,8 @@ static void Tab_WriteBreadcrumbAction (void)
void Tab_SetCurrentTab (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
Gbl.Action.Tab = Act_Actions[Gbl.Action.Act].Tab;
/***** Change action and tab if country, institution, centre or degree

View File

@ -98,7 +98,6 @@ const char *Usr_UsrDatMainFieldNames[Usr_NUM_MAIN_FIELDS_DATA_USR];
/*****************************************************************************/
extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/
@ -203,6 +202,7 @@ static float Usr_GetNumUsrsPerCrs (Rol_Role_t Role);
void Usr_InformAboutNumClicksBeforePhoto (void)
{
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_must_send_your_photo_because_;
extern const char *Txt_You_can_only_perform_X_further_actions_;
char Message[512]; // Don't use Gbl.Message here, because it may be filled with another message and such message would be overwritten

View File

@ -93,7 +93,6 @@ const Act_Action_t ZIP_ActZIPFolder[Brw_NUM_TYPES_FILE_BROWSER] =
/*****************************************************************************/
extern struct Globals Gbl;
// extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/