Version 16.71

This commit is contained in:
Antonio Cañas Vargas 2016-11-25 03:21:02 +01:00
parent bff6e25886
commit 2ea00a37be
10 changed files with 175 additions and 151 deletions

View File

@ -1925,12 +1925,18 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
unsigned NumStd;
struct UsrData UsrDat;
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActSeeOneAtt);
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order list of students in this course *****/
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Attendance,NULL,Hlp_USERS_Attendance);
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActSeeOneAtt);
if (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs)
{
/***** Get my preference about photos in users' list for current course *****/
@ -1945,10 +1951,8 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
Grp_PutParamsCodGrps ();
/***** List students' data *****/
/* Header */
Lay_StartRoundFrameTable (NULL,Txt_Attendance,
NULL,Hlp_USERS_Attendance,2);
fprintf (Gbl.F.Out,"<tr>"
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL CELLS_PAD_2\">"
"<tr>"
"<th></th>"
"<th></th>"
"<th></th>");
@ -1982,8 +1986,10 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
Att_WriteRowStdToCallTheRoll (NumStd + 1,&UsrDat,Att);
}
/* Send button and end frame */
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save);
fprintf (Gbl.F.Out,"</table>");
/* Send button */
Lay_PutConfirmButton (Txt_Save);
/***** End form *****/
Act_FormEnd ();
@ -1994,6 +2000,9 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
else
Usr_ShowWarningNoUsersFound (Rol_STUDENT);
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free memory for students list *****/
Usr_FreeUsrsList (Rol_STUDENT);
@ -2592,6 +2601,12 @@ void Usr_ReqListStdsAttendanceCrs (void)
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order lists of users from current course *****/
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN],
NULL,NULL);
@ -2599,9 +2614,6 @@ void Usr_ReqListStdsAttendanceCrs (void)
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqLstStdAtt);
/***** Get and order lists of users from current course *****/
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
if (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs)
{
if (Usr_GetIfShowBigList (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs,NULL))

View File

@ -168,17 +168,22 @@
// TODO: Change forms to change my webs / social networks to one unique form with a "Save changes" button
// TODO: In USERS > Attendance > Select event, if the list of users is big, the user should be requested to see big list in the same way that it is made in other options
// TODO: Check help on ASSESSMENT > Tests > Test results
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.70.5 (2016-11-24)"
#define Log_PLATFORM_VERSION "SWAD 16.71 (2016-11-25)"
#define CSS_FILE "swad16.69.css"
#define JS_FILE "swad16.46.1.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.71: Nov 25, 2016 Fixed bugs and changes in layout related with selection of groups. (207560 lines)
Version 16.70.5: Nov 24, 2016 Changes in layout of attendance list. (207549 lines)
Version 16.70.4: Nov 24, 2016 Changes in layout of students' list. (207547 lines)
Version 16.70.3: Nov 24, 2016 Changes in layout of selection of students to view homework. (207547 lines)

View File

@ -3040,6 +3040,7 @@ void Brw_AskEditWorksCrs (void)
{
extern const char *Txt_Users;
extern const char *Txt_View_homework;
unsigned NumTotalUsrs;
/***** Get parameters related to file browser *****/
Brw_GetParAndInitFileBrowser ();
@ -3049,21 +3050,24 @@ void Brw_AskEditWorksCrs (void)
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
/***** Draw class photos to select users *****/
Lay_StartRoundFrame (NULL,Txt_Users,NULL,NULL);
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqAsgWrkCrs);
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
if (Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs ||
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs)
if (NumTotalUsrs)
{
if (Usr_GetIfShowBigList (Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs,NULL))
if (Usr_GetIfShowBigList (NumTotalUsrs,NULL))
{
/* Form to select type of list used for select several users */
Usr_ShowFormsToSelectUsrListType (ActReqAsgWrkCrs);

View File

@ -61,7 +61,6 @@ extern struct Globals Gbl;
static void Grp_EditGroupTypes (void);
static void Grp_EditGroups (void);
static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction);
static void Grp_ConstructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType);
static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType);
static void Grp_RemoveUsrFromGroup (long UsrCod,long GrpCod);
@ -225,7 +224,7 @@ static void Grp_EditGroups (void)
/*************** Show form to select one or several groups *******************/
/*****************************************************************************/
static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
{
extern const char *Hlp_USERS_Groups;
extern const char *The_ClassForm[The_NUM_THEMES];
@ -235,70 +234,75 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
extern const char *Txt_Update_students;
extern const char *Txt_Update_students_according_to_selected_groups;
unsigned NumGrpTyp;
bool ICanEdit = !Gbl.Form.Inside &&
(Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
bool ICanEdit;
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
if (Gbl.CurrentCrs.Grps.NumGrps)
{
ICanEdit = !Gbl.Form.Inside &&
(Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Groups,
ICanEdit ? Grp_PutIconToEditGroups :
NULL,
Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
/***** Start form to update the students listed
depending on the groups selected *****/
Act_FormStart (NextAction);
Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType);
Usr_PutParamColsClassPhoto ();
Usr_PutParamListWithPhotos ();
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Groups,
ICanEdit ? Grp_PutIconToEditGroups :
NULL,
Hlp_USERS_Groups);
/***** Put parameters needed depending on the action *****/
Usr_PutExtraParamsUsrList (NextAction);
/***** Start form to update the students listed
depending on the groups selected *****/
Act_FormStart (NextAction);
Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType);
Usr_PutParamColsClassPhoto ();
Usr_PutParamListWithPhotos ();
/***** Select all groups *****/
fprintf (Gbl.F.Out,"<div class=\"%s CENTER_MIDDLE\">"
"<input type=\"checkbox\" id=\"AllGroups\" name=\"AllGroups\" value=\"Y\"",
The_ClassForm[Gbl.Prefs.Theme]);
if (Gbl.Usrs.ClassPhoto.AllGroups)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'GrpCods')\" />"
" %s"
"</div>",
Txt_All_groups);
/***** Put parameters needed depending on the action *****/
Usr_PutExtraParamsUsrList (NextAction);
/***** Get list of groups types and groups in this course *****/
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Select all groups *****/
fprintf (Gbl.F.Out,"<div class=\"%s CENTER_MIDDLE\">"
"<input type=\"checkbox\" id=\"AllGroups\" name=\"AllGroups\" value=\"Y\"",
The_ClassForm[Gbl.Prefs.Theme]);
if (Gbl.Usrs.ClassPhoto.AllGroups)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'GrpCods')\" />"
" %s"
"</div>",
Txt_All_groups);
/***** List the groups for each group type *****/
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL CELLS_PAD_2\">");
for (NumGrpTyp = 0;
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
NumGrpTyp++)
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
Grp_ListGrpsForMultipleSelection (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp]);
fprintf (Gbl.F.Out,"</table>");
/***** Get list of groups types and groups in this course *****/
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Free list of groups types and groups in this course *****/
Grp_FreeListGrpTypesAndGrps ();
/***** List the groups for each group type *****/
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL CELLS_PAD_2\">");
for (NumGrpTyp = 0;
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
NumGrpTyp++)
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
Grp_ListGrpsForMultipleSelection (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp]);
fprintf (Gbl.F.Out,"</table>");
/***** Submit button *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"padding-top:12px;\">");
Act_LinkFormSubmitAnimated (Txt_Update_students_according_to_selected_groups,
The_ClassFormBold[Gbl.Prefs.Theme],
"CopyMessageToHiddenFields()");
Lay_PutCalculateIconWithText (Txt_Update_students_according_to_selected_groups,
Txt_Update_students);
fprintf (Gbl.F.Out,"</div>");
/***** Free list of groups types and groups in this course *****/
Grp_FreeListGrpTypesAndGrps ();
/***** End form *****/
Act_FormEnd ();
/***** Submit button *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"padding-top:12px;\">");
Act_LinkFormSubmitAnimated (Txt_Update_students_according_to_selected_groups,
The_ClassFormBold[Gbl.Prefs.Theme],
"CopyMessageToHiddenFields()");
Lay_PutCalculateIconWithText (Txt_Update_students_according_to_selected_groups,
Txt_Update_students);
fprintf (Gbl.F.Out,"</div>");
/***** End frame *****/
Lay_EndRoundFrame ();
fprintf (Gbl.F.Out,"</div>");
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
fprintf (Gbl.F.Out,"</div>");
}
}
/*****************************************************************************/
@ -331,20 +335,6 @@ void Grp_PutParamsCodGrps (void)
}
}
/*****************************************************************************/
/**************** Show a form to select one or several groups ****************/
/*****************************************************************************/
void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
{
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Show form *****/
if (Gbl.CurrentCrs.Grps.NumGrps)
Grp_ShowFormSeveralGrps (NextAction);
}
/*****************************************************************************/
/**************** Get parameters related to groups selected ******************/
/*****************************************************************************/
@ -371,7 +361,6 @@ void Grp_GetParCodsSeveralGrpsToShowUsrs (void)
Par_GetParToText ("AllGroups",YN,1);
Gbl.Usrs.ClassPhoto.AllGroups = (Str_ConvertToUpperLetter (YN[0]) == 'Y');
/***** Count number of groups in current course *****/
if (Gbl.CurrentCrs.Grps.NumGrps)
{
/***** Allocate memory for the list of group codes *****/
@ -451,7 +440,6 @@ void Grp_GetParCodsSeveralGrpsToEditAsgAttOrSvy (void)
/***** Set default for number of groups selected by me *****/
Gbl.CurrentCrs.Grps.LstGrpsSel.NumGrps = 0;
/***** Count number of groups in current course *****/
if (Gbl.CurrentCrs.Grps.NumGrps)
{
/***** Allocate memory for the list of group codes *****/

View File

@ -120,8 +120,9 @@ typedef enum
void Grp_WriteNamesOfSelectedGrps (void);
void Grp_ReqEditGroups (void);
void Grp_PutParamsCodGrps (void);
void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction);
void Grp_PutParamsCodGrps (void);
void Grp_GetParCodsSeveralGrpsToShowUsrs (void);
void Grp_GetParCodsSeveralGrpsToEditAsgAttOrSvy (void);
void Grp_FreeListCodSelectedGrps (void);

View File

@ -837,27 +837,29 @@ void Mai_ListEmails (void)
unsigned int LengthStrAddr = 0;
struct UsrData UsrDat;
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActMaiStd);
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order list of students in this course *****/
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
/***** Start of the frame used to list the emails *****/
Lay_StartRoundFrame (NULL,
Txt_Students_who_have_accepted_and_who_have_email,
NULL,NULL);
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActMaiStd);
if (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs)
{
if (Usr_GetIfShowBigList (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs,NULL))
{
/***** Start of the frame used to list the emails *****/
Lay_StartRoundFrameTable (NULL,
Txt_Students_who_have_accepted_and_who_have_email,
NULL,NULL,0);
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT_SMALL LEFT_MIDDLE\">");
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
/***** List the students' email addresses *****/
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL LEFT_MIDDLE\">");
for (NumUsr = 0;
NumUsr < Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
NumUsr++)
@ -895,36 +897,28 @@ void Mai_ListEmails (void)
}
}
}
fprintf (Gbl.F.Out,"</td>"
"</tr>");
fprintf (Gbl.F.Out,"</div>");
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
/***** Show a message with the number of students with email ****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,"<div class=\"DAT CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,Txt_X_students_who_have_email,
NumStdsWithEmail,
((float) NumStdsWithEmail /
(float) Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs) * 100.0,
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
fprintf (Gbl.F.Out,"</div>");
/***** Show a message with the number of students who have accepted and have email ****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,"<div class=\"DAT CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,Txt_X_students_who_have_accepted_and_who_have_email,
NumAcceptedStdsWithEmail,
((float) NumAcceptedStdsWithEmail /
(float) Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs) * 100.0,
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** End of the frame used to list the emails *****/
Lay_EndRoundFrameTable ();
fprintf (Gbl.F.Out,"</div>");
/***** Icon to open the client email program *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"
@ -946,6 +940,9 @@ void Mai_ListEmails (void)
else
Usr_ShowWarningNoUsersFound (Rol_STUDENT);
/***** End of the frame used to list the emails *****/
Lay_EndRoundFrame ();
/***** Free memory for students list *****/
Usr_FreeUsrsList (Rol_STUDENT);

View File

@ -173,9 +173,7 @@ static void Msg_PutFormMsgUsrs (char *Content)
char YN[1+1];
unsigned NumUsrsInCrs;
bool ShowUsrsInCrs = false;
bool GetUsrsInCrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients
(Gbl.Usrs.Me.IBelongToCurrentCrs || // If there is a course selected and I belong to it
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
bool GetUsrsInCrs;
Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs =
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs = 0;
@ -199,6 +197,27 @@ static void Msg_PutFormMsgUsrs (char *Content)
else
Gbl.Msg.ShowOnlyOneRecipient = false;
GetUsrsInCrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients
(Gbl.Usrs.Me.IBelongToCurrentCrs || // If there is a course selected and I belong to it
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
if (GetUsrsInCrs)
{
/***** Get and update type of list,
number of columns in class photo
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
NumUsrsInCrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
}
/***** Start frame *****/
Lay_StartRoundFrame (NULL,
Gbl.Msg.Reply.IsReply ? Txt_Reply_message :
@ -213,19 +232,9 @@ static void Msg_PutFormMsgUsrs (char *Content)
/***** Get list of users belonging to the current course *****/
if (GetUsrsInCrs)
{
/***** Get and update type of list,
number of columns in class photo
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqMsgUsr);
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
NumUsrsInCrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
if (NumUsrsInCrs)
{
/***** Form to select type of list used for select several users *****/

View File

@ -419,13 +419,8 @@ void Sta_AskShowCrsHits (void)
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Start frame *****/
sprintf (Gbl.Title,Txt_Statistics_of_visits_to_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName);
Lay_StartRoundFrame (NULL,Gbl.Title,NULL,NULL);
/***** Show form to select the grupos *****/
Grp_ShowFormToSelectSeveralGroups (ActReqAccCrs);
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order the lists of users of this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
@ -433,6 +428,14 @@ void Sta_AskShowCrsHits (void)
NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
/***** Start frame *****/
sprintf (Gbl.Title,Txt_Statistics_of_visits_to_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName);
Lay_StartRoundFrame (NULL,Gbl.Title,NULL,NULL);
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqAccCrs);
if (NumTotalUsrs)
{
if (Usr_GetIfShowBigList (NumTotalUsrs,NULL))

View File

@ -6879,8 +6879,8 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqSeeUsrTstRes);
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
@ -6888,13 +6888,16 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Test_results,NULL,NULL);
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqSeeUsrTstRes);
if (NumTotalUsrs)
{
if (Usr_GetIfShowBigList (NumTotalUsrs,NULL))
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Test_results,NULL,NULL);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqSeeUsrTstRes);
@ -6929,14 +6932,14 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
}
else
Usr_ShowWarningNoUsersFound (Rol_UNKNOWN);
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free memory for users' list *****/
Usr_FreeUsrsList (Rol_TEACHER);
Usr_FreeUsrsList (Rol_STUDENT);

View File

@ -5810,16 +5810,14 @@ void Usr_ListAllDataStds (void)
and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Get list of groups types and groups in current course *****/
Grp_GetListGrpTypesInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Get groups to show *****/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get scope *****/
Sco_SetScopesForListingStudents ();
Sco_GetScope ("ScopeUsr");
/***** Get groups to show *****/
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/****** Get and order list of students in current course ******/
Usr_GetListUsrs (Rol_STUDENT,Gbl.Scope.Current);
@ -6889,6 +6887,13 @@ void Usr_SeeStudents (void)
Gbl.Usrs.Me.LoggedRole == Rol_DEG_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM));
/***** Get groups to show ******/
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order list of students *****/
Usr_GetListUsrs (Rol_STUDENT,Gbl.Scope.Current);
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN],
Usr_PutIconsListStds,Hlp_USERS_Students);
@ -6897,9 +6902,6 @@ void Usr_SeeStudents (void)
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
Grp_ShowFormToSelectSeveralGroups (ActLstStd);
/***** Get and order list of students *****/
Usr_GetListUsrs (Rol_STUDENT,Gbl.Scope.Current);
if (Usr_GetIfShowBigList (Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs,NULL))
{
/***** Get list of selected users *****/