Version 17.23.1

This commit is contained in:
Antonio Cañas Vargas 2017-10-10 10:46:35 +02:00
parent 0c96d661ab
commit a9fd5d23ac
6 changed files with 129 additions and 135 deletions

View File

@ -254,13 +254,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 17.23 (2017-10-10)" #define Log_PLATFORM_VERSION "SWAD 17.23.1 (2017-10-10)"
#define CSS_FILE "swad17.0.css" #define CSS_FILE "swad17.0.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 17.23.1: Oct 10, 2017 Changes in selectors of departments. (234133 lines)
Version 17.23: Oct 10, 2017 New filter to select preassigned/non-preassigned projects. Version 17.23: Oct 10, 2017 New filter to select preassigned/non-preassigned projects.
New filter to select hidden/visible projects. New filter to select hidden/visible projects.
Code refactoring in parameters of projects. (234140 lines) Code refactoring in parameters of projects. (234140 lines)

View File

@ -253,8 +253,8 @@ void Dpt_EditDepartments (void)
/*****************************************************************************/ /*****************************************************************************/
/************************** Get list of departments **************************/ /************************** Get list of departments **************************/
/*****************************************************************************/ /*****************************************************************************/
// If InsCod <= 0 ==> get all the departments
// If InsCod > 0 ==> get departments of an institution // If InsCod > 0 ==> get departments of an institution
// If InsCod <= 0 ==> an empty list is returned
void Dpt_GetListDepartments (long InsCod) void Dpt_GetListDepartments (long InsCod)
{ {
@ -262,21 +262,24 @@ void Dpt_GetListDepartments (long InsCod)
char Query[1024]; char Query[1024];
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;
unsigned long NumRows;
unsigned NumDpt; unsigned NumDpt;
struct Department *Dpt; struct Department *Dpt;
/***** Get departments from database *****/ /***** Free list of departments *****/
switch (Gbl.Dpts.SelectedOrder) Dpt_FreeListDepartments (); // List is initialized to empty
if (InsCod > 0) // Institution specified
{ {
case Dpt_ORDER_BY_DEPARTMENT: /***** Get departments from database *****/
sprintf (OrderBySubQuery,"FullName"); switch (Gbl.Dpts.SelectedOrder)
break; {
case Dpt_ORDER_BY_NUM_TCHS: case Dpt_ORDER_BY_DEPARTMENT:
sprintf (OrderBySubQuery,"NumTchs DESC,FullName"); sprintf (OrderBySubQuery,"FullName");
break; break;
} case Dpt_ORDER_BY_NUM_TCHS:
if (InsCod > 0) // Only the departments of an institution sprintf (OrderBySubQuery,"NumTchs DESC,FullName");
break;
}
sprintf (Query,"(SELECT departments.DptCod,departments.InsCod," sprintf (Query,"(SELECT departments.DptCod,departments.InsCod,"
"departments.ShortName,departments.FullName,departments.WWW," "departments.ShortName,departments.FullName,departments.WWW,"
"COUNT(DISTINCT usr_data.UsrCod) AS NumTchs" "COUNT(DISTINCT usr_data.UsrCod) AS NumTchs"
@ -296,76 +299,54 @@ void Dpt_GetListDepartments (long InsCod)
InsCod,(unsigned) Rol_NET,(unsigned) Rol_TCH, InsCod,(unsigned) Rol_NET,(unsigned) Rol_TCH,
InsCod,(unsigned) Rol_NET,(unsigned) Rol_TCH, InsCod,(unsigned) Rol_NET,(unsigned) Rol_TCH,
OrderBySubQuery); OrderBySubQuery);
else // All the departments Gbl.Dpts.Num = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get departments");
sprintf (Query,"(SELECT departments.DptCod,departments.InsCod,"
"departments.ShortName,departments.FullName,departments.WWW,"
"COUNT(DISTINCT usr_data.UsrCod) AS NumTchs"
" FROM departments,usr_data,crs_usr"
" WHERE departments.DptCod=usr_data.DptCod"
" AND usr_data.UsrCod=crs_usr.UsrCod"
" AND crs_usr.Role IN (%u,%u)"
" GROUP BY departments.DptCod)"
" UNION "
"(SELECT DptCod,InsCod,ShortName,FullName,WWW,0 AS NumTchs"
" FROM departments"
" WHERE DptCod NOT IN"
" (SELECT DISTINCT usr_data.DptCod FROM usr_data,crs_usr"
" WHERE crs_usr.Role IN (%u,%u) AND crs_usr.UsrCod=usr_data.UsrCod))"
" ORDER BY %s",
(unsigned) Rol_NET,(unsigned) Rol_TCH,
(unsigned) Rol_NET,(unsigned) Rol_TCH,
OrderBySubQuery);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get departments");
if (NumRows) // Departments found... if (Gbl.Dpts.Num) // Departments found...
{ {
// NumRows should be equal to Deg->NumCourses /***** Create list with courses in degree *****/
Gbl.Dpts.Num = (unsigned) NumRows; if ((Gbl.Dpts.Lst = (struct Department *) calloc ((size_t) Gbl.Dpts.Num,
sizeof (struct Department))) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store departments.");
/***** Create list with courses in degree *****/ /***** Get the departments *****/
if ((Gbl.Dpts.Lst = (struct Department *) calloc (NumRows,sizeof (struct Department))) == NULL) for (NumDpt = 0;
Lay_ShowErrorAndExit ("Not enough memory to store departments."); NumDpt < Gbl.Dpts.Num;
NumDpt++)
{
Dpt = &(Gbl.Dpts.Lst[NumDpt]);
/***** Get the departments *****/ /* Get next department */
for (NumDpt = 0; row = mysql_fetch_row (mysql_res);
NumDpt < Gbl.Dpts.Num;
NumDpt++)
{
Dpt = &(Gbl.Dpts.Lst[NumDpt]);
/* Get next department */ /* Get department code (row[0]) */
row = mysql_fetch_row (mysql_res); if ((Dpt->DptCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of department.");
/* Get department code (row[0]) */ /* Get institution code (row[1]) */
if ((Dpt->DptCod = Str_ConvertStrCodToLongCod (row[0])) < 0) if ((Dpt->InsCod = Str_ConvertStrCodToLongCod (row[1])) < 0)
Lay_ShowErrorAndExit ("Wrong code of department."); Lay_ShowErrorAndExit ("Wrong code of institution.");
/* Get institution code (row[1]) */ /* Get the short name of the department (row[2]) */
if ((Dpt->InsCod = Str_ConvertStrCodToLongCod (row[1])) < 0) Str_Copy (Dpt->ShrtName,row[2],
Lay_ShowErrorAndExit ("Wrong code of institution."); Hie_MAX_BYTES_SHRT_NAME);
/* Get the short name of the department (row[2]) */ /* Get the full name of the department (row[3]) */
Str_Copy (Dpt->ShrtName,row[2], Str_Copy (Dpt->FullName,row[3],
Hie_MAX_BYTES_SHRT_NAME); Hie_MAX_BYTES_FULL_NAME);
/* Get the full name of the department (row[3]) */ /* Get the URL of the department (row[4]) */
Str_Copy (Dpt->FullName,row[3], Str_Copy (Dpt->WWW,row[4],
Hie_MAX_BYTES_FULL_NAME); Cns_MAX_BYTES_WWW);
/* Get the URL of the department (row[4]) */ /* Get number of non-editing teachers and teachers in this department (row[5]) */
Str_Copy (Dpt->WWW,row[4], if (sscanf (row[5],"%u",&Dpt->NumTchs) != 1)
Cns_MAX_BYTES_WWW); Dpt->NumTchs = 0;
}
}
/* Get number of non-editing teachers and teachers in this department (row[5]) */ /***** Free structure that stores the query result *****/
if (sscanf (row[5],"%u",&Dpt->NumTchs) != 1) DB_FreeMySQLResult (&mysql_res);
Dpt->NumTchs = 0;
}
} }
else
Gbl.Dpts.Num = 0;
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -451,12 +432,11 @@ void Dpt_GetDataOfDepartmentByCod (struct Department *Dpt)
void Dpt_FreeListDepartments (void) void Dpt_FreeListDepartments (void)
{ {
if (Gbl.Dpts.Lst) if (Gbl.Dpts.Lst)
{ /***** Free memory used by the list of departments *****/
/***** Free memory used by the list of courses in degree *****/
free ((void *) Gbl.Dpts.Lst); free ((void *) Gbl.Dpts.Lst);
Gbl.Dpts.Lst = NULL;
Gbl.Dpts.Num = 0; Gbl.Dpts.Lst = NULL;
} Gbl.Dpts.Num = 0;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1130,28 +1110,56 @@ unsigned Dpt_GetNumDptsInIns (long InsCod)
/*********************** Put selector for department *************************/ /*********************** Put selector for department *************************/
/*****************************************************************************/ /*****************************************************************************/
void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,bool SubmitFormOnChange) void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
unsigned SelectorWidth, // In pixels
long FirstOption,
const char *TextWhenNoDptSelected,
bool SubmitFormOnChange)
{ {
extern const char *Txt_Any_department; extern const char *Txt_Another_department;
unsigned NumDpt; unsigned NumDpt;
bool NoDptSelectable;
/***** Form to select department *****/ /***** Get list of departments *****/
/* Get list of departments */
Dpt_GetListDepartments (InsCod); Dpt_GetListDepartments (InsCod);
/* List departments */ /***** Selector to select department *****/
/* Start selector */
fprintf (Gbl.F.Out,"<select id=\"DptCod\" name=\"DptCod\"" fprintf (Gbl.F.Out,"<select id=\"DptCod\" name=\"DptCod\""
" style=\"width:375px;\""); " style=\"width:%upx;\"",
SelectorWidth);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
fprintf (Gbl.F.Out,"<option value=\"-1\""); if (FirstOption <= 0)
if (DptCod == -1L) {
fprintf (Gbl.F.Out," selected=\"selected\""); /* Option when no department selected */
fprintf (Gbl.F.Out,">%s</option>",Txt_Any_department); if (FirstOption < 0)
{
NoDptSelectable = false;
if (TextWhenNoDptSelected)
if (TextWhenNoDptSelected[0])
NoDptSelectable = true;
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (DptCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\"");
if (!NoDptSelectable)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">%s</option>",TextWhenNoDptSelected);
}
/* Another department selected (different to all departments listed) */
fprintf (Gbl.F.Out,"<option value=\"0\"");
if (DptCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",
Txt_Another_department);
}
/* List all departments */
for (NumDpt = 0; for (NumDpt = 0;
NumDpt < Gbl.Dpts.Num; NumDpt < Gbl.Dpts.Num;
NumDpt++) NumDpt++)
@ -1162,8 +1170,9 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,bool SubmitFormOnChang
fprintf (Gbl.F.Out,">%s</option>",Gbl.Dpts.Lst[NumDpt].FullName); fprintf (Gbl.F.Out,">%s</option>",Gbl.Dpts.Lst[NumDpt].FullName);
} }
/* End selector */
fprintf (Gbl.F.Out,"</select>"); fprintf (Gbl.F.Out,"</select>");
/* Free list of departments */ /***** Free list of departments *****/
Dpt_FreeListDepartments (); Dpt_FreeListDepartments ();
} }

View File

@ -71,6 +71,10 @@ void Dpt_RecFormNewDpt (void);
unsigned Dpt_GetTotalNumberOfDepartments (void); unsigned Dpt_GetTotalNumberOfDepartments (void);
unsigned Dpt_GetNumDptsInIns (long InsCod); unsigned Dpt_GetNumDptsInIns (long InsCod);
void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,bool SubmitFormOnChange); void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
unsigned SelectorWidth, // In pixels
long FirstOptionSelectable,
const char *TextWhenNoDptSelected,
bool SubmitFormOnChange);
#endif #endif

View File

@ -94,6 +94,7 @@ void Ind_ReqIndicatorsCourses (void)
extern const char *Txt_Types_of_degree; extern const char *Txt_Types_of_degree;
extern const char *Txt_only_if_the_scope_is_X; extern const char *Txt_only_if_the_scope_is_X;
extern const char *Txt_Department; extern const char *Txt_Department;
extern const char *Txt_Any_department;
extern const char *Txt_No_of_indicators; extern const char *Txt_No_of_indicators;
extern const char *Txt_Indicators_of_courses; extern const char *Txt_Indicators_of_courses;
extern const char *Txt_Show_more_details; extern const char *Txt_Show_more_details;
@ -147,9 +148,12 @@ void Ind_ReqIndicatorsCourses (void)
"</td>" "</td>"
"<td class=\"LEFT_MIDDLE\">", "<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Department); The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (-1L, // All institutions Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, // Departments in current insitution
Gbl.Stat.DptCod, // Selected department Gbl.Stat.DptCod, // Selected department
true); // Submit on change 375, // Width in pixels
-1L, // First option
Txt_Any_department, // Text when no department selected
true); // Submit on change
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -326,7 +330,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
switch (Gbl.Scope.Current) switch (Gbl.Scope.Current)
{ {
case Sco_SCOPE_SYS: case Sco_SCOPE_SYS:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
{ {
if (Gbl.Stat.DegTypCod > 0) if (Gbl.Stat.DegTypCod > 0)
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
@ -370,7 +374,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
} }
break; break;
case Sco_SCOPE_CTY: case Sco_SCOPE_CTY:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM institutions,centres,degrees,courses,crs_usr,usr_data" " FROM institutions,centres,degrees,courses,crs_usr,usr_data"
" WHERE institutions.CtyCod=%ld" " WHERE institutions.CtyCod=%ld"
@ -396,7 +400,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
Gbl.CurrentCty.Cty.CtyCod); Gbl.CurrentCty.Cty.CtyCod);
break; break;
case Sco_SCOPE_INS: case Sco_SCOPE_INS:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM centres,degrees,courses,crs_usr,usr_data" " FROM centres,degrees,courses,crs_usr,usr_data"
" WHERE centres.InsCod=%ld" " WHERE centres.InsCod=%ld"
@ -420,7 +424,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
Gbl.CurrentIns.Ins.InsCod); Gbl.CurrentIns.Ins.InsCod);
break; break;
case Sco_SCOPE_CTR: case Sco_SCOPE_CTR:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM degrees,courses,crs_usr,usr_data" " FROM degrees,courses,crs_usr,usr_data"
" WHERE degrees.CtrCod=%ld" " WHERE degrees.CtrCod=%ld"
@ -442,7 +446,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
Gbl.CurrentCtr.Ctr.CtrCod); Gbl.CurrentCtr.Ctr.CtrCod);
break; break;
case Sco_SCOPE_DEG: case Sco_SCOPE_DEG:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM degrees,courses,crs_usr,usr_data" " FROM degrees,courses,crs_usr,usr_data"
" WHERE degrees.DegCod=%ld" " WHERE degrees.DegCod=%ld"
@ -464,7 +468,7 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
Gbl.CurrentDeg.Deg.DegCod); Gbl.CurrentDeg.Deg.DegCod);
break; break;
case Sco_SCOPE_CRS: case Sco_SCOPE_CRS:
if (Gbl.Stat.DptCod > 0) if (Gbl.Stat.DptCod >= 0) // 0 means another department
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod" sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM degrees,courses,crs_usr,usr_data" " FROM degrees,courses,crs_usr,usr_data"
" WHERE courses.CrsCod=%ld" " WHERE courses.CrsCod=%ld"

View File

@ -2754,6 +2754,7 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
extern const char *Txt_Data; extern const char *Txt_Data;
extern const char *Txt_Title; extern const char *Txt_Title;
extern const char *Txt_Department; extern const char *Txt_Department;
extern const char *Txt_Another_department;
extern const char *Txt_Preassigned_QUESTION; extern const char *Txt_Preassigned_QUESTION;
extern const char *Txt_Number_of_students; extern const char *Txt_Number_of_students;
extern const char *Txt_Proposal; extern const char *Txt_Proposal;
@ -2831,9 +2832,12 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
"</td>" "</td>"
"<td class=\"LEFT_MIDDLE\">", "<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Department); The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, // Departments in current institution
Prj->DptCod, // Selected department Prj->DptCod, // Selected department
false); // Don't submit on change 375, // Width in pixels
0, // First option
Txt_Another_department, // Text when no department selected
false); // Don't submit on change
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -3964,14 +3964,12 @@ void Rec_ShowFormMyInsCtrDpt (void)
extern const char *Txt_Centre; extern const char *Txt_Centre;
extern const char *Txt_Another_centre; extern const char *Txt_Another_centre;
extern const char *Txt_Department; extern const char *Txt_Department;
extern const char *Txt_Another_department;
extern const char *Txt_Office; extern const char *Txt_Office;
extern const char *Txt_Phone; extern const char *Txt_Phone;
const char *ClassForm = The_ClassForm[Gbl.Prefs.Theme]; const char *ClassForm = The_ClassForm[Gbl.Prefs.Theme];
unsigned NumCty; unsigned NumCty;
unsigned NumIns; unsigned NumIns;
unsigned NumCtr; unsigned NumCtr;
unsigned NumDpt;
bool IAmATeacher; bool IAmATeacher;
/***** Get my roles if not yet got *****/ /***** Get my roles if not yet got *****/
@ -4142,39 +4140,13 @@ void Rec_ShowFormMyInsCtrDpt (void)
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">", "<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Department, ClassForm,Txt_Department,
COL2_WIDTH); COL2_WIDTH);
/* Get list of departments in this institution */
Dpt_FreeListDepartments ();
if (Gbl.Usrs.Me.UsrDat.InsCod > 0)
Dpt_GetListDepartments (Gbl.Usrs.Me.UsrDat.InsCod);
/* Start form to select department */
Act_FormGoToStart (ActChgMyDpt); Act_FormGoToStart (ActChgMyDpt);
fprintf (Gbl.F.Out,"<select id=\"DptCod\" name=\"DptCod\"" Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
" style=\"width:500px;\"" Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
" onchange=\"document.getElementById('%s').submit();\">" 500, // Width in pixels
"<option value=\"-1\"", -1L, // First option
Gbl.Form.Id); "", // Text when no department selected
if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) true); // Submit on change
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"
"<option value=\"0\"");
if (Gbl.Usrs.Me.UsrDat.Tch.DptCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",
Txt_Another_department);
for (NumDpt = 0;
NumDpt < Gbl.Dpts.Num;
NumDpt++)
{
fprintf (Gbl.F.Out,"<option value=\"%ld\"",
Gbl.Dpts.Lst[NumDpt].DptCod);
if (Gbl.Dpts.Lst[NumDpt].DptCod == Gbl.Usrs.Me.UsrDat.Tch.DptCod)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",
Gbl.Dpts.Lst[NumDpt].FullName);
}
fprintf (Gbl.F.Out,"</select>");
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");