mirror of https://github.com/acanas/swad-core.git
Version 16.229
This commit is contained in:
parent
3d325bf2b7
commit
d5a75d74e5
|
@ -231,13 +231,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.228.2 (2017-05-30)"
|
#define Log_PLATFORM_VERSION "SWAD 16.229 (2017-05-30)"
|
||||||
#define CSS_FILE "swad16.226.css"
|
#define CSS_FILE "swad16.226.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.229: May 30, 2017 Selection of groups also for listing of teachers. (220748 lines)
|
||||||
Version 16.228.2: May 30, 2017 Fixed bug in selection of users. (220726 lines)
|
Version 16.228.2: May 30, 2017 Fixed bug in selection of users. (220726 lines)
|
||||||
Version 16.228.1: May 30, 2017 By default, photos are displayed in listing of users. (220722 lines)
|
Version 16.228.1: May 30, 2017 By default, photos are displayed in listing of users. (220722 lines)
|
||||||
Version 16.228: May 30, 2017 Non-editing teachers can not change their selection of groups.
|
Version 16.228: May 30, 2017 Non-editing teachers can not change their selection of groups.
|
||||||
|
|
10
swad_group.c
10
swad_group.c
|
@ -336,8 +336,8 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
extern const char *Txt_Groups;
|
extern const char *Txt_Groups;
|
||||||
extern const char *Txt_All_groups;
|
extern const char *Txt_All_groups;
|
||||||
extern const char *Txt_Update_students_according_to_selected_groups;
|
extern const char *Txt_Update_users_according_to_selected_groups;
|
||||||
extern const char *Txt_Update_students;
|
extern const char *Txt_Update_users;
|
||||||
unsigned NumGrpTyp;
|
unsigned NumGrpTyp;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
|
|
||||||
|
@ -393,11 +393,11 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
|
||||||
/***** Submit button *****/
|
/***** Submit button *****/
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
|
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
|
||||||
" style=\"padding-top:12px;\">");
|
" style=\"padding-top:12px;\">");
|
||||||
Act_LinkFormSubmitAnimated (Txt_Update_students_according_to_selected_groups,
|
Act_LinkFormSubmitAnimated (Txt_Update_users_according_to_selected_groups,
|
||||||
The_ClassFormBold[Gbl.Prefs.Theme],
|
The_ClassFormBold[Gbl.Prefs.Theme],
|
||||||
"CopyMessageToHiddenFields()");
|
"CopyMessageToHiddenFields()");
|
||||||
Lay_PutCalculateIconWithText (Txt_Update_students_according_to_selected_groups,
|
Lay_PutCalculateIconWithText (Txt_Update_users_according_to_selected_groups,
|
||||||
Txt_Update_students);
|
Txt_Update_users);
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
|
|
36
swad_text.c
36
swad_text.c
|
@ -49517,46 +49517,46 @@ const char *Txt_Update_messages =
|
||||||
"Atualizar mensagens";
|
"Atualizar mensagens";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Update_students =
|
const char *Txt_Update_users =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Actualitzar estudiants";
|
"Actualitzar usuaris";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Update Studenten";
|
"Update Benutzer";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"Update students";
|
"Update users";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Actualizar estudiantes";
|
"Actualizar usuarios";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Mise à jour des étudiants";
|
"Mise à jour des étudiants";
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Actualizar estudiantes"; // Okoteve traducción
|
"Actualizar usuarios"; // Okoteve traducción
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Aggiornamento studenti";
|
"Aggiornamento utenti";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Aktualizacja studentów";
|
"Zaktualizuj użytkowników";
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Atualizar os estudantes";
|
"Atualizar os utilizadores";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Update_students_according_to_selected_groups =
|
const char *Txt_Update_users_according_to_selected_groups =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Actualitzar estudiants segons els grups seleccionats";
|
"Actualitzar usuaris segons els grups seleccionats";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Update Studenten nach ausgewählten Gruppen";
|
"Update Benutzer nach ausgewählten Gruppen";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"Update students according to selected groups";
|
"Update users according to selected groups";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Actualizar estudiantes según los grupos seleccionados";
|
"Actualizar usuarios según los grupos seleccionados";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Mise à jour des étudiants en fonction de groupes sélectionnes";
|
"Mise à jour des étudiants en fonction de groupes sélectionnes";
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Actualizar estudiantes según los grupos seleccionados"; // Okoteve traducción
|
"Actualizar usuarios según los grupos seleccionados"; // Okoteve traducción
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Aggiornamento studenti in base a gruppi selezionati";
|
"Aggiornamento utenti in base a gruppi selezionati";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Update students according to selected groups"; // Potrzebujesz tlumaczenie
|
"Zaktualizuj użytkowników według wybranych grup";
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Atualizar os estudantes de acordo com grupos selecionados";
|
"Atualizar os utilizadores de acordo com grupos selecionados";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_UPLOAD_FILE_Invalid_link =
|
const char *Txt_UPLOAD_FILE_Invalid_link =
|
||||||
|
|
56
swad_user.c
56
swad_user.c
|
@ -4044,9 +4044,8 @@ static void Usr_BuildQueryToGetUsrsLstCrs (Rol_Role_t Role,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***** If there are no groups selected, don't do anything *****/
|
/***** If there are no groups selected, don't do anything *****/
|
||||||
if (Role == Rol_STD &&
|
if (!Gbl.Usrs.ClassPhoto.AllGroups &&
|
||||||
(!Gbl.Usrs.ClassPhoto.AllGroups &&
|
!Gbl.CurrentCrs.Grps.LstGrpsSel.NumGrps)
|
||||||
!Gbl.CurrentCrs.Grps.LstGrpsSel.NumGrps))
|
|
||||||
{
|
{
|
||||||
Query[0] = '\0';
|
Query[0] = '\0';
|
||||||
return;
|
return;
|
||||||
|
@ -4071,8 +4070,8 @@ static void Usr_BuildQueryToGetUsrsLstCrs (Rol_Role_t Role,
|
||||||
QueryFields,
|
QueryFields,
|
||||||
Gbl.CurrentCrs.Crs.CrsCod,(unsigned) Role);
|
Gbl.CurrentCrs.Crs.CrsCod,(unsigned) Role);
|
||||||
|
|
||||||
/***** Select users in selected groups (only for students) *****/
|
/***** Select users in selected groups *****/
|
||||||
if (Role == Rol_STD && !Gbl.Usrs.ClassPhoto.AllGroups)
|
if (!Gbl.Usrs.ClassPhoto.AllGroups)
|
||||||
{
|
{
|
||||||
/***** Get list of groups types in current course *****/
|
/***** Get list of groups types in current course *****/
|
||||||
Grp_GetListGrpTypesInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
Grp_GetListGrpTypesInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
||||||
|
@ -6508,9 +6507,13 @@ void Usr_ListAllDataTchs (void)
|
||||||
/***** Get list of teachers *****/
|
/***** Get list of teachers *****/
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
||||||
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
|
||||||
1 << Rol_NET |
|
NumUsrs = Gbl.Usrs.LstUsrs[Rol_NET].NumUsrs +
|
||||||
1 << Rol_TCH);
|
Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs;
|
||||||
|
else
|
||||||
|
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
||||||
|
1 << Rol_NET |
|
||||||
|
1 << Rol_TCH);
|
||||||
|
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
|
@ -7560,12 +7563,20 @@ void Usr_SeeTeachers (void)
|
||||||
Sco_GetScope ("ScopeUsr");
|
Sco_GetScope ("ScopeUsr");
|
||||||
ICanViewRecords = (Gbl.Scope.Current == Sco_SCOPE_CRS);
|
ICanViewRecords = (Gbl.Scope.Current == Sco_SCOPE_CRS);
|
||||||
|
|
||||||
|
/***** Get groups to show ******/
|
||||||
|
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
|
||||||
|
Grp_GetParCodsSeveralGrpsToShowUsrs ();
|
||||||
|
|
||||||
/***** Get lists of teachers *****/
|
/***** Get lists of teachers *****/
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
||||||
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
|
||||||
1 << Rol_NET |
|
NumUsrs = Gbl.Usrs.LstUsrs[Rol_NET].NumUsrs +
|
||||||
1 << Rol_TCH);
|
Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs;
|
||||||
|
else
|
||||||
|
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
||||||
|
1 << Rol_NET |
|
||||||
|
1 << Rol_TCH);
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
|
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
|
||||||
|
@ -7582,6 +7593,10 @@ void Usr_SeeTeachers (void)
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
/***** Form to select groups *****/
|
||||||
|
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
|
||||||
|
Grp_ShowFormToSelectSeveralGroups (ActLstTch);
|
||||||
|
|
||||||
/***** Start section with user list *****/
|
/***** Start section with user list *****/
|
||||||
Lay_StartSection (Usr_USER_LIST_SECTION_ID);
|
Lay_StartSection (Usr_USER_LIST_SECTION_ID);
|
||||||
|
|
||||||
|
@ -7663,6 +7678,9 @@ void Usr_SeeTeachers (void)
|
||||||
/***** Free memory for teachers lists *****/
|
/***** Free memory for teachers lists *****/
|
||||||
Usr_FreeUsrsList (Rol_TCH); // Teachers
|
Usr_FreeUsrsList (Rol_TCH); // Teachers
|
||||||
Usr_FreeUsrsList (Rol_NET); // Non-editing teachers
|
Usr_FreeUsrsList (Rol_NET); // Non-editing teachers
|
||||||
|
|
||||||
|
/***** Free memory for list of selected groups *****/
|
||||||
|
Grp_FreeListCodSelectedGrps ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -7932,9 +7950,13 @@ void Usr_SeeTchClassPhotoPrn (void)
|
||||||
/***** Get list of teachers *****/
|
/***** Get list of teachers *****/
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
||||||
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
|
||||||
1 << Rol_NET |
|
NumUsrs = Gbl.Usrs.LstUsrs[Rol_NET].NumUsrs +
|
||||||
1 << Rol_TCH);
|
Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs;
|
||||||
|
else
|
||||||
|
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
||||||
|
1 << Rol_NET |
|
||||||
|
1 << Rol_TCH);
|
||||||
|
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
|
@ -8166,14 +8188,16 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
||||||
extern const char *Txt_Register_students;
|
extern const char *Txt_Register_students;
|
||||||
extern const char *Txt_Register_teacher;
|
extern const char *Txt_Register_teacher;
|
||||||
|
|
||||||
if (Role == Rol_STD && // No students found
|
if (Gbl.Usrs.ClassPhoto.AllGroups && // All groups selected
|
||||||
|
Role == Rol_STD && // No students found
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Course selected and I am logged as teacher
|
Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Course selected and I am logged as teacher
|
||||||
/***** Show alert and button to enrol students *****/
|
/***** Show alert and button to enrol students *****/
|
||||||
Ale_ShowAlertAndButton (Ale_WARNING,Txt_No_users_found[Rol_STD],
|
Ale_ShowAlertAndButton (Ale_WARNING,Txt_No_users_found[Rol_STD],
|
||||||
ActReqEnrSevStd,NULL,NULL,NULL,
|
ActReqEnrSevStd,NULL,NULL,NULL,
|
||||||
Lay_CREATE_BUTTON,Txt_Register_students);
|
Lay_CREATE_BUTTON,Txt_Register_students);
|
||||||
|
|
||||||
else if (Role == Rol_TCH && // No teachers found
|
else if (Gbl.Usrs.ClassPhoto.AllGroups && // All groups selected
|
||||||
|
Role == Rol_TCH && // No teachers found
|
||||||
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||||
Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) // I am an administrator
|
Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) // I am an administrator
|
||||||
/***** Show alert and button to enrol students *****/
|
/***** Show alert and button to enrol students *****/
|
||||||
|
|
Loading…
Reference in New Issue