Version 14.110.13

This commit is contained in:
Antonio Cañas Vargas 2015-04-11 17:33:14 +02:00
parent 1e79ff8d4e
commit d1e3c3867c
13 changed files with 84 additions and 58 deletions

View File

@ -314,7 +314,7 @@ void Ann_ShowFormAnnouncement (void)
extern const char *Txt_Users;
extern const char *Txt_Create_announcement;
/***** Form start *****/
/***** Start form *****/
Act_FormStart (ActRcvAnn);
/***** Start frame *****/
@ -368,7 +368,7 @@ void Ann_ShowFormAnnouncement (void)
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
}

View File

@ -1106,7 +1106,7 @@ void Asg_RequestCreatOrEditAsg (void)
Asg_GetAssignmentTxtFromDB (Asg.AsgCod,Txt);
}
/***** Form start *****/
/***** Start form *****/
if (ItsANewAssignment)
Act_FormStart (ActNewAsg);
else
@ -1222,7 +1222,7 @@ void Asg_RequestCreatOrEditAsg (void)
/***** Table end *****/
Lay_EndRoundFrameTable10 ();
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
fprintf (Gbl.F.Out,"<br />");

View File

@ -358,14 +358,14 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinkInURLs (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<td colspan=\"2\""
" style=\"text-align:left; background-color:%s;\">",
fprintf (Gbl.F.Out,"<td colspan=\"2\" style=\"text-align:left;"
" vertical-align:top; background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
if (Gbl.CurrentCrs.Grps.NumGrps)
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att);
fprintf (Gbl.F.Out,"<p class=\"%s\" style=\"text-align:justify;\">%s</p>",
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:justify;\">%s</div>",
Att->Hidden ? "DAT_LIGHT" :
"DAT",
Txt);
@ -1073,7 +1073,7 @@ void Att_RequestCreatOrEditAttEvent (void)
Att_GetAttEventTxtFromDB (Att.AttCod,Txt);
}
/***** Form start *****/
/***** Start form *****/
if (ItsANewAttEvent)
Act_FormStart (ActNewAtt);
else
@ -1184,18 +1184,21 @@ void Att_RequestCreatOrEditAttEvent (void)
/***** Groups *****/
Att_ShowLstGrpsToEditAttEvent (Att.AttCod);
/***** Table end *****/
Lay_EndRoundFrameTable10 ();
/***** New attendance event *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\">");
if (ItsANewAttEvent)
Lay_PutCreateButton (Txt_Create_event);
else
Lay_PutConfirmButton (Txt_Modify_event);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Form end *****/
/***** Table end *****/
Lay_EndRoundFrameTable10 ();
/***** End form *****/
Act_FormEnd ();
fprintf (Gbl.F.Out,"<br />");
/***** Show current attendance events *****/
Att_ShowAllAttEvents ();
@ -1604,7 +1607,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve
NumGrps = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get groups of an attendance event");
/***** Write heading *****/
fprintf (Gbl.F.Out,"<p class=\"%s\">%s: ",
fprintf (Gbl.F.Out,"<div class=\"%s\">%s: ",
Att->Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP",
(NumGrps == 1) ? Txt_Group :
@ -1638,7 +1641,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve
fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.CurrentCrs.Crs.ShortName);
fprintf (Gbl.F.Out,"</p>");
fprintf (Gbl.F.Out,"</div>");
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
@ -1838,6 +1841,7 @@ unsigned Att_GetNumAttEvents (Sco_Scope_t Scope,unsigned *NumNotif)
void Att_SeeOneAttEvent (void)
{
extern const char *Txt_Event;
struct AttendanceEvent Att;
/***** Get attendance event code *****/
@ -1851,7 +1855,7 @@ void Att_SeeOneAttEvent (void)
Pag_GetParamPagNum (Pag_ATT_EVENTS);
/***** Show attendance *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
Lay_StartRoundFrameTable10 (NULL,2,Txt_Event);
Att.AttCod = Gbl.AttEvents.AttCod;
Att_ShowOneAttEvent (&Att,true);
Lay_EndRoundFrameTable10 ();
@ -1886,7 +1890,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att)
/***** Get my preference about photos in users' list for current course *****/
Usr_GetMyPrefAboutListWithPhotosFromDB ();
/***** Form start *****/
/***** Start form *****/
if (Att->Open)
{
Act_FormStart (ActRecAttMe);
@ -1938,6 +1942,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att)
static void Att_ListAttStudents (struct AttendanceEvent *Att)
{
extern const char *Txt_Attendance;
extern const char *Txt_Student_comment;
extern const char *Txt_Teachers_comment;
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
@ -1959,14 +1964,14 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
/***** Form start *****/
/***** Start form *****/
Act_FormStart (ActRecAttStd);
Att_PutParamAttCod (Att->AttCod);
Grp_PutParamsCodGrps ();
/***** List students' data *****/
/* Header */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
Lay_StartRoundFrameTable10 (NULL,2,Txt_Attendance);
fprintf (Gbl.F.Out,"<tr>"
"<th></th>"
"<th></th>"
@ -2001,13 +2006,18 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
}
}
/* Footer */
/* Send button */
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"8\">");
Lay_PutConfirmButton (Txt_Save);
fprintf (Gbl.F.Out,"</td>"
"<tr>");
/* End frame */
Lay_EndRoundFrameTable10 ();
/***** Send button *****/
Lay_PutConfirmButton (Txt_Save);
/***** End form *****/
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
@ -2609,6 +2619,7 @@ void Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (long AttCod)
void Usr_ReqListAttendanceStdsCrs (void)
{
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Show_list;
/***** Get and update type of list,
@ -2633,23 +2644,28 @@ void Usr_ReqListAttendanceStdsCrs (void)
Usr_GetListSelectedUsrs ();
/***** Draw a class photo with students of the course *****/
/* Form start */
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/* Start form */
Act_FormStart (ActSeeLstAttStd);
Grp_PutParamsCodGrps ();
/* Write list of students to select some of them */
Lay_StartRoundFrameTable10 (NULL,0,NULL);
Usr_ListUsersToSelect (Rol_STUDENT);
Lay_EndRoundFrameTable10 ();
/* Start frame */
Lay_StartRoundFrameTable10 (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
/* Free list of attendance events */
Att_FreeListAttEvents ();
/* Write list of students to select some of them */
Usr_ListUsersToSelect (Rol_STUDENT);
/* Send button */
fprintf (Gbl.F.Out,"<tr>"
"<td>");
Lay_PutConfirmButton (Txt_Show_list);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/* End frame */
Lay_EndRoundFrameTable10 ();
/* End form */
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
/***** Free memory used for by the list of users *****/
Usr_FreeListsEncryptedUsrCods ();
@ -2723,8 +2739,6 @@ void Usr_ListAttendanceStdsCrs (void)
/***** Show details or put button to show details *****/
if (Gbl.AttEvents.ShowDetails)
Att_ListStdsWithAttEventsDetails (NumStdsInList,LstSelectedUsrCods);
else if (Gbl.CurrentAct == ActSeeLstAttStd)
Att_PutButtonToShowDetails ();
/***** Free memory for list of attendance events selected *****/
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
@ -3113,6 +3127,17 @@ static void Att_ListStdsAttendanceTable (unsigned NumStdsInList,long *LstSelecte
"</tr>",
Total);
/***** Button to show more details *****/
if (Gbl.CurrentAct == ActSeeLstAttStd && !Gbl.AttEvents.ShowDetails)
{
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"%u\">",
4 + Gbl.AttEvents.Num + 1);
Att_PutButtonToShowDetails ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
/***** End frame *****/
Lay_EndRoundFrameTable10 ();

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.110.12 (2015/04/11)"
#define Log_PLATFORM_VERSION "SWAD 14.110.13 (2015/04/11)"
// 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.110.13:Apr 11, 2015 Changes in layout of users' attendance. (184750 lines)
Version 14.110.12:Apr 11, 2015 Changes in layout of users' works. (184728 lines)
Version 14.110.11:Apr 11, 2015 Changes in layout of selection of class photo / list. (184722 lines)
Version 14.110.10:Apr 11, 2015 Changes in layout of selection of groups. (184725 lines)

View File

@ -2861,7 +2861,7 @@ void Brw_AskEditWorksCrs (void)
Gbl.Usrs.LstStds.NumUsrs))
{
/***** Draw class photos to select users *****/
/* Form start */
/* Start form */
Act_FormStart (ActAdmAsgWrkCrs);
Grp_PutParamsCodGrps ();
Par_PutHiddenParamChar ("FullTree",'Y'); // By default, show all files
@ -2881,7 +2881,7 @@ void Brw_AskEditWorksCrs (void)
/* Frame end */
Lay_EndRoundFrameTable10 ();
/* Form end */
/* End form */
Act_FormEnd ();
}
}
@ -3052,7 +3052,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
/* Get list of group with file zones which I belong to */
Grp_GetLstCodGrpsWithFileZonesIBelong (&LstMyGrps);
/***** Form start *****/
/***** Start form *****/
Act_FormStart (Brw_ActChgZone[Gbl.FileBrowser.Type]);
/***** List start *****/
@ -11136,7 +11136,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
" vertical-align:top; background-color:%s;\">",
BgColor);
/* Form start */
/* Start form */
if (CrsCod > 0 && CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
{
Act_FormGoToStart (Brw_ActReqDatFile[FileMetadata.FileBrowser]); // Go to another course

View File

@ -182,7 +182,7 @@ void Ind_ReqIndicatorsCourses (void)
"</tr>"
"</table>");
/* Form end */
/* End form */
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"

View File

@ -93,7 +93,7 @@ void Not_ShowFormNotice (void)
Gbl.CurrentCrs.Crs.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
/***** Form start *****/
/***** Start form *****/
Act_FormStart (ActRcvNot);
/***** Start frame *****/
@ -122,7 +122,7 @@ void Not_ShowFormNotice (void)
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
}

View File

@ -1819,7 +1819,7 @@ void Ntf_WriteNumberOfNewNtfs (void)
if ((NumUnseenNtfs = Ntf_GetNumberOfAllMyUnseenNtfs ()) != 0)
NumNewNtfs = Ntf_GetNumberOfMyNewUnseenNtfs ();
/***** Form start *****/
/***** Start form *****/
Act_FormStartId (ActSeeNewNtf,"form_ntf");
Act_LinkFormSubmitId (Txt_See_notifications,
The_ClassNotif[Gbl.Prefs.Theme],"form_ntf");
@ -1852,7 +1852,7 @@ void Ntf_WriteNumberOfNewNtfs (void)
Txt_NOTIF_new_PLURAL);
}
/***** Form end *****/
/***** End form *****/
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
}

View File

@ -229,7 +229,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
};
Sch_WhatToSearch_t WhatToSearch;
/***** Form start *****/
/***** Start form *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
Act_FormStart (Action);
Lay_StartRoundFrameTable10 (NULL,2,Txt_Search);
@ -274,7 +274,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
fprintf (Gbl.F.Out,"<br />");
Lay_PutConfirmButton (Txt_Search);
/***** Form end *****/
/***** End form *****/
fprintf (Gbl.F.Out,"</td>"
"</tr>");
Lay_EndRoundFrameTable10 ();

View File

@ -519,7 +519,7 @@ void Sta_AskSeeCrsAccesses (void)
/***** Submit button *****/
Lay_PutConfirmButton (Txt_Show_visits);
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
/* Free the memory used by the list of users */
@ -648,7 +648,7 @@ void Sta_AskSeeGblAccesses (void)
/***** Submit button *****/
Lay_PutConfirmButton (Txt_Show_visits);
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
}
@ -3640,7 +3640,7 @@ void Sta_ReqUseOfPlatform (void)
/***** Submit button *****/
Lay_PutConfirmButton (Txt_Show_statistic);
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -1553,7 +1553,7 @@ void Svy_RequestCreatOrEditSvy (void)
Svy_GetSurveyTxtFromDB (Svy.SvyCod,Txt);
}
/***** Form start *****/
/***** Start form *****/
if (ItsANewSurvey)
Act_FormStart (ActNewSvy);
else
@ -1677,7 +1677,7 @@ void Svy_RequestCreatOrEditSvy (void)
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
/***** Show questions of the survey ready to be edited *****/
@ -3080,7 +3080,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
/***** Button to create/modify survey *****/
Lay_PutConfirmButton (Txt_Send_survey);
/***** Form end *****/
/***** End form *****/
Act_FormEnd ();
}
else

View File

@ -5972,7 +5972,7 @@ void Tst_SelUsrsToSeeUsrsTstExams (void)
if (Usr_GetIfShowBigList (Gbl.Usrs.LstTchs.NumUsrs +
Gbl.Usrs.LstStds.NumUsrs))
{
/***** Form start *****/
/***** Start form *****/
Act_FormStart (ActSeeUsrTstExa);
Grp_PutParamsCodGrps ();
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">"
@ -6020,7 +6020,7 @@ void Tst_SelDatesToSeeMyTstExams (void)
{
extern const char *Txt_See_exams;
/***** Form start *****/
/***** Start form *****/
Act_FormStart (ActSeeMyTstExa);
/***** Starting and ending dates in the search *****/

View File

@ -1371,7 +1371,7 @@ void Usr_WriteFormLogin (void)
fprintf (Gbl.F.Out,"</div>");
/***** Form start *****/
/***** Start form *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
Act_FormStart (ActAutUsrInt);
Lay_StartRoundFrameTable10 (NULL,2,Txt_Log_in);
@ -6349,7 +6349,7 @@ void Usr_SeeGuests (void)
/***** Draw a class photo with students of the course *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/* Form start */
/* Start form */
Act_FormStart (ActSeeRecSevInv);
Grp_PutParamsCodGrps ();
@ -6517,7 +6517,7 @@ void Usr_SeeStudents (void)
/***** Draw a class photo with students of the course *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/* Form start */
/* Start form */
if (ICanViewRecords)
{
Act_FormStart (ActSeeRecSevStd);
@ -6655,7 +6655,7 @@ void Usr_SeeTeachers (void)
/***** Draw a class photo with teachers of the course *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/* Form start */
/* Start form */
if (ICanViewRecords)
Act_FormStart (ActSeeRecSevTch);