Version 16.15

This commit is contained in:
Antonio Cañas Vargas 2016-09-26 18:09:19 +02:00
parent 9c175c2cb1
commit 89abbb3d69
3 changed files with 133 additions and 46 deletions

View File

@ -69,6 +69,7 @@ extern struct Globals Gbl;
/*****************************************************************************/
static void Acc_ShowFormCheckIfIHaveAccount (const char *Title);
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat);
static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWithoutArroba,
const char *NewEmail);
static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba,
@ -162,8 +163,7 @@ void Acc_CheckIfEmptyAccountExists (void)
{
extern const char *Txt_Do_you_think_you_are_this_user;
extern const char *Txt_Do_you_think_you_are_one_of_these_users;
extern const char *Txt_Name;
extern const char *Txt_Its_me;
extern const char *Txt_There_is_no_empty_account_associated_with_your_ID_X_;
extern const char *Txt_Check_another_ID;
extern const char *Txt_Please_enter_your_ID;
extern const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered_with_your_ID;
@ -222,41 +222,8 @@ void Acc_CheckIfEmptyAccountExists (void)
/* Get user's data */
Usr_GetAllUsrDataFromUsrCod (&UsrDat);
/***** Write number of user in the list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"2\""
" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\">"
"%u"
"</td>",
Gbl.RowEvenOdd,NumUsr);
/***** Write user's name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP COLOR%u\">"
"%s: %s"
"</td>",
Gbl.RowEvenOdd,Txt_Name,
UsrDat.FullName[0] ? UsrDat.FullName :
"?");
/* Button to login with this account */
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActAutUsrNew);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Lay_PutCreateButtonInline (Txt_Its_me);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/* Courses of this user */
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
UsrDat.Sex = Usr_SEX_UNKNOWN;
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TEACHER);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STUDENT);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Write row with data of empty account *****/
Acc_WriteRowEmptyAccount (NumUsr,ID,&UsrDat);
}
/***** Free memory used for user's data *****/
@ -267,10 +234,7 @@ void Acc_CheckIfEmptyAccountExists (void)
}
else
{
sprintf (Gbl.Message,"No existe ninguna cuenta &quot;vac&iacute;a&quot;"
" (a&uacute;n no usada) asociada a su ID %s.<br />"
" Si cree que puede haber sido inscrito/a"
" con otro ID, compru&eacute;belo, por favor.", // TODO: Need translation!!!
sprintf (Gbl.Message,Txt_There_is_no_empty_account_associated_with_your_ID_X_,
ID);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
}
@ -293,6 +257,59 @@ void Acc_CheckIfEmptyAccountExists (void)
}
}
/*****************************************************************************/
/************************ Write data of empty account ************************/
/*****************************************************************************/
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat)
{
extern const char *Txt_ID;
extern const char *Txt_Name;
extern const char *Txt_yet_unnamed;
extern const char *Txt_Its_me;
/***** Write number of user in the list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"2\""
" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\">"
"%u"
"</td>",
Gbl.RowEvenOdd,NumUsr);
/***** Write user's ID and name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP COLOR%u\">"
"%s: %s<br />"
"%s: ",
Gbl.RowEvenOdd,
Txt_ID,ID,
Txt_Name);
if (UsrDat->FullName[0])
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->FullName);
else
fprintf (Gbl.F.Out,"<em>%s</em>",Txt_yet_unnamed);
fprintf (Gbl.F.Out,"</td>");
/***** Button to login with this account *****/
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActAutUsrNew);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Lay_PutCreateButtonInline (Txt_Its_me);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Courses of this user *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
UsrDat->Sex = Usr_SEX_UNKNOWN;
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TEACHER);
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STUDENT);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
/*****************************************************************************/
/************ Show form to create a new account using parameters *************/
/*****************************************************************************/

View File

@ -142,13 +142,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.2.13 (2016-09-26)"
#define Log_PLATFORM_VERSION "SWAD 16.15 (2016-09-26)"
#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.15: Sep 26, 2016 Message translated.
Code refactoring of list with empty accounts for an ID. (205285 lines)
Version 16.2.13: Sep 26, 2016 Message translated. (205203 lines)
Version 16.2.12: Sep 26, 2016 Message translated. (205181 lines)
Version 16.2.11: Sep 26, 2016 Message translated. (205159 lines)

View File

@ -3569,7 +3569,7 @@ const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_reg
"Abans de crear un compte nou,"
" comprovi si ja li han inscrit amb el seu ID";
#elif L==2
"Bevor ein neues Konto erstellen,"
"Bevor ein neues Benutzerkonto erstellen,"
" wenn Sie bereits mit Ihrer ID registriert worden sind";
#elif L==3
"Before creating a new account,"
@ -3591,7 +3591,7 @@ const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_reg
" nale&zdot;y sprawdzi&cacute;, czy zosta&lstrok; on ju&zdot; zarejestrowany z identyfikatorem";
#elif L==9
"Antes de criar uma nova conta,"
" verifique se voc&ecirc; j&aacute; foi registrado com o seu ID";
" verifique se voc&ecirc; j&aacute; foi registrado/a com o seu ID";
#endif
const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname =
@ -4981,7 +4981,7 @@ const char *Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_reque
" vost&egrave; pot crear abans de sol&middot;licitar la seva inscripci&oacute; en ella"
" (el mateix &eacute;s aplicable a institucions, centres i titulacions).";
#elif L==2
"Herzlichen Gl&uuml;ckwunsch! Du hast Dein Konto @%s erstellt."
"Herzlichen Gl&uuml;ckwunsch! Du hast Dein Benutzerkonto @%s erstellt."
" Jetzt %s finden Sie einige Daten in Ihrem Profil."
" Vervollst&auml;ndigen anfordern und dann werden Sie in der Lage,"
" f&uuml;r die Einschreibung in Kurse an."
@ -30096,7 +30096,7 @@ const char *Txt_Remove_account =
#if L==1
"Eliminar compte";
#elif L==2
"Konto entfernen";
"Benutzerkonto entfernen";
#elif L==3
"Remove account";
#elif L==4
@ -46359,6 +46359,53 @@ const char *Txt_There_is_already_a_non_empty_folder_named_X = // Warning: it is
"There is already a non-empty folder named <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_There_is_no_empty_account_associated_with_your_ID_X_ = // Warning: it is very important to include %s in the following sentences
#if L==1
"No hi ha cap compte buida (encara no usada)"
" associada al seu ID <strong>%s</strong>."
" Si creu que pot haver estat inscrit amb un altre ID,"
" comprovi-ho, per favor.";
#elif L==2
"Es gibt keine leeren Benutzerkonto (noch nicht verwendet)"
" im Zusammenhang mit Ihrer ID <strong>%s</strong>."
" Wenn Sie denken, dass Sie mit einer anderen ID registriert worden sein,"
" &uuml;berpr&uuml;fen Sie es bitte.";
#elif L==3
"There is no empty (not yet used) account"
" associated with your ID <strong>%s</strong>."
" If you think you may have been registered with another ID,"
" check it, please.";
#elif L==4
"No existe ninguna cuenta vac&iacute;a (a&uacute;n no usada)"
" asociada a su ID <strong>%s</strong>."
" Si cree que puede haber sido inscrito/a con otro ID, compru&eacute;belo, por favor.";
#elif L==5
"Il n'y a pas de compte vide (pas encore utilis&eacute;)"
" associ&eacute; &agrave; votre ID <strong>%s</strong>."
" Si vous pensez que vous avez &eacute;t&eacute; enregistr&eacute; avec un autre ID,"
" v&eacute;rifier, s'il vous pla&icirc;t.";
#elif L==6
"No existe ninguna cuenta vac&iacute;a (a&uacute;n no usada)"
" asociada a su ID <strong>%s</strong>."
" Si cree que puede haber sido inscrito/a con otro ID,"
" compru&eacute;belo, por favor."; // Okoteve traducción
#elif L==7
"Non vi &egrave; alcun conto vuoto (non ancora utilizzato)"
" associato con il tuo ID <strong>%s</strong>."
" Se si pensa che potrebbe essere stato registrato/a con un altro ID,"
" verificare, per favore.";
#elif L==8
"Nie ma pusta konta (jeszcze nie u&zdot;ywany)"
" powi&aogon;zany z identyfikatorem <strong>%s</strong>."
" Je&sacute;li uwa&zdot;asz, &zdot;e mog&lstrok;a zosta&cacute; zarejestrowana w innym ID,"
" sprawd&zacute; to, prosz&eogon;.";
#elif L==9
"N&atilde;o existe nenhuma conta vazio (ainda n&atilde;o utilizado)"
" associado ao seu ID <strong>%s</strong>."
" Se voc&ecirc; acha que pode ter sido registado/a com outro ID,"
" verifique-o, por favor.";
#endif
const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed =
#if L==1
"No se puede saber cu&aacute;ntos usuarios distintos han accedido sin identificarse."; // Necessita traduccio
@ -51256,6 +51303,27 @@ const char *Txt_Yesterday =
"Ontem";
#endif
const char *Txt_yet_unnamed =
#if L==1
"encara sense nom";
#elif L==2
"noch unbenannte";
#elif L==3
"yet unnamed";
#elif L==4
"a&uacute;n sin nombre";
#elif L==5
"encore sans nom";
#elif L==6
"a&uacute;n sin nombre";
#elif L==7
"ancora senza nome";
#elif L==8
"jeszcze nienazwany";
#elif L==9
"ainda sem nome";
#endif
const char *Txt_You_already_answered_this_survey_before =
#if L==1
"Usted ya respondi&oacute; esta encuesta anteriormente."; // Necessita traduccio