Version 14.74.4

This commit is contained in:
Antonio Cañas Vargas 2015-02-08 18:20:52 +01:00
parent f124d4d065
commit a1b3ecd331
6 changed files with 25 additions and 53 deletions

View File

@ -36,19 +36,18 @@
// Sería completa esta aplicación, si la asistencia se incluyera, automáticamente, en el apartado de evaluación de cada alumno. De esta forma podríamos ver sus trabajos y asistencias de forma personalizada.
// TODO: OpenSWAD.org: ¿Qué debería tener una buena gestión de grupos? Es para tomar ideas ;)
// José Raúl Canay @raulcanay: por ejemplo, que puedas sacar un listado exportable de en qué grupos está una persona de quienes están en un grupo.
// TODO: Remove debug in PRADO
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.74.3 (2015/02/08)"
#define Log_PLATFORM_VERSION "SWAD 14.74.4 (2015/02/08)"
// 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 | tail -1
/*
Mejorar formulario de inscripción de usuarios poniéndole marco blanco
Quitar debug en llamada a PRADO
Version 14.74.4: Feb 08, 2015 Changes in layout of form to register/remove users. (178000 lines)
Version 14.74.3: Feb 08, 2015 Button to view banners.
Button to view mail domains.
Button to view institutional links.

View File

@ -28,9 +28,9 @@
/** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
#define LOCALHOST_UBUNTU // Comment this line if not applicable
//#define OPENSWAD_ORG // Comment this line if not applicable
#define SWAD_UGR_ES // Comment this line if not applicable
//#define SWAD_UGR_ES // Comment this line if not applicable
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
/*****************************************************************************/

View File

@ -502,7 +502,6 @@ static void Enr_ShowFormRegRemSeveralUsrs (void)
extern const char *The_ClassTitle[The_NUM_THEMES];
extern const char *Txt_Step_1_Provide_a_list_of_users;
extern const char *Txt_Option_a_Import_students_from_the_official_lists;
extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists;
extern const char *Txt_Select_the_groups_of_students_you_want_to_register_in_remove_from_this_course;
extern const char *Txt_Option_b_Type_or_paste_a_list_of_users;
extern const char *Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_;
@ -513,6 +512,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (void)
extern const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_;
extern const char *Txt_Step_5_Confirm_the_enrollment_removing;
extern const char *Txt_Confirm;
bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0');
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
@ -537,26 +537,25 @@ static void Enr_ShowFormRegRemSeveralUsrs (void)
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_1_Provide_a_list_of_users);
/* Option a: get students from official lists */
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:left;\">"
"<br />%s<br />&nbsp;"
"</div>",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Option_a_Import_students_from_the_official_lists);
if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0')
Lay_ShowAlert (Lay_INFO,Txt_There_is_no_external_service_for_authentication_and_official_lists);
else
if (ExternalUsrsServiceAvailable)
{
/* Option a: get students from official lists */
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:left;\">"
"<br />%s<br />&nbsp;"
"</div>",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Option_a_Import_students_from_the_official_lists);
Lay_ShowAlert (Lay_INFO,Txt_Select_the_groups_of_students_you_want_to_register_in_remove_from_this_course);
Imp_ListMyImpGrpsAndStdsForm ();
/* Option b: get students' IDs from pasted text */
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:left;\">"
"<br />%s<br />&nbsp;"
"</div>",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Option_b_Type_or_paste_a_list_of_users);
}
/* Option b: get students' IDs from pasted text */
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:left;\">"
"<br />%s<br />&nbsp;"
"</div>",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Option_b_Type_or_paste_a_list_of_users);
Lay_ShowAlert (Lay_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_);
Enr_PutAreaToEnterUsrsIDs ();

View File

@ -364,7 +364,6 @@ void Imp_ListMyImpGrpsAndStdsForm (void)
static void Imp_ListMyImpGrpsAndStds (bool ItsAFormToRegRemStds)
{
extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists;
extern const char *Txt_Could_not_get_the_official_list_of_your_groups_and_students_;
extern const char *Txt_To_get_the_official_list_of_your_groups_and_students_;
char PathRelParamsToCommandsPriv[PATH_MAX+1];
@ -373,10 +372,8 @@ static void Imp_ListMyImpGrpsAndStds (bool ItsAFormToRegRemStds)
char Command[2048];
int ReturnCode;
if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0')
Lay_ShowAlert (Lay_WARNING,Txt_There_is_no_external_service_for_authentication_and_official_lists);
/***** Try to get lists from database *****/
else if (!Imp_GetAndListImpGrpsAndStdsFromDB (ItsAFormToRegRemStds))
if (!Imp_GetAndListImpGrpsAndStdsFromDB (ItsAFormToRegRemStds))
{
/***** Remove old imported students and groups *****/
Imp_RemoveOldImpStdsAndGrps ();

View File

@ -43301,27 +43301,6 @@ 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_external_service_for_authentication_and_official_lists =
#if L==0
"No hi ha cap servei extern d'autenticaci&oacute; i llistes oficials.";
#elif L==1
"Es gibt keinen externen Dienstleister f&uuml;r die Authentifizierung und offiziellen Listen.";
#elif L==2
"There is no external service for authentication and official lists.";
#elif L==3
"No existe ning&uacute;n servicio externo de autenticaci&oacute;n y listas oficiales.";
#elif L==4
"Il n'ya pas de service externe pour authentification et listes officiels.";
#elif L==5
"No existe ning&uacute;n servicio externo de autenticaci&oacute;n y listas oficiales."; // Okoteve traducción
#elif L==6
"Non c'&egrave; nessun servizio esterno per autenticazione e liste ufficiale.";
#elif L==7
"Nie ma zewn&eogon;trznych us&lstrok;ug uwierzytelniania.";
#elif L==8
"N&atilde;o h&aacute; servi&ccedil;o externo de autentica&ccedil;&atilde;o e listas oficiales.";
#endif
const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed =
#if L==0
"No se puede saber cu&aacute;ntos usuarios distintos han accedido sin identificarse."; // Necessita traduccio

View File

@ -1967,7 +1967,6 @@ static bool Usr_ChkUsrAndGetUsrDataFromExternalLogin (void)
{
extern const char *Txt_The_user_does_not_exist_or_password_is_incorrect;
extern const char *Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email;
extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists;
extern const char *Txt_There_is_no_user_in_X_with_ID_Y_If_you_already_have_an_account_on_Z_;
struct ListUsrCods ListUsrCods;
bool ItSeemsANewUsrIsEnteringFromExternalSite = false;
@ -2067,10 +2066,8 @@ static bool Usr_ChkUsrAndGetUsrDataFromExternalLogin (void)
/***** Validate session:
the call to SWAD is really coming from external site? *****/
if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0')
Lay_ShowAlert (Lay_WARNING,Txt_There_is_no_external_service_for_authentication_and_official_lists);
else if (Gbl.Imported.ExternalUsrId[0] &&
Gbl.Imported.ExternalSesId[0])
if (Gbl.Imported.ExternalUsrId[0] &&
Gbl.Imported.ExternalSesId[0])
{
/***** Parameters to command used to import data are passed through a temporary file *****/
/* If the private directory does not exist, create it */
@ -6643,8 +6640,9 @@ static void Usr_PutLinkToListOfficialStudents (void)
{
extern const char *The_ClassFormul[The_NUM_THEMES];
extern const char *Txt_Official_students;
bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0');
if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] && // There is an external service for authentication and official lists
if (ExternalUsrsServiceAvailable && // There is an external service for authentication and official lists
Gbl.Imported.ExternalUsrId[0] && // I was authenticated from external service...
Gbl.Imported.ExternalSesId[0] &&
Gbl.Imported.ExternalRole == Rol_ROLE_TEACHER) // ...as a teacher