Version 15.5

This commit is contained in:
Antonio Cañas Vargas 2015-10-02 01:04:28 +02:00
parent 59818a13ff
commit 85a0b50430
12 changed files with 324 additions and 262 deletions

View File

@ -417,7 +417,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
/****** Contextual links with small icons and text to go to some action ******/
.CONTEXT_MENU
{
margin-bottom:12px;
margin:6px 0 8px 0;
text-align:center;
}
.CONTEXT_OPT
@ -772,7 +772,7 @@ a:hover img.CENTRE_PHOTO_SHOW
list-style-type:none;
border:0;
margin:0 auto;
padding:0 0 10px 0;
padding:0 0 4px 0;
}
#horizontal_menu_container li
{
@ -995,7 +995,7 @@ a:hover img.CENTRE_PHOTO_SHOW
.MSJ_AVISO {color:#632921; font-size:12pt;}
.TIT_TBL {color:#4D88A1; font-size:12pt; font-weight:bold;}
.TIT_CLASSPHOTO {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#606060; font-size:13pt;}
.CLASSPHOTO {color:#606060; font-size:10pt; line-height:100%; white-space:nowrap;}
.CLASSPHOTO {color:#606060; font-size:10pt; line-height:110%; white-space:nowrap;}
.GRP_TITLE {color:#4D88A1; font-size:15pt; font-weight:bold;}

View File

@ -382,7 +382,7 @@ form {margin:0; display:inline;}
/****** Contextual links with small icons and text to go to some action ******/
.CONTEXT_MENU
{
margin-bottom:12px;
margin:6px 0 8px 0;
text-align:center;
}
.CONTEXT_OPT
@ -798,7 +798,7 @@ a:hover img.CENTRE_PHOTO_SHOW
.MSJ_AVISO {color:#632921; font-size:15pt;}
.TIT_TBL {color:#4D88A1; font-size:18pt; font-weight:bold;}
.TIT_CLASSPHOTO {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#606060; font-size:13pt;}
.CLASSPHOTO {color:#606060; font-size:13pt; line-height:100%; white-space:nowrap;}
.CLASSPHOTO {color:#606060; font-size:13pt; line-height:110%; white-space:nowrap;}
.GRP_TITLE {color:#4D88A1; font-size:20pt; font-weight:bold;}

View File

@ -2597,9 +2597,6 @@ void Usr_ReqListAttendanceStdsCrs (void)
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqLstAttStd);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqLstAttStd);
/***** Get and order lists of users from current course *****/
Usr_GetUsrsLst (Rol_STUDENT,Sco_SCOPE_CRS,NULL,false);
@ -2611,22 +2608,30 @@ void Usr_ReqListAttendanceStdsCrs (void)
Usr_GetListsSelectedUsrs ();
/***** Draw a class photo with students of the course *****/
/* Start frame */
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
/* Form to select type of list used for select several users */
Usr_ShowFormsToSelectUsrListType (ActReqLstAttStd);
/* Start form */
Act_FormStart (ActSeeLstAttStd);
Grp_PutParamsCodGrps ();
/* Start frame */
Lay_StartRoundFrameTable (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
/* Write list of students to select some of them */
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
Usr_ListUsersToSelect (Rol_STUDENT);
fprintf (Gbl.F.Out,"</table>");
/* Send button and end frame */
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_list);
/* Send button */
Lay_PutConfirmButton (Txt_Show_list);
/* End form */
Act_FormEnd ();
/* End frame */
Lay_EndRoundFrame ();
/***** Free memory used for by the list of users *****/
Usr_FreeListsSelectedUsrCods ();
}

View File

@ -98,12 +98,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.4.2 (2015/10/01)"
#define Log_PLATFORM_VERSION "SWAD 15.5 (2015/10/01)"
// 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.4.2: Oct 31, 2015 Institution admins can edit holidays. (184863 lines)
Version 15.5: Oct 01, 2015 Changes in layout of selectors classphoto/list. (184909 lines)
Version 15.4.2: Oct 01, 2015 Institution admins can edit holidays. (184863 lines)
Version 15.4.1: Sep 30, 2015 Code refactoring in global/course statistics. (184861 lines)
Version 15.4: Sep 30, 2015 Changes in global/course statistics forms. (184877 lines)
Version 15.3.3: Sep 30, 2015 Changes in layout of form to selected initial and final dates. (185152 lines)

View File

@ -2848,9 +2848,6 @@ void Brw_AskEditWorksCrs (void)
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqAsgWrkCrs);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqAsgWrkCrs);
/***** Get and order lists of users from this course *****/
Usr_GetUsrsLst (Rol_TEACHER,Sco_SCOPE_CRS,NULL,false);
Usr_GetUsrsLst (Rol_STUDENT,Sco_SCOPE_CRS,NULL,false);
@ -2862,19 +2859,30 @@ void Brw_AskEditWorksCrs (void)
Gbl.Usrs.LstStds.NumUsrs))
{
/***** Draw class photos to select users *****/
Lay_StartRoundFrame (NULL,Txt_Users);
/* Form to select type of list used for select several users */
Usr_ShowFormsToSelectUsrListType (ActReqAsgWrkCrs);
/* Start form */
Act_FormStart (ActAdmAsgWrkCrs);
Grp_PutParamsCodGrps ();
Par_PutHiddenParamChar ("FullTree",'Y'); // By default, show all files
/* Put list of users to select some of them */
Lay_StartRoundFrameTable (NULL,0,Txt_Users);
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
Usr_ListUsersToSelect (Rol_TEACHER);
Usr_ListUsersToSelect (Rol_STUDENT);
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_View_works);
fprintf (Gbl.F.Out,"</table>");
/* Send button */
Lay_PutConfirmButton (Txt_View_works);
/* End form */
Act_FormEnd ();
/* End frame */
Lay_EndRoundFrame ();
}
}
else

View File

@ -288,9 +288,6 @@ static void Msg_PutFormMsgUsrs (const char *Content)
/***** Form to select groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqMsgUsr);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqMsgUsr);
/***** Get and order lists of users from this course *****/
Usr_GetUsrsLst (Rol_TEACHER,Sco_SCOPE_CRS,NULL,false);
Usr_GetUsrsLst (Rol_STUDENT,Sco_SCOPE_CRS,NULL,false);
@ -304,6 +301,14 @@ static void Msg_PutFormMsgUsrs (const char *Content)
if (Usr_GetIfShowBigList (Gbl.Usrs.LstTchs.NumUsrs +
Gbl.Usrs.LstStds.NumUsrs))
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_New_message);
/***** Form to select type of list used for select several users *****/
if (Gbl.Usrs.LstTchs.NumUsrs ||
Gbl.Usrs.LstStds.NumUsrs)
Usr_ShowFormsToSelectUsrListType (ActReqMsgUsr);
/***** Start form to select recipients and write the message *****/
Act_FormStart (ActRcvMsgUsr);
if (Gbl.Msg.IsReply)
@ -313,11 +318,9 @@ static void Msg_PutFormMsgUsrs (const char *Content)
Usr_PutParamOtherUsrCodEncrypted ();
}
/***** Start frame *****/
Lay_StartRoundFrameTable (NULL,2,Txt_New_message);
/***** Draw lists of users with the recipients *****/
fprintf (Gbl.F.Out,"<tr>"
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
"<tr>"
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
@ -347,13 +350,17 @@ static void Msg_PutFormMsgUsrs (const char *Content)
"<td colspan=\"2\">");
Lay_HelpPlainEditor ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
"</tr>"
"</table>");
/***** End frame *****/
Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Send_message);
/***** Send button *****/
Lay_PutCreateButton (Txt_Send_message);
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
/***** Free memory used by the list of nicknames *****/

View File

@ -1505,9 +1505,6 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
fprintf (Gbl.F.Out,"</table>");
/***** Form to select type of list used to display degree photos *****/
Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg);
/***** Link to print view *****/
Pho_PutLinkToPrintViewOfDegreeStats ();
@ -1886,73 +1883,89 @@ static void Pho_GetMaxStdsPerDegree (void)
static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{
extern const char *Txt_Degrees;
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
char Query[512];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned long NumRow,NumRows;
unsigned long NumRow;
unsigned long NumRows;
struct Degree Deg;
unsigned NumDegsNotEmpty;
int NumStds,NumStdsWithPhoto;
int NumStds;
int NumStdsWithPhoto;
struct Date DateAvgPhoto;
bool TRIsOpen = false;
/***** Start frame *****/
Lay_StartRoundFrameTable (NULL,0,Txt_Degrees);
/***** Get degrees from database *****/
Pho_BuildQueryOfDegrees (Query);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees");
/***** Get degrees *****/
for (NumRow = 0, NumDegsNotEmpty = 0;
NumRow < NumRows;
NumRow++)
if (NumRows) // Degrees with students found
{
/***** Get next degree *****/
row = mysql_fetch_row (mysql_res);
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Degrees);
/* Get degree code (row[0]) */
if ((Deg.DegCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of degree.");
/***** Form to select type of list used to display degree photos *****/
if (SeeOrPrint == Pho_DEGREES_SEE)
Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg);
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
/* Get data of degree */
Deg_GetDataOfDegreeByCod (&Deg);
/***** Get and print degrees *****/
for (NumRow = 0, NumDegsNotEmpty = 0;
NumRow < NumRows;
NumRow++)
{
/***** Get next degree *****/
row = mysql_fetch_row (mysql_res);
/* Get number of students and number of students with photo in this degree */
Pho_GetNumStdsInDegree (Deg.DegCod,Usr_SEX_ALL,&NumStds,&NumStdsWithPhoto);
/* Get degree code (row[0]) */
if ((Deg.DegCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of degree.");
if (NumStds > 0)
{
/* Get year, month and day (row[1] holds the date in YYYYMMDD format) */
if (!(Dat_GetDateFromYYYYMMDD (&DateAvgPhoto,row[1])))
Lay_ShowErrorAndExit ("Wrong date.");
/* Get data of degree */
Deg_GetDataOfDegreeByCod (&Deg);
if ((NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0)
{
fprintf (Gbl.F.Out,"<tr>");
TRIsOpen = true;
}
/* Get number of students and number of students with photo in this degree */
Pho_GetNumStdsInDegree (Deg.DegCod,Usr_SEX_ALL,&NumStds,&NumStdsWithPhoto);
/***** Show average photo of students belonging to this degree *****/
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_MIDDLE\">");
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Usr_SEX_ALL,NumStds,NumStdsWithPhoto,&DateAvgPhoto);
fprintf (Gbl.F.Out,"</td>");
if (NumStds > 0)
{
/* Get year, month and day (row[1] holds the date in YYYYMMDD format) */
if (!(Dat_GetDateFromYYYYMMDD (&DateAvgPhoto,row[1])))
Lay_ShowErrorAndExit ("Wrong date.");
if ((++NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0)
{
fprintf (Gbl.F.Out,"</tr>");
TRIsOpen = false;
}
}
if ((NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0)
{
fprintf (Gbl.F.Out,"<tr>");
TRIsOpen = true;
}
/***** Show average photo of students belonging to this degree *****/
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_MIDDLE\">");
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Usr_SEX_ALL,NumStds,NumStdsWithPhoto,&DateAvgPhoto);
fprintf (Gbl.F.Out,"</td>");
if ((++NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0)
{
fprintf (Gbl.F.Out,"</tr>");
TRIsOpen = false;
}
}
}
if (TRIsOpen)
fprintf (Gbl.F.Out,"</tr>");
fprintf (Gbl.F.Out,"</table>");
/***** End frame *****/
Lay_EndRoundFrame ();
}
if (TRIsOpen)
fprintf (Gbl.F.Out,"</tr>");
else // No degrees with students found
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End frame *****/
Lay_EndRoundFrameTable ();
}
/*****************************************************************************/
@ -1961,113 +1974,126 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{
extern const char *Txt_Degrees;
extern const char *Txt_No_INDEX;
extern const char *Txt_Degree;
extern const char *Txt_SEX_PLURAL_Abc[Usr_NUM_SEXS];
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
char Query[512];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned long NumRow,NumRows;
unsigned long NumRow;
unsigned long NumRows;
unsigned NumDegsNotEmpty;
int NumStds,NumStdsWithPhoto;
int NumStds;
int NumStdsWithPhoto;
struct Date DateAvgPhoto;
struct Degree Deg;
Usr_Sex_t Sex;
/***** Class photo start *****/
if (SeeOrPrint == Pho_DEGREES_SEE)
Lay_StartRoundFrameTable (NULL,0,NULL);
else
fprintf (Gbl.F.Out,"<table>");
/***** Write heading *****/
fprintf (Gbl.F.Out,"<tr>"
"<th class=\"RIGHT_TOP\">"
"%s"
"</th>"
"<th class=\"CENTER_TOP\">"
"%s"
"</th>",
Txt_No_INDEX,
Txt_Degree);
for (Sex = (Usr_Sex_t) 0;
Sex < Usr_NUM_SEXS;
Sex++)
fprintf (Gbl.F.Out,"<th class=\"CENTER_TOP\">"
"%s"
"</th>",
Txt_SEX_PLURAL_Abc[Sex]);
fprintf (Gbl.F.Out,"</tr>");
/***** Get degrees from database *****/
Pho_BuildQueryOfDegrees (Query);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees");
/***** Get degrees *****/
for (NumRow = 0, Gbl.RowEvenOdd = 0, NumDegsNotEmpty = 0;
NumRow < NumRows;
NumRow++, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
if (NumRows) // Degrees with students found
{
/***** Get next degree *****/
row = mysql_fetch_row (mysql_res);
/* Get degree code (row[0]) */
if ((Deg.DegCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of degree.");
/* Get year, month and day (row[1] holds the date in YYYYMMDD format) */
if (!(Dat_GetDateFromYYYYMMDD (&DateAvgPhoto,row[1])))
Lay_ShowErrorAndExit ("Wrong date.");
/* Get data of degree */
Deg_GetDataOfDegreeByCod (&Deg);
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>",
Gbl.RowEvenOdd,++NumDegsNotEmpty);
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">",
Gbl.RowEvenOdd);
/***** Class photo start *****/
if (SeeOrPrint == Pho_DEGREES_SEE)
fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
Deg.WWW,Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName,
16,"CENTER_TOP",true);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;",
Deg.ShortName);
if (SeeOrPrint == Pho_DEGREES_SEE)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</td>");
{
Lay_StartRoundFrame (NULL,Txt_Degrees);
/***** Form to select type of list used to display degree photos *****/
Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg);
}
/***** Write heading *****/
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
" style=\"margin:0 auto;\">"
"<tr>"
"<th class=\"RIGHT_TOP\">"
"%s"
"</th>"
"<th class=\"CENTER_TOP\">"
"%s"
"</th>",
Txt_No_INDEX,
Txt_Degree);
for (Sex = (Usr_Sex_t) 0;
Sex < Usr_NUM_SEXS;
Sex++)
{
/***** Show average photo of students belonging to this degree *****/
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.Usrs.Listing.WithPhotos)
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto,&DateAvgPhoto);
else
Pho_ShowDegreeStat (NumStds,NumStdsWithPhoto);
fprintf (Gbl.F.Out,"</td>");
}
fprintf (Gbl.F.Out,"<th class=\"CENTER_TOP\">"
"%s"
"</th>",
Txt_SEX_PLURAL_Abc[Sex]);
fprintf (Gbl.F.Out,"</tr>");
/***** Get degrees *****/
for (NumRow = 0, Gbl.RowEvenOdd = 0, NumDegsNotEmpty = 0;
NumRow < NumRows;
NumRow++, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
{
/***** Get next degree *****/
row = mysql_fetch_row (mysql_res);
/* Get degree code (row[0]) */
if ((Deg.DegCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of degree.");
/* Get year, month and day (row[1] holds the date in YYYYMMDD format) */
if (!(Dat_GetDateFromYYYYMMDD (&DateAvgPhoto,row[1])))
Lay_ShowErrorAndExit ("Wrong date.");
/* Get data of degree */
Deg_GetDataOfDegreeByCod (&Deg);
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>",
Gbl.RowEvenOdd,++NumDegsNotEmpty);
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">",
Gbl.RowEvenOdd);
if (SeeOrPrint == Pho_DEGREES_SEE)
fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
Deg.WWW,Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName,
16,"CENTER_TOP",true);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;",
Deg.ShortName);
if (SeeOrPrint == Pho_DEGREES_SEE)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</td>");
for (Sex = (Usr_Sex_t) 0;
Sex < Usr_NUM_SEXS;
Sex++)
{
/***** Show average photo of students belonging to this degree *****/
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.Usrs.Listing.WithPhotos)
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto,&DateAvgPhoto);
else
Pho_ShowDegreeStat (NumStds,NumStdsWithPhoto);
fprintf (Gbl.F.Out,"</td>");
}
fprintf (Gbl.F.Out,"</tr>");
}
/***** Photos end *****/
fprintf (Gbl.F.Out,"</table>");
if (SeeOrPrint == Pho_DEGREES_SEE)
Lay_EndRoundFrame ();
}
else // No degrees with students found!
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Photos end *****/
if (SeeOrPrint == Pho_DEGREES_SEE)
Lay_EndRoundFrameTable ();
else
fprintf (Gbl.F.Out,"</table>");
}
/*****************************************************************************/
@ -2081,25 +2107,33 @@ static void Pho_BuildQueryOfDegrees (char *Query)
case Pho_NUMBER_OF_STUDENTS:
sprintf (Query,"SELECT degrees.DegCod,DATE_FORMAT(sta_degrees.TimeAvgPhoto,'%%Y%%m%%d')"
" FROM degrees,sta_degrees"
" WHERE sta_degrees.Sex='all' AND sta_degrees.NumStds>'0' AND degrees.DegCod=sta_degrees.DegCod"
" WHERE sta_degrees.Sex='all'"
" AND sta_degrees.NumStds>'0'"
" AND degrees.DegCod=sta_degrees.DegCod"
" ORDER BY sta_degrees.NumStds DESC,sta_degrees.NumStdsWithPhoto DESC,degrees.ShortName");
break;
case Pho_NUMBER_OF_PHOTOS:
sprintf (Query,"SELECT degrees.DegCod,DATE_FORMAT(sta_degrees.TimeAvgPhoto,'%%Y%%m%%d')"
" FROM degrees,sta_degrees"
" WHERE sta_degrees.Sex='all' AND sta_degrees.NumStds>'0' AND degrees.DegCod=sta_degrees.DegCod"
" WHERE sta_degrees.Sex='all'"
" AND sta_degrees.NumStds>'0'"
" AND degrees.DegCod=sta_degrees.DegCod"
" ORDER BY sta_degrees.NumStdsWithPhoto DESC,sta_degrees.NumStds DESC,degrees.ShortName");
break;
case Pho_PERCENT:
sprintf (Query,"SELECT degrees.DegCod,DATE_FORMAT(sta_degrees.TimeAvgPhoto,'%%Y%%m%%d')"
" FROM degrees,sta_degrees"
" WHERE sta_degrees.Sex='all' AND sta_degrees.NumStds>'0' AND degrees.DegCod=sta_degrees.DegCod"
" WHERE sta_degrees.Sex='all'"
" AND sta_degrees.NumStds>'0'"
" AND degrees.DegCod=sta_degrees.DegCod"
" ORDER BY sta_degrees.NumStdsWithPhoto/sta_degrees.NumStds DESC,degrees.ShortName");
break;
case Pho_DEGREE_NAME:
sprintf (Query,"SELECT degrees.DegCod,DATE_FORMAT(sta_degrees.TimeAvgPhoto,'%%Y%%m%%d')"
" FROM degrees,sta_degrees"
" WHERE sta_degrees.Sex='all' AND sta_degrees.NumStds>'0' AND degrees.DegCod=sta_degrees.DegCod"
" WHERE sta_degrees.Sex='all'"
" AND sta_degrees.NumStds>'0'"
" AND degrees.DegCod=sta_degrees.DegCod"
" ORDER BY degrees.ShortName");
break;
}

View File

@ -419,9 +419,6 @@ void Sta_AskSeeCrsAccesses (void)
/***** Show form to select the grupos *****/
Grp_ShowFormToSelectSeveralGroups (ActReqAccCrs);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqAccCrs);
/***** Get and order the lists of users of this course *****/
Usr_GetUsrsLst (Rol_TEACHER,Sco_SCOPE_CRS,NULL,false);
Usr_GetUsrsLst (Rol_STUDENT,Sco_SCOPE_CRS,NULL,false);
@ -435,18 +432,24 @@ void Sta_AskSeeCrsAccesses (void)
/***** Get lists of selected users *****/
Usr_GetListsSelectedUsrs ();
/***** Start frame *****/
sprintf (Gbl.Title,Txt_Statistics_of_visits_to_the_course_X,
Gbl.CurrentCrs.Crs.ShortName);
Lay_StartRoundFrame (NULL,Gbl.Title);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqAccCrs);
/***** Start form *****/
Act_FormStart (ActSeeAccCrs);
Grp_PutParamsCodGrps ();
Par_PutHiddenParamLong ("FirstRow",0);
Par_PutHiddenParamLong ("LastRow",0);
/***** Start frame *****/
sprintf (Gbl.Title,Txt_Statistics_of_visits_to_the_course_X,
Gbl.CurrentCrs.Crs.ShortName);
Lay_StartRoundFrameTable (NULL,2,Gbl.Title);
/***** Put list of users to select some of them *****/
fprintf (Gbl.F.Out,"<tr>"
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
" style=\"margin:0 auto;\">"
"<tr>"
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
@ -530,14 +533,18 @@ void Sta_AskSeeCrsAccesses (void)
}
fprintf (Gbl.F.Out,"</select>)"
"</td>"
"</tr>");
"</tr>"
"</table>");
/***** End frame *****/
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_visits);
/***** Send button *****/
Lay_PutConfirmButton (Txt_Show_visits);
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
/* Free the memory used by the list of users */
Usr_FreeListsSelectedUsrCods ();
}

View File

@ -5897,9 +5897,6 @@ void Tst_SelUsrsToSeeUsrsTstExams (void)
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (ActReqSeeUsrTstExa);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqSeeUsrTstExa);
/***** Get and order lists of users from this course *****/
Usr_GetUsrsLst (Rol_TEACHER,Sco_SCOPE_CRS,NULL,false);
Usr_GetUsrsLst (Rol_STUDENT,Sco_SCOPE_CRS,NULL,false);
@ -5910,31 +5907,35 @@ void Tst_SelUsrsToSeeUsrsTstExams (void)
if (Usr_GetIfShowBigList (Gbl.Usrs.LstTchs.NumUsrs +
Gbl.Usrs.LstStds.NumUsrs))
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Users);
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (ActReqSeeUsrTstExa);
/***** Start form *****/
Act_FormStart (ActSeeUsrTstExa);
Grp_PutParamsCodGrps ();
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<table style=\"margin:0 auto; border-spacing:5px;\">"
"<tr>"
"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
/***** Put list of users to select some of them *****/
Lay_StartRoundFrameTable (NULL,0,Txt_Users);
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
Usr_ListUsersToSelect (Rol_TEACHER);
Usr_ListUsersToSelect (Rol_STUDENT);
Lay_EndRoundFrameTable ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
fprintf (Gbl.F.Out,"</table>");
/***** Starting and ending dates in the search *****/
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
Dat_WriteFormIniEndDates ();
fprintf (Gbl.F.Out,"</table>");
/***** Button to send the form *****/
fprintf (Gbl.F.Out,"</table>"
"</div>");
Lay_PutConfirmButton (Txt_See_exams);
/***** Send button *****/
Lay_PutConfirmButton (Txt_See_exams);
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
}
else

View File

@ -15640,27 +15640,6 @@ const char *Txt_List_of_nicks_emails_or_IDs =
"Lista de @alcunhas, e-mails ou n&ordm;s. identif.";
#endif
const char *Txt_List_type =
#if L==0
"Tipus de llista";
#elif L==1
"Listentyp";
#elif L==2
"List type";
#elif L==3
"Tipo de lista";
#elif L==4
"Type de liste";
#elif L==5
"Tipo de lista"; // Okoteve traducción
#elif L==6
"Tipo di lista";
#elif L==7
"Typ listy";
#elif L==8
"Tipo de lista";
#endif
const char *Txt_Links =
#if L==0
"Enlla&ccedil;os";

View File

@ -146,6 +146,7 @@ static void Usr_FormToSelectUsrListType (Act_Action_t NextAction,Usr_ShowUsrsTyp
static Usr_Sex_t Usr_GetSexOfUsrsLst (struct ListUsers *LstUsrs);
static void Usr_PutCheckboxToSelectUser (struct UsrData *UsrDat,bool UsrIsTheMsgSender);
static void Usr_PutCheckboxListWithPhotos (void);
static void Usr_SetUsrDatMainFieldNames (void);
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr);
@ -4758,13 +4759,9 @@ void Usr_FreeListOtherRecipients (void)
void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
{
extern const char *Txt_List_type;
/***** Start table *****/
Lay_StartRoundFrameTable (NULL,8,Txt_List_type);
/***** Select USR_CLASS_ROOM *****/
fprintf (Gbl.F.Out,"<tr>"
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_4\" style=\"margin:4px auto;\">"
"<tr>"
"<td class=\"%s LEFT_MIDDLE\">",
Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO ? "USR_LIST_TYPE_ON" :
"USR_LIST_TYPE_OFF");
@ -4794,10 +4791,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
Usr_PutCheckboxListWithPhotos ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** End of table *****/
Lay_EndRoundFrameTable ();
"</tr>"
"</table>");
}
/*****************************************************************************/
@ -5007,7 +5002,7 @@ static void Usr_PutCheckboxToSelectUser (struct UsrData *UsrDat,bool UsrIsTheMsg
/********* Put a checkbox to select whether list users with photos ***********/
/*****************************************************************************/
void Usr_PutCheckboxListWithPhotos (void)
static void Usr_PutCheckboxListWithPhotos (void)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Display_photos;
@ -5943,23 +5938,25 @@ void Usr_ListDataAdms (void)
if (Gbl.Usrs.LstAdms.NumUsrs)
{
/****** See the photos? *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
/***** Initialize number of columns *****/
NumColumns = Usr_NUM_MAIN_FIELDS_DATA_ADM;
/***** Start table with list of administrators *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN]);
/****** Show photos? *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"margin-bottom:8px;\">");
Act_FormStart (ActLstOth);
Sco_PutParamScope (Gbl.Scope.Current);
Usr_PutCheckboxListWithPhotos ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
/***** Initialize number of columns *****/
NumColumns = Usr_NUM_MAIN_FIELDS_DATA_ADM;
/***** Start table with list of administrators *****/
Lay_StartRoundFrameTable (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN]);
/***** Heading row with column names *****/
/* Start row */
fprintf (Gbl.F.Out,"<tr>");
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
"<tr>");
for (NumCol = 0;
NumCol < NumColumns;
NumCol++)
@ -5991,7 +5988,8 @@ void Usr_ListDataAdms (void)
Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/
Lay_EndRoundFrameTable ();
fprintf (Gbl.F.Out,"</table>");
Lay_EndRoundFrame ();
}
else // Gbl.Usrs.LstAdms.NumUsrs == 0
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_DEG_ADM]);
@ -6412,9 +6410,6 @@ void Usr_SeeGuests (void)
break;
}
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstGst);
/***** Get and order list of students in current scope *****/
Usr_GetGstsLst (Gbl.Scope.Current);
@ -6441,13 +6436,19 @@ void Usr_SeeGuests (void)
}
fprintf (Gbl.F.Out,"</div>");
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN]);
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstGst);
/***** Draw a class photo with students of the course *****/
/* Start form */
Act_FormStart (ActSeeRecSevGst);
Grp_PutParamsCodGrps ();
/* Header */
Lay_StartRoundFrameTable (NULL,0,Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN]);
/* Start table */
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO)
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true,
@ -6472,11 +6473,17 @@ void Usr_SeeGuests (void)
break;
}
/* Send button and end frame */
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_records);
/* End table */
fprintf (Gbl.F.Out,"</table>");
/* Send button */
Lay_PutConfirmButton (Txt_Show_records);
/* End form */
Act_FormEnd ();
/* End frame */
Lay_EndRoundFrame ();
}
}
else
@ -6588,9 +6595,6 @@ void Usr_SeeStudents (void)
if (Gbl.Scope.Current == Sco_SCOPE_CRS)
Grp_ShowFormToSelectSeveralGroups (ActLstStd);
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstStd);
/***** Get and order list of students *****/
Usr_GetUsrsLst (Rol_STUDENT,Gbl.Scope.Current,NULL,false);
@ -6622,6 +6626,12 @@ void Usr_SeeStudents (void)
break;
}
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstStd);
/***** Draw a class photo with students of the course *****/
/* Start form */
if (ICanViewRecords)
@ -6630,8 +6640,8 @@ void Usr_SeeStudents (void)
Grp_PutParamsCodGrps ();
}
/* Header */
Lay_StartRoundFrameTable (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
/* Start table */
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO)
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true,
@ -6663,14 +6673,20 @@ void Usr_SeeStudents (void)
break;
}
/* Send button and end frame */
/* End table */
fprintf (Gbl.F.Out,"</table>");
if (ICanViewRecords)
{
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_records);
Act_FormEnd ();
/* Send button */
Lay_PutConfirmButton (Txt_Show_records);
/* End form */
Act_FormEnd ();
}
else
Lay_EndRoundFrameTable ();
/* End frame */
Lay_EndRoundFrame ();
}
}
else
@ -6742,9 +6758,6 @@ void Usr_SeeTeachers (void)
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstTch);
/***** Get and order list of teachers *****/
Usr_GetUsrsLst (Rol_TEACHER,Gbl.Scope.Current,NULL,false);
@ -6773,15 +6786,19 @@ void Usr_SeeTeachers (void)
break;
}
/***** Draw a class photo with teachers of the course *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN]);
/***** Form to select type of list of users *****/
Usr_ShowFormsToSelectUsrListType (ActLstTch);
/***** Draw a class photo with teachers of the course *****/
/* Start form */
if (ICanViewRecords)
Act_FormStart (ActSeeRecSevTch);
/* Header */
Lay_StartRoundFrameTable (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN]);
/* Start table */
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO)
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true,
@ -6813,16 +6830,20 @@ void Usr_SeeTeachers (void)
break;
}
/* Send button and end frame */
/* End table */
fprintf (Gbl.F.Out,"</table>");
if (ICanViewRecords)
{
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_records);
Act_FormEnd ();
}
else
Lay_EndRoundFrameTable ();
/* Send button */
Lay_PutConfirmButton (Txt_Show_records);
fprintf (Gbl.F.Out,"</div>");
/* End form */
Act_FormEnd ();
}
/* End frame */
Lay_EndRoundFrame ();
}
}
else

View File

@ -308,7 +308,6 @@ unsigned Usr_GetColumnsForSelectUsrs (void);
void Usr_PutExtraParamsUsrList (Act_Action_t NextAction);
void Usr_ListUsersToSelect (Rol_Role_t Role);
void Usr_PutCheckboxListWithPhotos (void);
void Usr_ListAllDataGsts (void);
void Usr_ListAllDataStds (void);
void Usr_ListUsrsForSelection (Rol_Role_t Role);