mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 16.2
This commit is contained in:
parent
d815c46a50
commit
7db6f3d7b1
|
@ -11610,3 +11610,24 @@ SELECT DISTINCT UsrCod FROM (SELECT DISTINCT UsrCod FROM usr_IDs WHERE UsrID IN
|
|||
|
||||
|
||||
SELECT * FROM file_view,files WHERE files.FileBrowser='9' AND files.Cod='-1' AND files.FilCod=file_view.FilCod;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SELECT COUNT(*) FROM msg_content WHERE MsgCod NOT IN (SELECT MsgCod FROM msg_snt) AND MsgCod NOT IN (SELECT DISTINCT MsgCod FROM msg_rcv);
|
||||
|
||||
|
||||
SELECT COUNT(*) FROM msg_content LEFT JOIN msg_snt ON (msg_content.MsgCod=msg_snt.MsgCod) WHERE msg_content.MsgCod IS NULL;
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Acc_ShowFormCheckIfIHaveAccount (void);
|
||||
static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWithoutArroba,
|
||||
const char *NewEmail);
|
||||
static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba,
|
||||
|
@ -116,10 +117,84 @@ void Acc_ShowFormAccount (void)
|
|||
Pre_PutLinkToChangeLanguage ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/**** Show form to check if I have an account *****/
|
||||
Acc_ShowFormCheckIfIHaveAccount ();
|
||||
|
||||
/**** Show form to create a new account *****/
|
||||
Acc_ShowFormRequestNewAccountWithParams ("","");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Show form to check if I have an account *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Acc_ShowFormCheckIfIHaveAccount (void)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_ID;
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,"Compruebe si ya existe una cuenta para usted",NULL); // TODO: Need translation!!!
|
||||
|
||||
/***** Info message *****/
|
||||
Lay_ShowAlert (Lay_INFO,"Es posible que un profesor o administrador"
|
||||
" ya haya creado una cuenta para usted"
|
||||
" asociada a su ID (DNI/cédula)."
|
||||
" Escriba su ID (DNI/cédula)"
|
||||
" para comprobarlo."); // TODO: Need translation!!!!
|
||||
|
||||
/***** Form to request user's ID for possible account already created *****/
|
||||
Act_FormStart (ActChkUsrAcc);
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
"%s: "
|
||||
"</label>"
|
||||
"<input type=\"text\" name=\"ID\""
|
||||
" size=\"20\" maxlength=\"%u\" value=\"\" />",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Txt_ID,
|
||||
ID_MAX_LENGTH_USR_ID);
|
||||
Lay_PutConfirmButton ("Comprobar"); // TODO: Need translation!!!!
|
||||
Act_FormEnd ();
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Check if already exists a new account without password associated to a ID */
|
||||
/*****************************************************************************/
|
||||
|
||||
void Acc_CheckIfEmptyAccountExists (void)
|
||||
{
|
||||
struct ListUsrCods ListUsrCods; // List with users' codes for a given user's ID
|
||||
unsigned NumUsr;
|
||||
|
||||
Lay_ShowAlert (Lay_INFO,"Usuarios encontrados:"); // TODO: Change this check!!!!!!!!
|
||||
|
||||
/***** Allocate space for the list of IDs *****/
|
||||
ID_ReallocateListIDs (&Gbl.Usrs.Other.UsrDat,1);
|
||||
|
||||
/***** Get new user's ID from form *****/
|
||||
Par_GetParToText ("ID",Gbl.Usrs.Other.UsrDat.IDs.List[0].ID,ID_MAX_LENGTH_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID);
|
||||
Str_ConvertToUpperText (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID);
|
||||
|
||||
/***** Check if there are users with this user's ID *****/
|
||||
if (ID_CheckIfUsrIDIsValid (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID))
|
||||
if (ID_GetListUsrCodsFromUsrID (&Gbl.Usrs.Other.UsrDat,NULL,&ListUsrCods,false)) // User(s) found
|
||||
{
|
||||
for (NumUsr = 0;
|
||||
NumUsr < ListUsrCods.NumUsrs;
|
||||
NumUsr++)
|
||||
fprintf (Gbl.F.Out,"UsrCod = %ld<br />", // TODO: Change this check!!!!!!!!
|
||||
ListUsrCods.Lst[NumUsr]); // User found
|
||||
|
||||
/* Free memory used for list of users' codes found for this ID */
|
||||
Usr_FreeListUsrCods (&ListUsrCods);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Show form to create a new account using parameters *************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -52,6 +52,9 @@ typedef enum
|
|||
|
||||
void Acc_PutLinkToCreateAccount (void);
|
||||
void Acc_ShowFormAccount (void);
|
||||
|
||||
void Acc_CheckIfEmptyAccountExists (void);
|
||||
|
||||
void Acc_ShowFormGoToRequestNewAccount (void);
|
||||
void Acc_ShowFormChangeMyAccount (void);
|
||||
bool Acc_CreateNewAccountAndLogIn (void);
|
||||
|
|
|
@ -1333,6 +1333,7 @@ Profile:
|
|||
1141. ActAnnSee Mark announcement as seen
|
||||
1142. ActChgMyRol Change type of logged user
|
||||
|
||||
NEW. ActChkUsrAcc Check if already exists a new account without password associated to a ID
|
||||
1143. ActCreUsrAcc Create new user account
|
||||
1144. ActRemID_Me Remove one of my user's IDs
|
||||
1145. ActNewIDMe Create a new user's ID for me
|
||||
|
@ -2764,6 +2765,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActAnnSee */{1234,-1,TabPrf,ActFrmRolSes ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ann_MarkAnnouncementAsSeen ,NULL},
|
||||
/* ActChgMyRol */{ 589,-1,TabPrf,ActFrmRolSes ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Rol_ChangeMyRole ,Usr_ShowFormsLogoutAndRole ,NULL},
|
||||
|
||||
/* ActChkUsrAcc */{1584,-1,TabPrf,ActFrmUsrAcc ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Acc_CheckIfEmptyAccountExists ,NULL},
|
||||
/* ActCreUsrAcc */{1163,-1,TabPrf,ActFrmUsrAcc ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Acc_AfterCreationNewAccount ,NULL},
|
||||
|
||||
/* ActRemID_Me */{1147,-1,TabPrf,ActFrmUsrAcc ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_RemoveMyUsrID ,NULL},
|
||||
|
@ -4436,6 +4438,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
|||
ActSeeMyAgd, // #1581
|
||||
ActSeeMyUsgRep, // #1582
|
||||
ActPrnMyUsgRep, // #1583
|
||||
ActChkUsrAcc, // #1584
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
139
swad_action.h
139
swad_action.h
|
@ -72,9 +72,9 @@ typedef enum
|
|||
|
||||
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_NUM_ACTIONS (1+9+51+15+90+70+67+246+186+156+172+36+30+85)
|
||||
#define Act_NUM_ACTIONS (1+9+51+15+90+70+67+246+186+156+172+36+30+86)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1583
|
||||
#define Act_MAX_ACTION_COD 1584
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
|
||||
|
||||
|
@ -1388,83 +1388,84 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
|||
#define ActAutUsrChgLan (ActPrnMyUsgRep+16)
|
||||
#define ActAnnSee (ActPrnMyUsgRep+17)
|
||||
#define ActChgMyRol (ActPrnMyUsgRep+18)
|
||||
#define ActCreUsrAcc (ActPrnMyUsgRep+19)
|
||||
#define ActRemID_Me (ActPrnMyUsgRep+20)
|
||||
#define ActNewIDMe (ActPrnMyUsgRep+21)
|
||||
#define ActRemOldNic (ActPrnMyUsgRep+22)
|
||||
#define ActChgNic (ActPrnMyUsgRep+23)
|
||||
#define ActRemMaiMe (ActPrnMyUsgRep+24)
|
||||
#define ActNewMaiMe (ActPrnMyUsgRep+25)
|
||||
#define ActCnfMai (ActPrnMyUsgRep+26)
|
||||
#define ActFrmChgMyPwd (ActPrnMyUsgRep+27)
|
||||
#define ActChgPwd (ActPrnMyUsgRep+28)
|
||||
#define ActReqRemMyAcc (ActPrnMyUsgRep+29)
|
||||
#define ActRemMyAcc (ActPrnMyUsgRep+30)
|
||||
#define ActChkUsrAcc (ActPrnMyUsgRep+19)
|
||||
#define ActCreUsrAcc (ActPrnMyUsgRep+20)
|
||||
#define ActRemID_Me (ActPrnMyUsgRep+21)
|
||||
#define ActNewIDMe (ActPrnMyUsgRep+22)
|
||||
#define ActRemOldNic (ActPrnMyUsgRep+23)
|
||||
#define ActChgNic (ActPrnMyUsgRep+24)
|
||||
#define ActRemMaiMe (ActPrnMyUsgRep+25)
|
||||
#define ActNewMaiMe (ActPrnMyUsgRep+26)
|
||||
#define ActCnfMai (ActPrnMyUsgRep+27)
|
||||
#define ActFrmChgMyPwd (ActPrnMyUsgRep+28)
|
||||
#define ActChgPwd (ActPrnMyUsgRep+29)
|
||||
#define ActReqRemMyAcc (ActPrnMyUsgRep+30)
|
||||
#define ActRemMyAcc (ActPrnMyUsgRep+31)
|
||||
|
||||
#define ActChgMyData (ActPrnMyUsgRep+31)
|
||||
#define ActChgMyData (ActPrnMyUsgRep+32)
|
||||
|
||||
#define ActReqMyPho (ActPrnMyUsgRep+32)
|
||||
#define ActDetMyPho (ActPrnMyUsgRep+33)
|
||||
#define ActUpdMyPho (ActPrnMyUsgRep+34)
|
||||
#define ActReqRemMyPho (ActPrnMyUsgRep+35)
|
||||
#define ActRemMyPho (ActPrnMyUsgRep+36)
|
||||
#define ActReqMyPho (ActPrnMyUsgRep+33)
|
||||
#define ActDetMyPho (ActPrnMyUsgRep+34)
|
||||
#define ActUpdMyPho (ActPrnMyUsgRep+35)
|
||||
#define ActReqRemMyPho (ActPrnMyUsgRep+36)
|
||||
#define ActRemMyPho (ActPrnMyUsgRep+37)
|
||||
|
||||
#define ActEdiPri (ActPrnMyUsgRep+37)
|
||||
#define ActChgPriPho (ActPrnMyUsgRep+38)
|
||||
#define ActChgPriPrf (ActPrnMyUsgRep+39)
|
||||
#define ActEdiPri (ActPrnMyUsgRep+38)
|
||||
#define ActChgPriPho (ActPrnMyUsgRep+39)
|
||||
#define ActChgPriPrf (ActPrnMyUsgRep+40)
|
||||
|
||||
#define ActReqEdiMyIns (ActPrnMyUsgRep+40)
|
||||
#define ActChgCtyMyIns (ActPrnMyUsgRep+41)
|
||||
#define ActChgMyIns (ActPrnMyUsgRep+42)
|
||||
#define ActChgMyCtr (ActPrnMyUsgRep+43)
|
||||
#define ActChgMyDpt (ActPrnMyUsgRep+44)
|
||||
#define ActChgMyOff (ActPrnMyUsgRep+45)
|
||||
#define ActChgMyOffPho (ActPrnMyUsgRep+46)
|
||||
#define ActReqEdiMyIns (ActPrnMyUsgRep+41)
|
||||
#define ActChgCtyMyIns (ActPrnMyUsgRep+42)
|
||||
#define ActChgMyIns (ActPrnMyUsgRep+43)
|
||||
#define ActChgMyCtr (ActPrnMyUsgRep+44)
|
||||
#define ActChgMyDpt (ActPrnMyUsgRep+45)
|
||||
#define ActChgMyOff (ActPrnMyUsgRep+46)
|
||||
#define ActChgMyOffPho (ActPrnMyUsgRep+47)
|
||||
|
||||
#define ActReqEdiMyNet (ActPrnMyUsgRep+47)
|
||||
#define ActChgMyNet (ActPrnMyUsgRep+48)
|
||||
#define ActReqEdiMyNet (ActPrnMyUsgRep+48)
|
||||
#define ActChgMyNet (ActPrnMyUsgRep+49)
|
||||
|
||||
#define ActChgThe (ActPrnMyUsgRep+49)
|
||||
#define ActReqChgLan (ActPrnMyUsgRep+50)
|
||||
#define ActChgLan (ActPrnMyUsgRep+51)
|
||||
#define ActChg1stDay (ActPrnMyUsgRep+52)
|
||||
#define ActChgCol (ActPrnMyUsgRep+53)
|
||||
#define ActHidLftCol (ActPrnMyUsgRep+54)
|
||||
#define ActHidRgtCol (ActPrnMyUsgRep+55)
|
||||
#define ActShoLftCol (ActPrnMyUsgRep+56)
|
||||
#define ActShoRgtCol (ActPrnMyUsgRep+57)
|
||||
#define ActChgIco (ActPrnMyUsgRep+58)
|
||||
#define ActChgMnu (ActPrnMyUsgRep+59)
|
||||
#define ActChgNtfPrf (ActPrnMyUsgRep+60)
|
||||
#define ActChgThe (ActPrnMyUsgRep+50)
|
||||
#define ActReqChgLan (ActPrnMyUsgRep+51)
|
||||
#define ActChgLan (ActPrnMyUsgRep+52)
|
||||
#define ActChg1stDay (ActPrnMyUsgRep+53)
|
||||
#define ActChgCol (ActPrnMyUsgRep+54)
|
||||
#define ActHidLftCol (ActPrnMyUsgRep+55)
|
||||
#define ActHidRgtCol (ActPrnMyUsgRep+56)
|
||||
#define ActShoLftCol (ActPrnMyUsgRep+57)
|
||||
#define ActShoRgtCol (ActPrnMyUsgRep+58)
|
||||
#define ActChgIco (ActPrnMyUsgRep+59)
|
||||
#define ActChgMnu (ActPrnMyUsgRep+60)
|
||||
#define ActChgNtfPrf (ActPrnMyUsgRep+61)
|
||||
|
||||
#define ActPrnUsrQR (ActPrnMyUsgRep+61)
|
||||
#define ActPrnUsrQR (ActPrnMyUsgRep+62)
|
||||
|
||||
#define ActPrnMyTT (ActPrnMyUsgRep+62)
|
||||
#define ActEdiTut (ActPrnMyUsgRep+63)
|
||||
#define ActChgTut (ActPrnMyUsgRep+64)
|
||||
#define ActChgMyTT1stDay (ActPrnMyUsgRep+65)
|
||||
#define ActPrnMyTT (ActPrnMyUsgRep+63)
|
||||
#define ActEdiTut (ActPrnMyUsgRep+64)
|
||||
#define ActChgTut (ActPrnMyUsgRep+65)
|
||||
#define ActChgMyTT1stDay (ActPrnMyUsgRep+66)
|
||||
|
||||
#define ActReqRemFilBrf (ActPrnMyUsgRep+66)
|
||||
#define ActRemFilBrf (ActPrnMyUsgRep+67)
|
||||
#define ActRemFolBrf (ActPrnMyUsgRep+68)
|
||||
#define ActCopBrf (ActPrnMyUsgRep+69)
|
||||
#define ActPasBrf (ActPrnMyUsgRep+70)
|
||||
#define ActRemTreBrf (ActPrnMyUsgRep+71)
|
||||
#define ActFrmCreBrf (ActPrnMyUsgRep+72)
|
||||
#define ActCreFolBrf (ActPrnMyUsgRep+73)
|
||||
#define ActCreLnkBrf (ActPrnMyUsgRep+74)
|
||||
#define ActRenFolBrf (ActPrnMyUsgRep+75)
|
||||
#define ActRcvFilBrfDZ (ActPrnMyUsgRep+76)
|
||||
#define ActRcvFilBrfCla (ActPrnMyUsgRep+77)
|
||||
#define ActExpBrf (ActPrnMyUsgRep+78)
|
||||
#define ActConBrf (ActPrnMyUsgRep+79)
|
||||
#define ActZIPBrf (ActPrnMyUsgRep+80)
|
||||
#define ActReqDatBrf (ActPrnMyUsgRep+81)
|
||||
#define ActChgDatBrf (ActPrnMyUsgRep+82)
|
||||
#define ActDowBrf (ActPrnMyUsgRep+83)
|
||||
#define ActReqRemFilBrf (ActPrnMyUsgRep+67)
|
||||
#define ActRemFilBrf (ActPrnMyUsgRep+68)
|
||||
#define ActRemFolBrf (ActPrnMyUsgRep+69)
|
||||
#define ActCopBrf (ActPrnMyUsgRep+70)
|
||||
#define ActPasBrf (ActPrnMyUsgRep+71)
|
||||
#define ActRemTreBrf (ActPrnMyUsgRep+72)
|
||||
#define ActFrmCreBrf (ActPrnMyUsgRep+73)
|
||||
#define ActCreFolBrf (ActPrnMyUsgRep+74)
|
||||
#define ActCreLnkBrf (ActPrnMyUsgRep+75)
|
||||
#define ActRenFolBrf (ActPrnMyUsgRep+76)
|
||||
#define ActRcvFilBrfDZ (ActPrnMyUsgRep+77)
|
||||
#define ActRcvFilBrfCla (ActPrnMyUsgRep+78)
|
||||
#define ActExpBrf (ActPrnMyUsgRep+79)
|
||||
#define ActConBrf (ActPrnMyUsgRep+80)
|
||||
#define ActZIPBrf (ActPrnMyUsgRep+81)
|
||||
#define ActReqDatBrf (ActPrnMyUsgRep+82)
|
||||
#define ActChgDatBrf (ActPrnMyUsgRep+83)
|
||||
#define ActDowBrf (ActPrnMyUsgRep+84)
|
||||
|
||||
#define ActReqRemOldBrf (ActPrnMyUsgRep+84)
|
||||
#define ActRemOldBrf (ActPrnMyUsgRep+85)
|
||||
#define ActReqRemOldBrf (ActPrnMyUsgRep+85)
|
||||
#define ActRemOldBrf (ActPrnMyUsgRep+86)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Public types *******************************/
|
||||
|
|
|
@ -139,13 +139,20 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.1.1 (2016-09-22)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.2 (2016-09-22)"
|
||||
#define CSS_FILE "swad15.229.css"
|
||||
#define JS_FILE "swad15.238.1.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 16.2: Sep 22, 2016 New option to check if an account already exists. Not finished. (204901 lines)
|
||||
4 changes necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1581','es','N','Mostrar mi agenda');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1582','es','N','Ver mi informe de uso');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1583','es','N','Imprimir mi informe de uso');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1584','es','N','Comprobar si existe cuenta');
|
||||
|
||||
Version 16.1.1: Sep 22, 2016 Index optimization in tables of users' courses. (204829 lines)
|
||||
Version 16.1: Sep 22, 2016 Temporary table with other user's courses. (204828 lines)
|
||||
Version 16.0: Sep 22, 2016 Temporary table with my courses.
|
||||
|
|
Loading…
Reference in New Issue
Block a user