mirror of https://github.com/acanas/swad-core.git
Version 16.225.11
This commit is contained in:
parent
a6e47e0c51
commit
d5814cafc9
|
@ -2552,7 +2552,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActAccEnrNEdTch */{1640,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActAccEnrTch */{1459,-1,TabUnk,ActLstTch ,0x3E0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
|
||||
/* ActRemMe_Std */{1460,-1,TabUnk,ActLstStd ,0x3C8, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActRemMe_NEdTch */{1641,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActRemMe_NET */{1641,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
/* ActRemMe_Tch */{1461,-1,TabUnk,ActLstTch ,0x3E0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
|
||||
|
||||
/* ActNewAdmIns */{1337,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AddAdmToIns ,NULL},
|
||||
|
|
|
@ -229,17 +229,21 @@
|
|||
|
||||
// TODO: Al listar administradores, debería estar marcado por defecto "Incluir fotos"
|
||||
|
||||
// TODO: Add buttons to register students in courses without students
|
||||
// TODO: Behaviour of register non-editing teachers in groups should be similar to register students.
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.225.10 (2017-05-29)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.225.11 (2017-05-29)"
|
||||
#define CSS_FILE "swad16.222.css"
|
||||
#define JS_FILE "swad16.206.3.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.225.11:May 29, 2017 Button to register students everytime an alert with no students in course is displayed. (220581 lines)
|
||||
Version 16.225.10:May 29, 2017 Buttons to register students in listing of teacher's courses. (220561 lines)
|
||||
Version 16.225.9: May 29, 2017 Fixed minor bug in user administration. (220540 lines)
|
||||
Version 16.225.8: May 29, 2017 Statistics of hits in course accessible by non-editing teachers.
|
||||
|
|
30
swad_help.c
30
swad_help.c
|
@ -102,6 +102,19 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
extern const char *Txt_Log_in;
|
||||
extern const char *Txt_New_on_PLATFORM_Sign_up;
|
||||
extern const char *Txt_Create_account;
|
||||
static const Act_Action_t ActionsRemoveMe[Rol_NUM_ROLES] =
|
||||
{
|
||||
ActUnk, // Rol_UNK
|
||||
ActUnk, // Rol_GST
|
||||
ActUnk, // Rol_USR
|
||||
ActRemMe_Std, // Rol_STD
|
||||
ActRemMe_NET, // Rol_NET
|
||||
ActRemMe_Tch, // Rol_TCH
|
||||
ActUnk, // Rol_DEG_ADM
|
||||
ActUnk, // Rol_CTR_ADM
|
||||
ActUnk, // Rol_INS_ADM
|
||||
ActUnk, // Rol_SYS_ADM
|
||||
};
|
||||
|
||||
/***** Alert message *****/
|
||||
if (Gbl.Usrs.Me.Logged &&
|
||||
|
@ -127,14 +140,15 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
if (Gbl.Action.Act != ActLogIn &&
|
||||
Gbl.Action.Act != ActLogInNew &&
|
||||
Gbl.Action.Act != ActLogInLan) // I am not just logged
|
||||
{
|
||||
/* Request my removing from this course */
|
||||
sprintf (Gbl.Title,Txt_Remove_me_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActReqMdfOneStd,
|
||||
"BT_REMOVE",Txt_Remove_me);
|
||||
}
|
||||
if (ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB] != ActUnk)
|
||||
{
|
||||
/* Request my removing from this course */
|
||||
sprintf (Gbl.Title,Txt_Remove_me_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB],
|
||||
"BT_REMOVE",Txt_Remove_me);
|
||||
}
|
||||
}
|
||||
else // I do not belong to this course
|
||||
{
|
||||
|
|
24
swad_user.c
24
swad_user.c
|
@ -6012,14 +6012,9 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
|||
free ((void *) GroupNames);
|
||||
}
|
||||
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
|
||||
{
|
||||
/***** Show warning indicating no students found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_STD);
|
||||
|
||||
/***** Button to enrol students *****/
|
||||
Enr_PutButtonToEnrolStudents ();
|
||||
}
|
||||
|
||||
/***** Free memory for students list *****/
|
||||
Usr_FreeUsrsList (Rol_STD);
|
||||
}
|
||||
|
@ -7488,14 +7483,9 @@ void Usr_SeeStudents (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Show warning indicating no students found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_STD);
|
||||
|
||||
/***** Button to enrol students *****/
|
||||
Enr_PutButtonToEnrolStudents ();
|
||||
}
|
||||
|
||||
/***** End section with user list *****/
|
||||
Lay_EndSection ();
|
||||
|
||||
|
@ -8171,7 +8161,19 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
|||
{
|
||||
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
|
||||
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_users_found[Role]);
|
||||
if (Role == Rol_STD && // No students found
|
||||
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_TCH) // I am logged as teacher
|
||||
{
|
||||
/***** Show alert *****/
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_No_users_found[Role]);
|
||||
|
||||
/***** Button to enrol students *****/
|
||||
Enr_PutButtonToEnrolStudents ();
|
||||
}
|
||||
else
|
||||
/***** Show alert *****/
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_users_found[Role]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue