Version 15.40.6

This commit is contained in:
Antonio Cañas Vargas 2015-11-20 14:44:54 +01:00
parent 39dffca30b
commit a52373a117
12 changed files with 65 additions and 48 deletions

View File

@ -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},

View File

@ -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 ();
}
}
}

View File

@ -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)

View File

@ -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 ();
}
}
}

View File

@ -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 ();
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);

View File

@ -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 ();
}
}
}

View File

@ -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;

View File

@ -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);

View File

@ -13439,34 +13439,25 @@ const char *Txt_I_have_read_this_information =
"Eu li esta informa&ccedil;&atilde;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&oacute; pot tenir conseq&uuml;&egrave;ncies greus"
" i que no es pot desfer.";
"Entenc que aquesta acci&oacute; no es pot desfer.";
#elif L==1
"Ich verstehe, dass diese Aktion kann schwerwiegende Folgen haben"
" und kann nicht r&uuml;ckg&auml;ngig gemacht werden.";
"Ich verstehe, dass diese Aktion kann nicht r&uuml;ckg&auml;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&oacute;n puede tener consecuencias graves"
" y que no se puede deshacer.";
"Entiendo que esta acci&oacute;n no se puede deshacer.";
#elif L==4
"Je comprends que cette action peut avoir des cons&eacute;quences graves"
" et ne peut &ecirc;tre annul&eacute;e.";
"Je comprends que cette action ne peut &ecirc;tre annul&eacute;e.";
#elif L==5
"Entiendo que esta acci&oacute;n puede tener consecuencias graves"
" y que no se puede deshacer."; // Okoteve traducción
"Entiendo que esta acci&oacute;n no se puede deshacer."; // Okoteve traducción
#elif L==6
"Mi rendo conto che questa azione pu&ograve; avere gravi conseguenze"
" e non pu&ograve; essere annullata.";
"Mi rendo conto che questa azione non pu&ograve; essere annullata.";
#elif L==7
"Rozumiem, &zdot;e dzia&lstrok;anie to mo&zdot;e mie&cacute; powa&zdot;ne konsekwencje"
" i nie mo&zdot;na cofn&aogon;&cacute;.";
"Rozumiem, &zdot;e dzia&lstrok;anie nie mo&zdot;na cofn&aogon;&cacute;.";
#elif L==8
"Eu entendo que esta a&ccedil;&atilde;o pode ter consequ&ecirc;ncias graves"
" e n&atilde;o pode ser desfeita.";
"Eu entendo que esta a&ccedil;&atilde;o n&atilde;o pode ser desfeita.";
#endif
const char *Txt_Icons =

View File

@ -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]);
}
/*****************************************************************************/