diff --git a/css/swad16.222.css b/css/swad16.222.css index bf72107de..630d69e5c 100644 --- a/css/swad16.222.css +++ b/css/swad16.222.css @@ -1074,7 +1074,6 @@ a:hover /* Default ==> underlined */ .CONNECTED { box-sizing:border-box; - width:148px; margin:0 auto; background:white; border-style:solid; diff --git a/swad_changelog.h b/swad_changelog.h index d9a4dffd6..a8658eb4b 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -229,20 +229,20 @@ // 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.11 (2017-05-29)" +#define Log_PLATFORM_VERSION "SWAD 16.225.12 (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.12:May 29, 2017 Button to register students in connected and requests. (220587 lines) 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) diff --git a/swad_connected.c b/swad_connected.c index 0ac9b580a..8af2a38e8 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -467,7 +467,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void) /***** Start container *****/ fprintf (Gbl.F.Out,"
"); + " style=\"margin-top:6px;\">"); /***** Number of connected users who belong to scope *****/ Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Rol_UNK,&Usrs); @@ -491,6 +491,11 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void) Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_GST); fprintf (Gbl.F.Out,""); + /***** Put link to register students *****/ + if (Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Course selected and I am logged as teacher + if (!Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD]) // No students in course + Usr_ShowWarningNoUsersFound (Rol_STD); + /***** End container *****/ fprintf (Gbl.F.Out,"
"); } diff --git a/swad_course.c b/swad_course.c index d15e6d744..bea90d3d6 100644 --- a/swad_course.c +++ b/swad_course.c @@ -758,7 +758,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) { Act_FormStart (ActReqEnrSevStd); Crs_PutParamCrsCod (Crs.CrsCod); - fprintf (Gbl.F.Out,"", Txt_Register_students); diff --git a/swad_enrolment.c b/swad_enrolment.c index 5232070a1..37c3d86c8 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -164,7 +164,7 @@ void Enr_PutButtonToEnrolStudents (void) Gbl.Usrs.Me.LoggedRole == Rol_TCH) // I am logged as teacher { Act_FormStart (ActReqEnrSevStd); - Lay_PutConfirmButton (Txt_Register_students); + Lay_PutCreateButton (Txt_Register_students); Act_FormEnd (); } } @@ -2932,6 +2932,11 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) else // There are no requests Ale_ShowAlert (Ale_INFO,Txt_No_enrolment_requests); + /***** Put link to register students *****/ + if (Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Course selected and I am logged as teacher + if (!Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD]) // No students in course + Usr_ShowWarningNoUsersFound (Rol_STD); + /***** End frame *****/ Lay_EndRoundFrame (); } diff --git a/swad_help.c b/swad_help.c index c97c3e701..22cf4d72d 100644 --- a/swad_help.c +++ b/swad_help.c @@ -172,7 +172,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void) Gbl.CurrentCrs.Crs.ShrtName); Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title, ActReqEnrSevStd, - "BT_CONFIRM",Txt_Register_students); + "BT_CREATE",Txt_Register_students); } if (Gbl.Action.Act != ActMyCrs) // I am not seeing the action to list my courses diff --git a/swad_user.c b/swad_user.c index 1fe5c8e1c..6e13e1e32 100644 --- a/swad_user.c +++ b/swad_user.c @@ -8162,8 +8162,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role) extern const char *Txt_No_users_found[Rol_NUM_ROLES]; 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 + Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Course selected and I am logged as teacher { /***** Show alert *****/ Ale_ShowAlert (Ale_WARNING,Txt_No_users_found[Role]);