Version19.99.2

This commit is contained in:
Antonio Cañas Vargas 2019-12-27 19:22:48 +01:00
parent 8ffd6705b2
commit 84ccb15a76
5 changed files with 283 additions and 350 deletions

View File

@ -2433,18 +2433,6 @@ a:hover img.CENTRE_PHOTO_SHOW
overflow:hidden;
text-overflow:ellipsis;
}
.REC_DAT
{
color:#808080;
font-size:13pt;
line-height:110%;
}
.REC_DAT_BOLD
{
color:black;
font-size:13pt;
line-height:110%;
}
.REC_FIELDNAME
{
width:200px;

View File

@ -2084,8 +2084,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
if (ICanEditStdComment) // Show with form
{
HTM_TEXTAREA_Begin ("name=\"CommentStd%ld\" cols=\"40\" rows=\"3\"",
UsrDat->UsrCod);
HTM_TEXTAREA_Begin ("name=\"CommentStd%s\" cols=\"40\" rows=\"3\"",
UsrDat->EncryptedUsrCod);
HTM_Txt (CommentStd);
HTM_TEXTAREA_End ();
}
@ -2101,8 +2101,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
if (ICanEditTchComment) // Show with form
{
HTM_TEXTAREA_Begin ("name=\"CommentTch%ld\" cols=\"40\" rows=\"3\"",
UsrDat->UsrCod);
HTM_TEXTAREA_Begin ("name=\"CommentTch%s\" cols=\"40\" rows=\"3\"",
UsrDat->EncryptedUsrCod);
HTM_Txt (CommentTch);
HTM_TEXTAREA_End ();
}
@ -2201,7 +2201,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
extern const char *Txt_Your_comment_has_been_updated;
struct AttendanceEvent Att;
bool Present;
char CommentParamName[10 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
char *CommentParamName;
char CommentStd[Cns_MAX_BYTES_TEXT + 1];
char CommentTch[Cns_MAX_BYTES_TEXT + 1];
@ -2215,10 +2215,11 @@ void Att_RegisterMeAsStdInAttEvent (void)
/***** Get comments for this student *****/
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att.AttCod,Gbl.Usrs.Me.UsrDat.UsrCod,
CommentStd,CommentTch);
snprintf (CommentParamName,sizeof (CommentParamName),
"CommentStd%ld",
Gbl.Usrs.Me.UsrDat.UsrCod);
if (asprintf (&CommentParamName,"CommentStd%s",
Gbl.Usrs.Me.UsrDat.EncryptedUsrCod) < 0)
Lay_NotEnoughMemoryExit ();
Par_GetParToHTML (CommentParamName,CommentStd,Cns_MAX_BYTES_TEXT);
free (CommentParamName);
if (Present ||
CommentStd[0] ||
@ -2263,7 +2264,7 @@ void Att_RegisterStudentsInAttEvent (void)
unsigned NumStdsPresent;
unsigned NumStdsAbsent;
struct UsrData UsrData;
char CommentParamName[10 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
char *CommentParamName;
char CommentStd[Cns_MAX_BYTES_TEXT + 1];
char CommentTch[Cns_MAX_BYTES_TEXT + 1];
@ -2329,10 +2330,11 @@ void Att_RegisterStudentsInAttEvent (void)
{
/***** Get comments for this student *****/
Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att.AttCod,Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].UsrCod,CommentStd,CommentTch);
snprintf (CommentParamName,sizeof (CommentParamName),
"CommentTch%ld",
Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].UsrCod);
if (asprintf (&CommentParamName,"CommentTch%s",
Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].EncryptedUsrCod) < 0)
Lay_NotEnoughMemoryExit ();
Par_GetParToHTML (CommentParamName,CommentTch,Cns_MAX_BYTES_TEXT);
free (CommentParamName);
Present = !Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].Remove;

View File

@ -492,18 +492,19 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.99 (2019-12-27)"
#define CSS_FILE "swad19.99.css"
#define Log_PLATFORM_VERSION "SWAD 19.99.2 (2019-12-27)"
#define CSS_FILE "swad19.99.1.css"
#define JS_FILE "swad19.91.1.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
CommentTch%ld
Version 19.102: Dec 27, 2019 Map in country information. (? lines)
Version 19.101: Dec 27, 2019 Map in institution information. (? lines)
Version 19.100: Dec 27, 2019 Code refactoring in country information. (? lines)
Version 19.99.1: Dec 27, 2019 Code refactoring in form labels. (? lines)
Version 19.99.2: Dec 27, 2019 Fixed bug in attendance. (248857 lines)
Version 19.99.1: Dec 27, 2019 Code refactoring in form labels. (248855 lines)
Version 19.99: Dec 27, 2019 Code refactoring in form labels. (248924 lines)
Version 19.98: Dec 26, 2019 Code refactoring in form labels. (249011 lines)
Version 19.97.14: Dec 26, 2019 Code refactoring in course, degree, centre and institution information. (249243 lines)

View File

@ -279,6 +279,10 @@ void Frm_FreeAnchorStr (char *Anchor)
/************************* Show label column in form *************************/
/*****************************************************************************/
// Id == NULL ==> label class = data
// Id[0] == '\0' ==> label class = form, no label for
// Id[0] != '\0' ==> label class = form, label for
void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label)
{
extern const char *The_ClassFormInBox[The_NUM_THEMES];
@ -291,8 +295,14 @@ void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label)
/***** Label *****/
if (Id)
HTM_LABEL_Begin ("for=\"%s\" class=\"%s\"",
Id,The_ClassFormInBox[Gbl.Prefs.Theme]);
{
if (Id[0])
HTM_LABEL_Begin ("for=\"%s\" class=\"%s\"",
Id,The_ClassFormInBox[Gbl.Prefs.Theme]);
else
HTM_LABEL_Begin ("class=\"%s\"",
The_ClassFormInBox[Gbl.Prefs.Theme]);
}
else
HTM_LABEL_Begin ("class=\"DAT\"");
HTM_TxtF ("%s:",Label);

File diff suppressed because it is too large Load Diff