mirror of https://github.com/acanas/swad-core.git
Version 15.40.6
This commit is contained in:
parent
39dffca30b
commit
a52373a117
|
@ -2390,12 +2390,12 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActUpdStd */{1423,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL},
|
||||
/* ActUpdTch */{1424,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL},
|
||||
|
||||
/* ActReqAccEnrStd */{1456,-1,TabUsr,ActLstStd ,0x008,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
|
||||
/* ActReqAccEnrTch */{1457,-1,TabUsr,ActLstTch ,0x010,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
|
||||
/* ActAccEnrStd */{1458,-1,TabUsr,ActLstStd ,0x008,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActAccEnrTch */{1459,-1,TabUsr,ActLstTch ,0x010,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActRemMe_Std */{1460,-1,TabUsr,ActLstStd ,0x008,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActRemMe_Tch */{1461,-1,TabUsr,ActLstTch ,0x010,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActReqAccEnrStd */{1456,-1,TabUsr,ActLstStd ,0x1E8,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
|
||||
/* ActReqAccEnrTch */{1457,-1,TabUsr,ActLstTch ,0x1F0,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
|
||||
/* ActAccEnrStd */{1458,-1,TabUsr,ActLstStd ,0x1E8,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActAccEnrTch */{1459,-1,TabUsr,ActLstTch ,0x1F0,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActRemMe_Std */{1460,-1,TabUsr,ActLstStd ,0x1E8,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActRemMe_Tch */{1461,-1,TabUsr,ActLstTch ,0x1F0,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
|
||||
/* ActNewAdmIns */{1337,-1,TabUsr,ActLstOth ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AddAdmToIns ,NULL},
|
||||
/* ActRemAdmIns */{1338,-1,TabUsr,ActLstOth ,0x180,0x180,0x180,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemAdmIns ,NULL},
|
||||
|
|
|
@ -554,9 +554,9 @@ static void Ctr_ListCentres (void)
|
|||
Lay_ShowAlert (Lay_INFO,Txt_No_centres_have_been_created_in_this_institution);
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Act_PutContextualLink (ActEdiCtr,NULL,"edit",Txt_Create_centre);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Act_FormStart (ActEdiCtr);
|
||||
Lay_PutConfirmButton (Txt_Create_centre);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,11 +111,13 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.40.5 (2015/11/19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.40.6 (2015/11/19)"
|
||||
|
||||
// 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.40.6: Nov 20, 2015 New button to register students in courses without them.
|
||||
New buttons to create institution, centre, degree and course. (187285 lines)
|
||||
Version 15.40.5: Nov 19, 2015 Code refactoring in degrees. (187274 lines)
|
||||
Version 15.40.4: Nov 19, 2015 Code refactoring in centres. (187279 lines)
|
||||
Version 15.40.3: Nov 19, 2015 Code refactoring in institutions. (187281 lines)
|
||||
|
|
|
@ -1231,9 +1231,9 @@ static void Crs_ListCourses (void)
|
|||
Lay_ShowAlert (Lay_INFO,Txt_No_courses_have_been_created_in_this_degree);
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Act_PutContextualLink (ActEdiCrs,NULL,"edit",Txt_Create_course);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Act_FormStart (ActEdiCrs);
|
||||
Lay_PutConfirmButton (Txt_Create_course);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2210,9 +2210,9 @@ static void Deg_ListDegrees (void)
|
|||
Lay_ShowAlert (Lay_INFO,Txt_No_degrees_have_been_created_in_this_centre);
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Act_PutContextualLink (ActEdiDeg,NULL,"edit",Txt_Create_degree);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Act_FormStart (ActEdiDeg);
|
||||
Lay_PutConfirmButton (Txt_Create_degree);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole,
|
|||
struct ListCodGrps *LstGrps,unsigned *NumUsrsRegistered);
|
||||
static void Enr_MarkOfficialStdsAsRemovable (long ImpGrpCod,bool RemoveSpecifiedUsrs);
|
||||
|
||||
static void Enr_PutLinkToRemAllStdsThisCrs (void);
|
||||
|
||||
static void Enr_RemoveEnrollmentRequest (long CrsCod,long UsrCod);
|
||||
|
||||
static void Enr_ReqRegRemUsr (Rol_Role_t Role);
|
||||
|
@ -128,6 +130,19 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN
|
|||
static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
|
||||
long Cod,const char *InsCtrDegName);
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Show form with button to enroll students *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutButtonToEnrollStudents (void)
|
||||
{
|
||||
extern const char *Txt_Register_students;
|
||||
|
||||
Act_FormStart (ActReqEnrSevStd);
|
||||
Lay_PutConfirmButton (Txt_Register_students);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Show form to request sign up in the current course *************/
|
||||
/*****************************************************************************/
|
||||
|
@ -559,8 +574,9 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0');
|
||||
|
||||
/***** Put contextual links *****/
|
||||
if (Role == Rol_STUDENT &&
|
||||
Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
if (Role == Rol_STUDENT && // Users to admin: students
|
||||
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
Gbl.CurrentCrs.Crs.NumStds) // This course has students
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
|
@ -1746,7 +1762,7 @@ static void Enr_MarkOfficialStdsAsRemovable (long ImpGrpCod,bool RemoveSpecified
|
|||
/**** Put a link (form) to remove all the students in the current course *****/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutLinkToRemAllStdsThisCrs (void)
|
||||
static void Enr_PutLinkToRemAllStdsThisCrs (void)
|
||||
{
|
||||
extern const char *Txt_Remove_all_students;
|
||||
|
||||
|
@ -1784,7 +1800,7 @@ void Enr_AskRemAllStdsThisCrs (void)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_No_users_found[Rol_STUDENT],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1810,7 +1826,7 @@ void Enr_RemAllStdsThisCrs (void)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_No_users_found[Rol_STUDENT],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,8 @@ typedef enum
|
|||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutButtonToEnrollStudents (void);
|
||||
|
||||
void Enr_PutLinkToRequestSignUp (void);
|
||||
|
||||
void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,
|
||||
|
@ -98,7 +100,6 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe);
|
|||
void Enr_ReceiveFormAdminStds (void);
|
||||
void Enr_ReceiveFormAdminTchs (void);
|
||||
|
||||
void Enr_PutLinkToRemAllStdsThisCrs (void);
|
||||
void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role);
|
||||
void Enr_AskRemAllStdsThisCrs (void);
|
||||
void Enr_RemAllStdsThisCrs (void);
|
||||
|
|
|
@ -505,9 +505,9 @@ static void Ins_ListInstitutions (void)
|
|||
Lay_ShowAlert (Lay_INFO,Txt_No_institutions_have_been_created_in_this_country);
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Act_PutContextualLink (ActEdiIns,NULL,"edit",Txt_Create_institution);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Act_FormStart (ActEdiIns);
|
||||
Lay_PutConfirmButton (Txt_Create_institution);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -640,7 +640,7 @@ void Mrk_ShowMyMarks (void)
|
|||
}
|
||||
else // Course zone
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.NumStds) // If there are student in this course
|
||||
if (Gbl.CurrentCrs.Crs.NumStds) // If there are students in this course
|
||||
{
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = Usr_GetRamdomStdFromCrs (Gbl.CurrentCrs.Crs.CrsCod);
|
||||
UsrDat = &Gbl.Usrs.Other.UsrDat;
|
||||
|
|
|
@ -881,7 +881,7 @@ bool Pwd_CheckIfICanChangeOtherUsrPassword (long UsrCod)
|
|||
void Pwd_AskForConfirmationOnDangerousAction (void)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_I_understand_that_this_action_may_have_serious_consequences_and_can_not_be_undone;
|
||||
extern const char *Txt_I_understand_that_this_action_can_not_be_undone;
|
||||
extern const char *Txt_For_security_enter_your_password;
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\" style=\"margin:12px;\">"
|
||||
|
@ -892,7 +892,7 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
|
|||
" size=\"16\" maxlength=\"%u\" autocomplete=\"off\" />"
|
||||
"</div>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_I_understand_that_this_action_may_have_serious_consequences_and_can_not_be_undone,
|
||||
Txt_I_understand_that_this_action_can_not_be_undone,
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_For_security_enter_your_password,
|
||||
Pwd_MAX_LENGTH_PLAIN_PASSWORD);
|
||||
|
|
29
swad_text.c
29
swad_text.c
|
@ -13439,34 +13439,25 @@ const char *Txt_I_have_read_this_information =
|
|||
"Eu li esta informação";
|
||||
#endif
|
||||
|
||||
const char *Txt_I_understand_that_this_action_may_have_serious_consequences_and_can_not_be_undone =
|
||||
const char *Txt_I_understand_that_this_action_can_not_be_undone =
|
||||
#if L==0
|
||||
"Entenc que aquesta acció pot tenir conseqüències greus"
|
||||
" i que no es pot desfer.";
|
||||
"Entenc que aquesta acció no es pot desfer.";
|
||||
#elif L==1
|
||||
"Ich verstehe, dass diese Aktion kann schwerwiegende Folgen haben"
|
||||
" und kann nicht rückgängig gemacht werden.";
|
||||
"Ich verstehe, dass diese Aktion kann nicht rückgängig gemacht werden.";
|
||||
#elif L==2
|
||||
"I understand that this action may have serious consequences"
|
||||
" and can not be undone.";
|
||||
"I understand that this action can not be undone.";
|
||||
#elif L==3
|
||||
"Entiendo que esta acción puede tener consecuencias graves"
|
||||
" y que no se puede deshacer.";
|
||||
"Entiendo que esta acción no se puede deshacer.";
|
||||
#elif L==4
|
||||
"Je comprends que cette action peut avoir des conséquences graves"
|
||||
" et ne peut être annulée.";
|
||||
"Je comprends que cette action ne peut être annulée.";
|
||||
#elif L==5
|
||||
"Entiendo que esta acción puede tener consecuencias graves"
|
||||
" y que no se puede deshacer."; // Okoteve traducción
|
||||
"Entiendo que esta acción no se puede deshacer."; // Okoteve traducción
|
||||
#elif L==6
|
||||
"Mi rendo conto che questa azione può avere gravi conseguenze"
|
||||
" e non può essere annullata.";
|
||||
"Mi rendo conto che questa azione non può essere annullata.";
|
||||
#elif L==7
|
||||
"Rozumiem, że działanie to może mieć poważne konsekwencje"
|
||||
" i nie można cofnąć.";
|
||||
"Rozumiem, że działanie nie można cofnąć.";
|
||||
#elif L==8
|
||||
"Eu entendo que esta ação pode ter consequências graves"
|
||||
" e não pode ser desfeita.";
|
||||
"Eu entendo que esta ação não pode ser desfeita.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Icons =
|
||||
|
|
|
@ -6700,8 +6700,15 @@ void Usr_SeeStudents (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Usr_ShowWarningNoUsersFound (Rol_STUDENT);
|
||||
|
||||
/***** Form to enroll several students *****/
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER) // I am a teacher in current course
|
||||
Enr_PutButtonToEnrollStudents ();
|
||||
}
|
||||
|
||||
/***** Free memory for students list *****/
|
||||
Usr_FreeUsrsList (&Gbl.Usrs.LstStds);
|
||||
|
||||
|
@ -7265,7 +7272,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
|||
{
|
||||
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_No_users_found[Role]);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Role]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue