mirror of https://github.com/acanas/swad-core.git
Version 14.125.1
This commit is contained in:
parent
65718d4e7b
commit
ef7765e47e
|
@ -103,12 +103,13 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.125 (2015/09/03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.125.1 (2015/09/03)"
|
||||
|
||||
// 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 14.125: Sep 03, 2015 Changes in styles. (? lines)
|
||||
Version 14.125.1: Sep 03, 2015 Changes in styles. (184399 lines)
|
||||
Version 14.125: Sep 03, 2015 Changes in styles. (184521 lines)
|
||||
Version 14.124.10:Sep 02, 2015 Changes in styles. (184571 lines)
|
||||
Version 14.124.9: Sep 02, 2015 Changes in styles. (184584 lines)
|
||||
Version 14.124.8: Sep 02, 2015 Changes in styles. (184635 lines)
|
||||
|
|
152
swad_indicator.c
152
swad_indicator.c
|
@ -1021,254 +1021,224 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
|||
NumTchs = Usr_GetNumUsrsInCrs (Rol_TEACHER,CrsCod);
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"DAT_SMALL LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_SMALL LEFT_MIDDLE COLOR%u\">"
|
||||
"<a href=\"%s/?crs=%ld&act=%ld\" target=\"_blank\">"
|
||||
"%s/?crs=%ld&act=%ld"
|
||||
"</a>"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>"
|
||||
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
row[0],
|
||||
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
row[1],
|
||||
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
row[3],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Gbl.RowEvenOdd,Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
|
||||
NumTchs != 0 ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
NumTchs,
|
||||
NumStds != 0 ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
NumStds,
|
||||
|
||||
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
"DAT_SMALL_RED"),
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.CountIndicators,
|
||||
|
||||
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsSyllabus ? Txt_YES :
|
||||
"",
|
||||
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_RED",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsSyllabus ? "" :
|
||||
Txt_NO,
|
||||
(Indicators.SyllabusLecSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc],
|
||||
(Indicators.SyllabusPraSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc],
|
||||
(Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc],
|
||||
|
||||
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
|
||||
Indicators.ThereAreAssignments ? Txt_YES :
|
||||
"",
|
||||
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_RED",Gbl.RowEvenOdd,
|
||||
Indicators.ThereAreAssignments ? "" :
|
||||
Txt_NO,
|
||||
(Indicators.NumAssignments != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumAssignments,
|
||||
(Indicators.NumFilesAssignments != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumFilesAssignments,
|
||||
(Indicators.NumFilesWorks != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumFilesWorks,
|
||||
|
||||
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsOnlineTutoring ? Txt_YES :
|
||||
"",
|
||||
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_RED",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsOnlineTutoring ? "" :
|
||||
Txt_NO,
|
||||
(Indicators.NumThreads != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumThreads,
|
||||
(Indicators.NumPosts != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumPosts,
|
||||
(Indicators.NumMsgsSentByTchs != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumMsgsSentByTchs,
|
||||
|
||||
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
|
||||
Indicators.ThereAreMaterials ? Txt_YES :
|
||||
"",
|
||||
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_RED",Gbl.RowEvenOdd,
|
||||
Indicators.ThereAreMaterials ? "" :
|
||||
Txt_NO,
|
||||
(Indicators.NumFilesInDownloadZones != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumFilesInDownloadZones,
|
||||
(Indicators.NumFilesInCommonZones != 0) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Indicators.NumFilesInCommonZones,
|
||||
|
||||
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsAssessment ? Txt_YES :
|
||||
"",
|
||||
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"DAT_SMALL_RED",Gbl.RowEvenOdd,
|
||||
Indicators.ThereIsAssessment ? "" :
|
||||
Txt_NO,
|
||||
(Indicators.AssessmentSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc],
|
||||
(Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]);
|
||||
break;
|
||||
}
|
||||
|
|
26
swad_mark.c
26
swad_mark.c
|
@ -112,20 +112,19 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType,
|
|||
struct MarksProperties Marks;
|
||||
|
||||
if (FileType == Brw_IS_FOLDER)
|
||||
fprintf (Gbl.F.Out,"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>",
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd);
|
||||
else // File or link
|
||||
{
|
||||
/***** Get number of rows in header or footer *****/
|
||||
Mrk_GetNumRowsHeaderAndFooter (&Marks);
|
||||
|
||||
/***** Write the number of rows of header *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
The_ClassFormNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
if (Gbl.CurrentCrs.Grps.GrpCod > 0) // Group zone
|
||||
{
|
||||
|
@ -138,22 +137,21 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType,
|
|||
fprintf (Gbl.F.Out," %s: "
|
||||
"<input type=\"text\" name=\"%s\""
|
||||
" size=\"1\" maxlength=\"5\" value=\"%u\""
|
||||
" class=\"%s\" style=\"background-color:%s\""
|
||||
" class=\"%s COLOR%u\""
|
||||
" onchange=\"javascript:document.getElementById('%s').submit();\" />",
|
||||
Txt_TABLE_Header,
|
||||
Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header,
|
||||
Gbl.FileBrowser.InputStyle,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.FormId);
|
||||
Brw_ParamListFiles (FileType,PathInTree,FileName);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Write the number of rows of footer *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
The_ClassFormNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
if (Gbl.CurrentCrs.Grps.GrpCod > 0) // Group zone
|
||||
{
|
||||
|
@ -166,12 +164,12 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType,
|
|||
fprintf (Gbl.F.Out," %s: "
|
||||
"<input type=\"text\" name=\"%s\""
|
||||
" size=\"1\" maxlength=\"5\" value=\"%u\""
|
||||
" class=\"%s\" style=\"background-color:%s\""
|
||||
" class=\"%s COLOR%u\""
|
||||
" onchange=\"javascript:document.getElementById('%s').submit();\" />",
|
||||
Txt_TABLE_Footer,
|
||||
Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer,
|
||||
Gbl.FileBrowser.InputStyle,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.FormId);
|
||||
Brw_ParamListFiles (FileType,PathInTree,FileName);
|
||||
Act_FormEnd ();
|
||||
|
|
15
swad_photo.c
15
swad_photo.c
|
@ -1999,16 +1999,14 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
|
|||
|
||||
/***** Show logo and name of this degree *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],++NumDegsNotEmpty);
|
||||
Gbl.RowEvenOdd,++NumDegsNotEmpty);
|
||||
|
||||
/***** Show logo and name of this degree *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
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);
|
||||
|
@ -2026,9 +2024,8 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
|
|||
{
|
||||
/***** Show average photo of students belonging to this degree *****/
|
||||
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
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
|
||||
|
|
|
@ -1318,10 +1318,13 @@ void Prf_ShowRankingFigure (const char *Query)
|
|||
/***** Show row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"height:40px;"
|
||||
" background-color:%s;\">%ld</td>"
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE COLOR%u\""
|
||||
" style=\"height:40px;\">"
|
||||
"%ld"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],Figure);
|
||||
Gbl.RowEvenOdd,
|
||||
Figure);
|
||||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
|
@ -1460,9 +1463,9 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
/***** Show row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"height:40px;"
|
||||
" background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE COLOR%u\""
|
||||
" style=\"height:40px;\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Str_WriteFloatNum (NumClicksPerDay);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
@ -1489,15 +1492,15 @@ void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
|
|||
char PhotoURL[PATH_MAX+1];
|
||||
bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RANK RIGHT_MIDDLE\" style=\"height:40px;"
|
||||
" background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"RANK RIGHT_MIDDLE COLOR%u\""
|
||||
" style=\"height:40px;\">"
|
||||
"#%u"
|
||||
"</td>"
|
||||
"<td style=\"width:28px; height:40px;"
|
||||
" background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
"<td class=\"COLOR%u\""
|
||||
" style=\"width:28px; height:40px;\">",
|
||||
Gbl.RowEvenOdd,
|
||||
Rank,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/***** Check if I can see the public profile *****/
|
||||
if (Visible)
|
||||
|
@ -1510,8 +1513,8 @@ void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
|
|||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td style=\"height:40px; background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
"<td class=\"COLOR%u\" style=\"height:40px;\">",
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/***** Put form to go to public profile *****/
|
||||
if (Visible)
|
||||
|
|
|
@ -1567,12 +1567,12 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
|
|||
|
||||
/* Name of the field */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s LEFT_TOP\""
|
||||
" style=\"width:%upx; background-color:%s;\">"
|
||||
"<td class=\"%s LEFT_TOP COLOR%u\""
|
||||
" style=\"width:%upx;\">"
|
||||
"%s:",
|
||||
ICanEdit ? The_ClassForm[Gbl.Prefs.Theme] :
|
||||
"DAT_REC_SMALL",
|
||||
Col1Width,Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,Col1Width,
|
||||
Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Name);
|
||||
if (TypeOfView == Rec_RECORD_LIST)
|
||||
fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\"> (%s)</span>",
|
||||
|
@ -1589,9 +1589,9 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
|
|||
ThisFieldHasText = false;
|
||||
|
||||
/***** Write form, text, or nothing depending on the user's role and the visibility of the field... */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\" style=\"width:%upx;"
|
||||
" background-color:%s;\">",
|
||||
ClassData,Col2Width,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\""
|
||||
" style=\"width:%upx;\">",
|
||||
ClassData,Gbl.RowEvenOdd,Col2Width);
|
||||
if (ICanEdit) // Show with form
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<textarea name=\"Field%ld\" rows=\"%u\""
|
||||
|
|
|
@ -1613,39 +1613,34 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
|
||||
/* Write the number of row */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LOG RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"LOG RIGHT_TOP COLOR%u\">"
|
||||
"%ld "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumRow);
|
||||
Gbl.RowEvenOdd,NumRow);
|
||||
|
||||
/* Write the user's ID if user is a student */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (&UsrDat,(RoleFromLog == Rol_STUDENT));
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/* Write the first name and the surnames */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],UsrDat.FullName);
|
||||
Gbl.RowEvenOdd,UsrDat.FullName);
|
||||
|
||||
/* Write the user's role */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] :
|
||||
"?");
|
||||
|
||||
/* Write the date (in row[3] is the date in YYYYMMDDHHMMSS format) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Dat_WriteDate (row[3]);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
Dat_WriteHourMinute (&row[3][8]);
|
||||
|
@ -1656,22 +1651,19 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
if (sscanf (row[4],"%ld",&ActCod) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong action code.");
|
||||
if (ActCod >= 0)
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Act_GetActionTextFromDB (ActCod,ActTxt));
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">"
|
||||
"? "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
/* Write the comments of the access */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Sta_WriteLogComments (LogCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
@ -1770,16 +1762,14 @@ static void Sta_ShowNumAccessesPerUsr (unsigned long NumRows,MYSQL_RES *mysql_re
|
|||
|
||||
/* Write the number of row */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LOG RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"LOG RIGHT_TOP COLOR%u\">"
|
||||
"%ld "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumRow);
|
||||
Gbl.RowEvenOdd,NumRow);
|
||||
|
||||
/* Show the photo */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -1787,25 +1777,22 @@ static void Sta_ShowNumAccessesPerUsr (unsigned long NumRows,MYSQL_RES *mysql_re
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write the user's ID if user is a student in current course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (&UsrDat,(UsrDat.RoleInCurrentCrsDB == Rol_STUDENT));
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/* Write the name and the surnames */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],UsrDat.FullName);
|
||||
Gbl.RowEvenOdd,UsrDat.FullName);
|
||||
|
||||
/* Write user's role */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_ROLES_SINGUL_Abc[UsrDat.RoleInCurrentCrsDB][UsrDat.Sex]);
|
||||
|
||||
/* Write the number of clicks */
|
||||
|
@ -1820,9 +1807,8 @@ static void Sta_ShowNumAccessesPerUsr (unsigned long NumRows,MYSQL_RES *mysql_re
|
|||
}
|
||||
else
|
||||
BarWidth = 0;
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (BarWidth)
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/%c1x14.gif\""
|
||||
" alt=\"\" title=\"\""
|
||||
|
|
|
@ -345,15 +345,14 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
|
||||
/***** Start date/time *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s LEFT_TOP\"",
|
||||
"<td class=\"%s LEFT_TOP",
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,">"
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"%02u/%02u/%02u<br />"
|
||||
"%02u:%02u h"
|
||||
"</td>",
|
||||
|
@ -364,15 +363,14 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
Svy.DateTimes[Svy_START_TIME].Time.Minute);
|
||||
|
||||
/***** End date/time *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\"",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,">"
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"%02u/%02u/%02u<br />"
|
||||
"%02u:%02u h"
|
||||
"</td>",
|
||||
|
@ -383,11 +381,10 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
Svy.DateTimes[Svy_END_TIME ].Time.Minute);
|
||||
|
||||
/***** Survey title *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,">");
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Put form to view survey */
|
||||
Act_FormStart (ActSeeOneSvy);
|
||||
|
@ -413,22 +410,20 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
Svy.NumUsrs);
|
||||
|
||||
/***** Status of the survey *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,">");
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
Svy_WriteStatus (&Svy);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** Write second row of data of this survey *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP\"");
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,">");
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Author of the survey */
|
||||
Svy_WriteAuthor (&Svy);
|
||||
|
@ -438,10 +433,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
Svy_PutFormsToRemEditOneSvy (Svy.SvyCod,Svy.Status.Visible);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td style=\"text-align:left; vertical-align:top;");
|
||||
"<td class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," background-color:%s;",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Scope of the survey */
|
||||
|
@ -511,8 +505,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
|
|||
}
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out," style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out," class=\"COLOR%u\">",Gbl.RowEvenOdd);
|
||||
|
||||
/* Possible button to answer this survey */
|
||||
if (Svy.Status.ICanAnswer)
|
||||
|
@ -2987,8 +2980,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
|||
if (Svy->Status.ICanEdit)
|
||||
{
|
||||
/* Write icon to remove the question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||
Act_FormStart (ActRemSvyQst);
|
||||
Svy_PutParamSvyCod (Svy->SvyCod);
|
||||
Svy_PutParamQstCod (SvyQst->QstCod);
|
||||
|
@ -2999,8 +2991,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write icon to edit the question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||
Act_FormStart (ActEdiOneSvyQst);
|
||||
Svy_PutParamSvyCod (Svy->SvyCod);
|
||||
Svy_PutParamQstCod (SvyQst->QstCod);
|
||||
|
@ -3016,18 +3007,16 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
|||
/* Write index of question inside survey (row[1]) */
|
||||
if (sscanf (row[1],"%u",&(SvyQst->QstInd)) != 1)
|
||||
Lay_ShowErrorAndExit ("Error: wrong question index.");
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],SvyQst->QstInd+1);
|
||||
Gbl.RowEvenOdd,SvyQst->QstInd+1);
|
||||
|
||||
/* Write the question type (row[2]) */
|
||||
SvyQst->AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%s",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]);
|
||||
|
||||
/* Write the stem (row[3]) */
|
||||
|
@ -3114,12 +3103,11 @@ static void Svy_WriteQstStem (const char *Stem,const char *TextStyle)
|
|||
HeadingRigorousHTML,LengthHeading,false);
|
||||
|
||||
/* Write the stem */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">"
|
||||
"<div style=\"text-align:justify;\">"
|
||||
"<tt>%s</tt>"
|
||||
"</div>",
|
||||
TextStyle,Gbl.ColorRows[Gbl.RowEvenOdd],HeadingRigorousHTML);
|
||||
TextStyle,Gbl.RowEvenOdd,HeadingRigorousHTML);
|
||||
|
||||
/* Free memory allocated for the stem */
|
||||
free ((void *) HeadingRigorousHTML);
|
||||
|
|
|
@ -547,9 +547,9 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
|
|||
if (Gbl.CurrentCrs.Syllabus.EditionIsActive)
|
||||
{
|
||||
if (NewItem)
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"COLOR%u\">"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
else
|
||||
{
|
||||
/***** Icon to remove the row *****/
|
||||
|
@ -681,32 +681,32 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
|
|||
}
|
||||
|
||||
if (Gbl.CurrentCrs.Syllabus.EditionIsActive)
|
||||
Syl_PutFormItemSyllabus (InfoType,NewItem,NumItem,Level,CodItem,Text,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Syl_PutFormItemSyllabus (InfoType,NewItem,NumItem,Level,CodItem,Text,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
else
|
||||
{
|
||||
/***** Indent depending on the level *****/
|
||||
if (Level > 1)
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"COLOR%u\">"
|
||||
"</td>",
|
||||
Level - 1,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Level - 1,Gbl.RowEvenOdd);
|
||||
|
||||
/***** Code of the item *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"width:%dpx; background-color:%s;\">",
|
||||
StyleSyllabus[Level],
|
||||
Level * Syl_WIDTH_NUM_SYLLABUS,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\""
|
||||
" style=\"width:%dpx;\">",
|
||||
StyleSyllabus[Level],Gbl.RowEvenOdd,
|
||||
Level * Syl_WIDTH_NUM_SYLLABUS);
|
||||
if (Level == 1)
|
||||
fprintf (Gbl.F.Out," ");
|
||||
fprintf (Gbl.F.Out,"%s </td>",StrItemCod);
|
||||
|
||||
/***** Text of the item *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"%s LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"%s LEFT_TOP COLOR%u\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
LstItemsSyllabus.NumLevels - Level + 1,
|
||||
StyleSyllabus[Level],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Text);
|
||||
}
|
||||
|
||||
|
|
239
swad_test.c
239
swad_test.c
|
@ -894,20 +894,18 @@ static void Tst_ShowTstResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,
|
|||
else
|
||||
/***** Question does not exists *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP COLOR%u\">"
|
||||
"%u. "
|
||||
"</td>"
|
||||
"<td style=\"background-color:%s;\">"
|
||||
"<td class=\"COLOR%u\">"
|
||||
"</td>"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumQst + 1,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],Txt_Question_removed);
|
||||
Gbl.RowEvenOdd,NumQst + 1,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,Txt_Question_removed);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -936,26 +934,23 @@ static void Tst_WriteQstAndAnsExam (unsigned NumQst,long QstCod,MYSQL_ROW row,
|
|||
|
||||
/***** Write number of question *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_N RIGHT_TOP COLOR%u\">"
|
||||
"%u. "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
NumQst + 1);
|
||||
|
||||
/***** Write answer type (row[2]) *****/
|
||||
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
|
||||
|
||||
/***** Write stem (row[4]), answers depending on shuffle (row[3]) and feedback (row[5]) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[4],"TEST_EXA");
|
||||
if (Gbl.CurrentAct == ActSeeTst)
|
||||
Tst_WriteAnswersOfAQstSeeExam (NumQst,QstCod,(Str_ConvertToUpperLetter (row[3][0]) == 'Y'));
|
||||
|
@ -2483,8 +2478,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
|
||||
/* Write icon to remove the question */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||
Act_FormStart (ActRemTstQst);
|
||||
Sta_WriteParamsDatesSeeAccesses ();
|
||||
Tst_WriteParamEditQst ();
|
||||
|
@ -2497,8 +2491,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write icon to edit the question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||
Act_FormStart (ActEdiOneTstQst);
|
||||
Par_PutHiddenParamLong ("QstCod",QstCod);
|
||||
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/edit16x16.gif\""
|
||||
|
@ -2510,48 +2503,42 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write number of question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%lu "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumRow + 1);
|
||||
Gbl.RowEvenOdd,NumRow + 1);
|
||||
|
||||
/* Write question code */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%ld "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],QstCod);
|
||||
Gbl.RowEvenOdd,QstCod);
|
||||
|
||||
/* Write the date (row[1] has the date in format YYYYMMDDHHMMSS) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Dat_WriteDate (row[1]);
|
||||
fprintf (Gbl.F.Out,"<br />");
|
||||
Dat_WriteHourMinute (&row[1][8]);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write the question tags */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tst_GetAndWriteTagsQst (QstCod);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write the question type (row[2]) */
|
||||
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
|
||||
|
||||
/* Write if shuffle is enabled (row[3]) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.AnswerType == Tst_ANS_UNIQUE_CHOICE ||
|
||||
Gbl.Test.AnswerType == Tst_ANS_MULTIPLE_CHOICE)
|
||||
{
|
||||
|
@ -2573,9 +2560,8 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write the stem (row[4]), the feedback (row[5]) and the answers */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[4],"TEST_EDI");
|
||||
Tst_WriteQstFeedback (row[5],"TEST_EDI_LIGHT");
|
||||
Tst_WriteAnswersOfAQstEdit (QstCod);
|
||||
|
@ -2596,16 +2582,14 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
setlocale (LC_NUMERIC,"es_ES.utf8"); // Return to spanish system (TODO: this should be internationalized!!!!!!!)
|
||||
|
||||
/* Write number of times this question has been answered */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumHitsThisQst);
|
||||
Gbl.RowEvenOdd,NumHitsThisQst);
|
||||
|
||||
/* Write average score */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (NumHitsThisQst)
|
||||
fprintf (Gbl.F.Out,"%.2f",TotalScoreThisQst /
|
||||
(double) NumHitsThisQst);
|
||||
|
@ -2614,17 +2598,15 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write number of times this question has been answered (not blank) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%lu"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
NumHitsNotBlankThisQst);
|
||||
|
||||
/* Write average score (not blank) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (NumHitsNotBlankThisQst)
|
||||
fprintf (Gbl.F.Out,"%.2f",TotalScoreThisQst /
|
||||
(double) NumHitsNotBlankThisQst);
|
||||
|
@ -6231,9 +6213,8 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"<tr>");
|
||||
|
||||
/* Write date and time (row[2] holds date and time in YYYYMMDDHHMMSS format) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
Dat_WriteDate (row[2]);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
Dat_WriteHourMinute (&row[2][8]);
|
||||
|
@ -6269,33 +6250,29 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
setlocale (LC_NUMERIC,"es_ES.utf8"); // Return to spanish system (TODO: this should be internationalized!!!!!!!)
|
||||
|
||||
/* Write number of questions */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
if (ICanViewExam)
|
||||
fprintf (Gbl.F.Out,"%u",NumQstsInThisExam);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write number of questions not blank */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
if (ICanViewExam)
|
||||
fprintf (Gbl.F.Out,"%u",NumQstsNotBlankInThisExam);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write score */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",ScoreInThisExam);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write average score per question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",
|
||||
NumQstsInThisExam ? ScoreInThisExam / (double) NumQstsInThisExam :
|
||||
|
@ -6303,9 +6280,8 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write score over Tst_SCORE_MAX */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
ClassDat,Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",
|
||||
NumQstsInThisExam ? ScoreInThisExam * Tst_SCORE_MAX / (double) NumQstsInThisExam :
|
||||
|
@ -6313,9 +6289,8 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Link to show this exam */
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (ICanViewExam)
|
||||
{
|
||||
Act_FormStart (Gbl.CurrentAct == ActSeeMyTstExa ? ActSeeOneTstExaMe :
|
||||
|
@ -6341,51 +6316,46 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
Gbl.Test.Config.FeedbackType != Tst_FEEDBACK_NOTHING);
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"border-style:solid none none none;"
|
||||
" border-width:1px;\">"
|
||||
"%s: %u"
|
||||
"</td>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_Visible_exams,NumExamsVisibleByTchs);
|
||||
|
||||
/* Write total number of questions */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"border-style:solid none none none;"
|
||||
" border-width:1px;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
if (NumExamsVisibleByTchs)
|
||||
fprintf (Gbl.F.Out,"%u",NumTotalQsts);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write total number of questions not blank */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"order-style:solid none none none;"
|
||||
" border-width:1px;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
if (NumExamsVisibleByTchs)
|
||||
fprintf (Gbl.F.Out,"%u",NumTotalQstsNotBlank);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write total score */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"border-style:solid none none none;"
|
||||
" border-width:1px;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",TotalScoreOfAllExams);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write average score per question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"border-style:solid none none none;"
|
||||
" border-width:1px;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",
|
||||
NumTotalQsts ? TotalScoreOfAllExams / (double) NumTotalQsts :
|
||||
|
@ -6393,11 +6363,10 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write score over Tst_SCORE_MAX */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\""
|
||||
" style=\"background-color:%s;"
|
||||
" border-style:solid none none none;"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP COLOR%u\""
|
||||
" style=\"border-style:solid none none none;"
|
||||
" border-width:1px;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
if (ICanViewScore)
|
||||
fprintf (Gbl.F.Out,"%.2lf",
|
||||
NumTotalQsts ? TotalScoreOfAllExams * Tst_SCORE_MAX / (double) NumTotalQsts :
|
||||
|
@ -6405,26 +6374,26 @@ static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Last cell */
|
||||
fprintf (Gbl.F.Out,"<td style=\"background-color:%s;\"></td>"
|
||||
fprintf (Gbl.F.Out,"<td class=\"COLOR%u\"></td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
fprintf (Gbl.F.Out,"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -6445,9 +6414,8 @@ static void Tst_ShowDataUsr (struct UsrData *UsrDat,unsigned NumExams)
|
|||
fprintf (Gbl.F.Out,"<td ");
|
||||
if (NumExams)
|
||||
fprintf (Gbl.F.Out,"rowspan=\"%u\"",NumExams + 1);
|
||||
fprintf (Gbl.F.Out," class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out," class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -6458,11 +6426,10 @@ static void Tst_ShowDataUsr (struct UsrData *UsrDat,unsigned NumExams)
|
|||
fprintf (Gbl.F.Out,"<td ");
|
||||
if (NumExams)
|
||||
fprintf (Gbl.F.Out,"rowspan=\"%u\"",NumExams + 1);
|
||||
fprintf (Gbl.F.Out," class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out," class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActSeeRecOneStd :
|
||||
ActSeeRecOneTch);
|
||||
ActSeeRecOneTch);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Act_LinkFormSubmit (UsrDat->FullName,"MSG_AUT");
|
||||
|
||||
|
@ -6707,19 +6674,17 @@ static void Tst_ShowExamTstResult (const char *TstTime)
|
|||
if (ThisQuestionHasBeenEdited)
|
||||
/***** Question has been edited *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP COLOR%u\">"
|
||||
"%u. "
|
||||
"</td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumQst + 1,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],Txt_Question_modified);
|
||||
Gbl.RowEvenOdd,NumQst + 1,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,Txt_Question_modified);
|
||||
else
|
||||
{
|
||||
/***** Get the code of question (row[0]) *****/
|
||||
|
@ -6735,19 +6700,17 @@ static void Tst_ShowExamTstResult (const char *TstTime)
|
|||
else
|
||||
/***** Question does not exists *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"DAT_LIGHT RIGHT_TOP COLOR%u\">"
|
||||
"%u. "
|
||||
"</td>"
|
||||
"<td style=\"background-color:%s;\"></td>"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"DAT_LIGHT LEFT_TOP COLOR%u\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],NumQst + 1,
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd],Txt_Question_removed);
|
||||
Gbl.RowEvenOdd,NumQst + 1,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd,Txt_Question_removed);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
|
|
@ -1033,17 +1033,15 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
Txt_New_question);
|
||||
|
||||
/***** Write number of question *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
ClassData,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP COLOR%u\">",
|
||||
ClassData,Gbl.RowEvenOdd);
|
||||
if (!QuestionExists)
|
||||
fprintf (Gbl.F.Out,"%u ",++NumNonExistingQst);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Write the question tags *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.NumTags)
|
||||
{
|
||||
/***** Write the tags *****/
|
||||
|
@ -1070,17 +1068,15 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Write the question type *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP COLOR%u\">"
|
||||
"%s "
|
||||
"</td>",
|
||||
ClassData,Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
ClassData,Gbl.RowEvenOdd,
|
||||
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
|
||||
|
||||
/***** Write if shuffle is enabled *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.AnswerType == Tst_ANS_UNIQUE_CHOICE ||
|
||||
Gbl.Test.AnswerType == Tst_ANS_MULTIPLE_CHOICE)
|
||||
/* Put an icon that indicates whether shuffle is enabled or not */
|
||||
|
@ -1096,9 +1092,8 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Write the stem and the answers *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
|
||||
" style=\"background-color:%s;\">",
|
||||
Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (Stem,ClassStem);
|
||||
Tst_WriteQstFeedback (Feedback,"TEST_EDI_LIGHT");
|
||||
switch (Gbl.Test.AnswerType)
|
||||
|
|
129
swad_user.c
129
swad_user.c
|
@ -2600,7 +2600,6 @@ static void Usr_InsertMyLastData (void)
|
|||
|
||||
static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||
{
|
||||
const char *BgColor;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
char MailLink[7+Usr_MAX_BYTES_USR_EMAIL+1]; // mailto:mail_address
|
||||
|
@ -2611,10 +2610,8 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
|
||||
/***** Checkbox to select user *****/
|
||||
// Two colors are used alternatively to better distinguish the rows
|
||||
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Usr_PutCheckboxToSelectUser (Rol__GUEST_,UsrDat->EncryptedUsrCod,false);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
|
@ -2628,18 +2625,16 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Gbl.Prefs.IconsURL);
|
||||
|
||||
/***** Write number of user in the list *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL RIGHT_MIDDLE COLOR%u\">"
|
||||
" %u "
|
||||
"</td>",
|
||||
BgColor,NumUsr);
|
||||
Gbl.RowEvenOdd,NumUsr);
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show student's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -2651,18 +2646,17 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Usr_RestrictLengthMainData (true,UsrDat,MailLink);
|
||||
|
||||
/****** Write user's IDs ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
BgColor);
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER));
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Write rest of main student's data *****/
|
||||
Ins.InsCod = UsrDat->InsCod;
|
||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor,true,
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],true,
|
||||
UsrDat->Email[0] ? MailLink :
|
||||
NULL,
|
||||
Ins.ShortName,
|
||||
|
@ -2787,7 +2781,6 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
|
|||
|
||||
static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
||||
{
|
||||
const char *BgColor;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
struct Institution Ins;
|
||||
|
@ -2795,15 +2788,13 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
struct Department Dpt;
|
||||
|
||||
/***** Start row *****/
|
||||
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show guest's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LDEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -2812,16 +2803,15 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/****** Write user's ID ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (UsrDat,true);
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/***** Write rest of guest's main data *****/
|
||||
Ins.InsCod = UsrDat->InsCod;
|
||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor,true,NULL,Ins.ShortName,NULL);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],true,NULL,Ins.ShortName,NULL);
|
||||
|
||||
/***** Write the rest of the data of the guest *****/
|
||||
if (UsrDat->Tch.CtrCod > 0)
|
||||
|
@ -2829,7 +2819,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
Ctr.CtrCod = UsrDat->Tch.CtrCod;
|
||||
Ctr_GetDataOfCentreByCod (&Ctr);
|
||||
}
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->Tch.CtrCod > 0 ? Ctr.FullName :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
|
@ -2838,39 +2828,39 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
Dpt.DptCod = UsrDat->Tch.DptCod;
|
||||
Dpt_GetDataOfDepartmentByCod (&Dpt);
|
||||
}
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->Tch.DptCod > 0 ? Dpt.FullName :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->Tch.Office[0] ? UsrDat->Tch.Office :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->Tch.OfficePhone[0] ? UsrDat->Tch.OfficePhone :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->LocalAddress[0] ? UsrDat->LocalAddress :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->LocalPhone[0] ? UsrDat->LocalPhone :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->FamilyAddress[0] ? UsrDat->FamilyAddress :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->FamilyPhone[0] ? UsrDat->FamilyPhone :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->OriginPlace[0] ? UsrDat->OriginPlace :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->StrBirthday[0] ? UsrDat->StrBirthday :
|
||||
" ",
|
||||
NULL,true,false);
|
||||
|
@ -2887,7 +2877,6 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
|
||||
void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
||||
{
|
||||
const char *BgColor;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
unsigned NumGrpTyp,NumField;
|
||||
|
@ -2900,15 +2889,13 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM;
|
||||
|
||||
/***** Start row *****/
|
||||
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show student's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -2917,46 +2904,45 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
}
|
||||
|
||||
/****** Write user's ID ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
BgColor);
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER));
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/***** Write rest of main student's data *****/
|
||||
Ins.InsCod = UsrDat->InsCod;
|
||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor,ShowData,NULL,Ins.ShortName,NULL);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],ShowData,NULL,Ins.ShortName,NULL);
|
||||
|
||||
/***** Write the rest of the data of the student *****/
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->LocalAddress[0] ? (ShowData ? UsrDat->LocalAddress :
|
||||
"********") :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->LocalPhone[0] ? (ShowData ? UsrDat->LocalPhone :
|
||||
"********") :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->FamilyAddress[0] ? (ShowData ? UsrDat->FamilyAddress :
|
||||
"********") :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->FamilyPhone[0] ? (ShowData ? UsrDat->FamilyPhone :
|
||||
"********") :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->OriginPlace[0] ? (ShowData ? UsrDat->OriginPlace :
|
||||
"********") :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
UsrDat->StrBirthday[0] ? (ShowData ? UsrDat->StrBirthday :
|
||||
"********") :
|
||||
" ",
|
||||
|
@ -2971,7 +2957,7 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) // If current course tiene groups of este type
|
||||
{
|
||||
Grp_GetNamesGrpsStdBelongsTo (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod,UsrDat->UsrCod,GroupNames);
|
||||
Usr_WriteUsrData (BgColor,GroupNames,NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],GroupNames,NULL,true,UsrDat->Accepted);
|
||||
}
|
||||
|
||||
/***** Fields of the record dependientes of the course *****/
|
||||
|
@ -2989,7 +2975,7 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
}
|
||||
else
|
||||
Text[0] = '\0';
|
||||
Usr_WriteUsrData (BgColor,Text,NULL,false,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],Text,NULL,false,UsrDat->Accepted);
|
||||
|
||||
/* Free structure that stores the query result */
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -3109,7 +3095,6 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
|
|||
|
||||
void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
||||
{
|
||||
const char *BgColor;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
struct Institution Ins;
|
||||
|
@ -3121,14 +3106,12 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
struct Department Dpt;
|
||||
|
||||
/***** Start row *****/
|
||||
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show teacher's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -3137,18 +3120,17 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/****** Write the user's ID ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
BgColor);
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (UsrDat,ID_ICanSeeTeacherID (UsrDat));
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/***** Write rest of main teacher's data *****/
|
||||
Ins.InsCod = UsrDat->InsCod;
|
||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor,ShowData,NULL,Ins.ShortName,NULL);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],ShowData,NULL,Ins.ShortName,NULL);
|
||||
|
||||
/***** Write the rest of teacher's data *****/
|
||||
if (ShowData && UsrDat->Tch.CtrCod > 0)
|
||||
|
@ -3156,7 +3138,7 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
Ctr.CtrCod = UsrDat->Tch.CtrCod;
|
||||
Ctr_GetDataOfCentreByCod (&Ctr);
|
||||
}
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
(ShowData && UsrDat->Tch.CtrCod > 0) ? Ctr.FullName :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
|
@ -3165,15 +3147,15 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
Dpt.DptCod = UsrDat->Tch.DptCod;
|
||||
Dpt_GetDataOfDepartmentByCod (&Dpt);
|
||||
}
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
(ShowData && UsrDat->Tch.DptCod > 0) ? Dpt.FullName :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
(ShowData && UsrDat->Tch.Office[0]) ? UsrDat->Tch.Office :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
Usr_WriteUsrData (BgColor,
|
||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||
(ShowData && UsrDat->Tch.OfficePhone[0]) ? UsrDat->Tch.OfficePhone :
|
||||
" ",
|
||||
NULL,true,UsrDat->Accepted);
|
||||
|
@ -3189,29 +3171,25 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
|
||||
void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||
{
|
||||
const char *BgColor;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
char MailLink[7+Usr_MAX_BYTES_USR_EMAIL+1]; // mailto:mail_address
|
||||
struct Institution Ins;
|
||||
|
||||
/***** Start row *****/
|
||||
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
|
||||
/***** Write number of user *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL_N RIGHT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL_N RIGHT_MIDDLE COLOR%u\">"
|
||||
" %u "
|
||||
"</td>",
|
||||
BgColor,NumUsr);
|
||||
Gbl.RowEvenOdd,NumUsr);
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show administrator's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
BgColor);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -3223,18 +3201,17 @@ void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Usr_RestrictLengthMainData (true,UsrDat,MailLink);
|
||||
|
||||
/****** Write the user's ID ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
|
||||
" style=\"background-color:%s;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
BgColor);
|
||||
Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM));
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/***** Write rest of main administrator's data *****/
|
||||
Ins.InsCod = UsrDat->InsCod;
|
||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor,true,
|
||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],true,
|
||||
UsrDat->Email[0] ? MailLink :
|
||||
NULL,
|
||||
Ins.ShortName,
|
||||
|
|
Loading…
Reference in New Issue