Version 20.51.28: Mar 20, 2021 Assignment groups database table renamed.

This commit is contained in:
acanas 2021-03-20 14:46:34 +01:00
parent 708e50cf16
commit a56dab304f
12 changed files with 82 additions and 69 deletions

View File

@ -3410,14 +3410,14 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
} }
/********************************* Attendance ********************************/ /********************************* Attendance ********************************/
.ATmt_CHECK .ATT_CHECK
{ {
display:inline-block; display:inline-block;
font-size:13pt; font-size:13pt;
font-weight:bold; font-weight:bold;
color:darkgreen; color:darkgreen;
} }
.ATmt_CROSS .ATT_CROSS
{ {
display:inline-block; display:inline-block;
font-size:13pt; font-size:13pt;

View File

@ -86,9 +86,9 @@ CREATE TABLE IF NOT EXISTS asg_assignments (
UNIQUE INDEX(AsgCod), UNIQUE INDEX(AsgCod),
INDEX(CrsCod,Hidden)); INDEX(CrsCod,Hidden));
-- --
-- Table asg_grp: stores the groups associated to assigments -- Table asg_groups: stores the groups associated to assigments
-- --
CREATE TABLE IF NOT EXISTS asg_grp ( CREATE TABLE IF NOT EXISTS asg_groups (
AsgCod INT NOT NULL, AsgCod INT NOT NULL,
GrpCod INT NOT NULL, GrpCod INT NOT NULL,
UNIQUE INDEX(AsgCod,GrpCod)); UNIQUE INDEX(AsgCod,GrpCod));

View File

@ -701,15 +701,15 @@ static void Asg_GetListAssignments (struct Asg_Assignments *Assignments)
// Assignment is for the whole course // Assignment is for the whole course
"AsgCod NOT IN" "AsgCod NOT IN"
" (SELECT AsgCod" " (SELECT AsgCod"
" FROM asg_grp)" // Not associated to any group " FROM asg_groups)" // Not associated to any group
" OR" " OR"
// Assignment is for some of my groups // Assignment is for some of my groups
" AsgCod IN" " AsgCod IN"
" (SELECT asg_grp.AsgCod" " (SELECT asg_groups.AsgCod"
" FROM asg_grp," " FROM asg_groups,"
"crs_grp_usr" "crs_grp_usr"
" WHERE crs_grp_usr.UsrCod=%ld" " WHERE crs_grp_usr.UsrCod=%ld"
" AND asg_grp.GrpCod=crs_grp_usr.GrpCod)" " AND asg_groups.GrpCod=crs_grp_usr.GrpCod)"
")" ")"
" ORDER BY %s", " ORDER BY %s",
Gbl.Hierarchy.Crs.CrsCod, Gbl.Hierarchy.Crs.CrsCod,
@ -1409,8 +1409,8 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
HTM_INPUT_CHECKBOX ("WholeCrs",HTM_DONT_SUBMIT_ON_CHANGE, HTM_INPUT_CHECKBOX ("WholeCrs",HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"WholeCrs\" value=\"Y\"%s" "id=\"WholeCrs\" value=\"Y\"%s"
" onclick=\"uncheckChildren(this,'GrpCods')\"", " onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_CheckIfAssociatedToGrps ("asg_grp","AsgCod",AsgCod) ? "" : Grp_CheckIfAssociatedToGrps ("asg_groups","AsgCod",AsgCod) ? "" :
" checked=\"checked\""); " checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
HTM_LABEL_End (); HTM_LABEL_End ();
HTM_TD_End (); HTM_TD_End ();
@ -1678,7 +1678,8 @@ static void Asg_RemoveAllTheGrpsAssociatedToAnAssignment (long AsgCod)
{ {
/***** Remove groups of the assignment *****/ /***** Remove groups of the assignment *****/
DB_QueryDELETE ("can not remove the groups associated to an assignment", DB_QueryDELETE ("can not remove the groups associated to an assignment",
"DELETE FROM asg_grp WHERE AsgCod=%ld", "DELETE FROM asg_groups"
" WHERE AsgCod=%ld",
AsgCod); AsgCod);
} }
@ -1691,7 +1692,8 @@ void Asg_RemoveGroup (long GrpCod)
/***** Remove group from all the assignments *****/ /***** Remove group from all the assignments *****/
DB_QueryDELETE ("can not remove group from the associations" DB_QueryDELETE ("can not remove group from the associations"
" between assignments and groups", " between assignments and groups",
"DELETE FROM asg_grp WHERE GrpCod=%ld", "DELETE FROM asg_groups"
" WHERE GrpCod=%ld",
GrpCod); GrpCod);
} }
@ -1704,9 +1706,11 @@ void Asg_RemoveGroupsOfType (long GrpTypCod)
/***** Remove group from all the assignments *****/ /***** Remove group from all the assignments *****/
DB_QueryDELETE ("can not remove groups of a type from the associations" DB_QueryDELETE ("can not remove groups of a type from the associations"
" between assignments and groups", " between assignments and groups",
"DELETE FROM asg_grp USING crs_grp,asg_grp" "DELETE FROM asg_groups"
" USING crs_grp,"
"asg_groups"
" WHERE crs_grp.GrpTypCod=%ld" " WHERE crs_grp.GrpTypCod=%ld"
" AND crs_grp.GrpCod=asg_grp.GrpCod", " AND crs_grp.GrpCod=asg_groups.GrpCod",
GrpTypCod); GrpTypCod);
} }
@ -1724,7 +1728,7 @@ static void Asg_CreateGrps (long AsgCod)
NumGrpSel++) NumGrpSel++)
/* Create group */ /* Create group */
DB_QueryINSERT ("can not associate a group to an assignment", DB_QueryINSERT ("can not associate a group to an assignment",
"INSERT INTO asg_grp" "INSERT INTO asg_groups"
" (AsgCod,GrpCod)" " (AsgCod,GrpCod)"
" VALUES" " VALUES"
" (%ld,%ld)", " (%ld,%ld)",
@ -1750,11 +1754,14 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Asg_Assignment *As
/***** Get groups associated to an assignment from database *****/ /***** Get groups associated to an assignment from database *****/
NumRows = DB_QuerySELECT (&mysql_res,"can not get groups of an assignment", NumRows = DB_QuerySELECT (&mysql_res,"can not get groups of an assignment",
"SELECT crs_grp_types.GrpTypName,crs_grp.GrpName" "SELECT crs_grp_types.GrpTypName,crs_grp.GrpName"
" FROM asg_grp,crs_grp,crs_grp_types" " FROM asg_groups,"
" WHERE asg_grp.AsgCod=%ld" "crs_grp,"
" AND asg_grp.GrpCod=crs_grp.GrpCod" "crs_grp_types"
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod" " WHERE asg_groups.AsgCod=%ld"
" ORDER BY crs_grp_types.GrpTypName,crs_grp.GrpName", " AND asg_groups.GrpCod=crs_grp.GrpCod"
" AND crs_grp.GrpTypCod=crs_grp_types.GrpTypCod"
" ORDER BY crs_grp_types.GrpTypName,"
"crs_grp.GrpName",
Asg->AsgCod); Asg->AsgCod);
/***** Write heading *****/ /***** Write heading *****/
@ -1804,11 +1811,11 @@ void Asg_RemoveCrsAssignments (long CrsCod)
{ {
/***** Remove groups *****/ /***** Remove groups *****/
DB_QueryDELETE ("can not remove groups associated to assignments in a course", DB_QueryDELETE ("can not remove groups associated to assignments in a course",
"DELETE FROM asg_grp" "DELETE FROM asg_groups"
" USING asg_assignments," " USING asg_assignments,"
"asg_grp" "asg_groups"
" WHERE asg_assignments.CrsCod=%ld" " WHERE asg_assignments.CrsCod=%ld"
" AND asg_assignments.AsgCod=asg_grp.AsgCod", " AND asg_assignments.AsgCod=asg_groups.AsgCod",
CrsCod); CrsCod);
/***** Remove assignments *****/ /***** Remove assignments *****/
@ -1838,15 +1845,16 @@ static bool Asg_CheckIfIBelongToCrsOrGrpsThisAssignment (long AsgCod)
" AND (" " AND ("
// Assignment is for the whole course // Assignment is for the whole course
"AsgCod NOT IN" "AsgCod NOT IN"
" (SELECT AsgCod FROM asg_grp)" " (SELECT AsgCod"
" FROM asg_groups)"
" OR " " OR "
// Assignment is for some of my groups // Assignment is for some of my groups
"AsgCod IN" "AsgCod IN"
" (SELECT asg_grp.AsgCod" " (SELECT asg_groups.AsgCod"
" FROM asg_grp," " FROM crs_grp_usr,"
"crs_grp_usr" "asg_groups"
" WHERE crs_grp_usr.UsrCod=%ld" " WHERE crs_grp_usr.UsrCod=%ld"
" AND asg_grp.GrpCod=crs_grp_usr.GrpCod)" " AND asg_groups.GrpCod=crs_grp_usr.GrpCod)"
")", ")",
AsgCod,Gbl.Usrs.Me.UsrDat.UsrCod) != 0); AsgCod,Gbl.Usrs.Me.UsrDat.UsrCod) != 0);
case Rol_SYS_ADM: case Rol_SYS_ADM:

View File

@ -206,7 +206,7 @@ void Att_SeeAttEvents (void)
/***** Get parameters *****/ /***** Get parameters *****/
Events.SelectedOrder = Att_GetParamAttOrder (); Events.SelectedOrder = Att_GetParamAttOrder ();
Grp_GetParamWhichGroups (); Grp_GetParamWhichGroups ();
Events.CurrentPage = Pag_GetParamPagNum (Pag_ATmt_EVENTS); Events.CurrentPage = Pag_GetParamPagNum (Pag_ATT_EVENTS);
/***** Get list of attendance events *****/ /***** Get list of attendance events *****/
Att_GetListAttEvents (&Events,Att_NEWEST_FIRST); Att_GetListAttEvents (&Events,Att_NEWEST_FIRST);
@ -256,7 +256,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
} }
/***** Write links to pages *****/ /***** Write links to pages *****/
Pag_WriteLinksToPagesCentered (Pag_ATmt_EVENTS,&Pagination, Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,&Pagination,
Events,-1L); Events,-1L);
if (Events->Num) if (Events->Num)
@ -275,7 +275,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
Frm_BeginForm (ActSeeAtt); Frm_BeginForm (ActSeeAtt);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,Events->CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events->CurrentPage);
Dat_PutHiddenParamOrder (Order); Dat_PutHiddenParamOrder (Order);
HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL); HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL);
if (Order == Events->SelectedOrder) if (Order == Events->SelectedOrder)
@ -308,7 +308,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
Ale_ShowAlert (Ale_INFO,Txt_No_events); Ale_ShowAlert (Ale_INFO,Txt_No_events);
/***** Write again links to pages *****/ /***** Write again links to pages *****/
Pag_WriteLinksToPagesCentered (Pag_ATmt_EVENTS,&Pagination, Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,&Pagination,
Events,-1L); Events,-1L);
/***** Button to create a new attendance event *****/ /***** Button to create a new attendance event *****/
@ -331,7 +331,7 @@ static void Att_ParamsWhichGroupsToShow (void *Events)
if (Events) if (Events)
{ {
Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,((struct Att_Events *) Events)->CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
} }
} }
@ -416,7 +416,7 @@ static void Att_PutParamsToCreateNewAttEvent (void *Events)
Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,((struct Att_Events *) Events)->CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
} }
} }
@ -433,7 +433,7 @@ static void Att_PutParamsToListUsrsAttendance (void *Events)
Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,((struct Att_Events *) Events)->CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
} }
} }
@ -635,7 +635,7 @@ static void Att_PutParams (void *Events)
Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Events)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,((struct Att_Events *) Events)->CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
} }
} }
@ -929,7 +929,7 @@ void Att_AskRemAttEvent (void)
/***** Get parameters *****/ /***** Get parameters *****/
Events.SelectedOrder = Att_GetParamAttOrder (); Events.SelectedOrder = Att_GetParamAttOrder ();
Grp_GetParamWhichGroups (); Grp_GetParamWhichGroups ();
Events.CurrentPage = Pag_GetParamPagNum (Pag_ATmt_EVENTS); Events.CurrentPage = Pag_GetParamPagNum (Pag_ATT_EVENTS);
/***** Get attendance event code *****/ /***** Get attendance event code *****/
if ((Event.AttCod = Att_GetParamAttCod ()) == -1L) if ((Event.AttCod = Att_GetParamAttCod ()) == -1L)
@ -944,7 +944,7 @@ void Att_AskRemAttEvent (void)
Dat_PutHiddenParamOrder (Events.SelectedOrder); Dat_PutHiddenParamOrder (Events.SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,Events.CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
/* Ask for confirmation of removing */ /* Ask for confirmation of removing */
Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X, Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X,
@ -1101,7 +1101,7 @@ void Att_RequestCreatOrEditAttEvent (void)
/***** Get parameters *****/ /***** Get parameters *****/
Events.SelectedOrder = Att_GetParamAttOrder (); Events.SelectedOrder = Att_GetParamAttOrder ();
Grp_GetParamWhichGroups (); Grp_GetParamWhichGroups ();
Events.CurrentPage = Pag_GetParamPagNum (Pag_ATmt_EVENTS); Events.CurrentPage = Pag_GetParamPagNum (Pag_ATT_EVENTS);
/***** Get the code of the attendance event *****/ /***** Get the code of the attendance event *****/
Event.AttCod = Att_GetParamAttCod (); Event.AttCod = Att_GetParamAttCod ();
@ -1141,7 +1141,7 @@ void Att_RequestCreatOrEditAttEvent (void)
Dat_PutHiddenParamOrder (Events.SelectedOrder); Dat_PutHiddenParamOrder (Events.SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
Pag_PutHiddenParamPagNum (Pag_ATmt_EVENTS,Events.CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
/***** Begin box and table *****/ /***** Begin box and table *****/
if (ItsANewAttEvent) if (ItsANewAttEvent)
@ -1279,7 +1279,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
NumGrpTyp++) NumGrpTyp++)
if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
Grp_ListGrpsToEditAsgAttSvyEvtMch (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp], Grp_ListGrpsToEditAsgAttSvyEvtMch (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],
Grp_ATmt_EVENT,AttCod); Grp_ATT_EVENT,AttCod);
/***** End table and box *****/ /***** End table and box *****/
Box_BoxTableEnd (); Box_BoxTableEnd ();
@ -1883,7 +1883,7 @@ static void Att_ShowEvent (struct Att_Events *Events)
/***** Get parameters *****/ /***** Get parameters *****/
Events->SelectedOrder = Att_GetParamAttOrder (); Events->SelectedOrder = Att_GetParamAttOrder ();
Grp_GetParamWhichGroups (); Grp_GetParamWhichGroups ();
Events->CurrentPage = Pag_GetParamPagNum (Pag_ATmt_EVENTS); Events->CurrentPage = Pag_GetParamPagNum (Pag_ATT_EVENTS);
/***** Begin box and table *****/ /***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Event, Box_BoxTableBegin (NULL,Txt_Event,
@ -3530,12 +3530,12 @@ static void Att_PutCheckOrCross (bool Present)
if (Present) if (Present)
{ {
HTM_DIV_Begin ("class=\"ATmt_CHECK\" title=\"%s\"",Txt_Present); HTM_DIV_Begin ("class=\"ATT_CHECK\" title=\"%s\"",Txt_Present);
HTM_Txt ("✓"); HTM_Txt ("✓");
} }
else else
{ {
HTM_DIV_Begin ("class=\"ATmt_CROSS\" title=\"%s\"",Txt_Absent); HTM_DIV_Begin ("class=\"ATT_CROSS\" title=\"%s\"",Txt_Absent);
HTM_Txt ("✗"); HTM_Txt ("✗");
} }
HTM_DIV_End (); HTM_DIV_End ();

View File

@ -600,14 +600,18 @@ TODO: Salvador Romero Cort
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria. TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.51.27 (2021-03-20)" #define Log_PLATFORM_VERSION "SWAD 20.51.28 (2021-03-20)"
#define CSS_FILE "swad20.45.css" #define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.6.2.js" #define JS_FILE "swad20.6.2.js"
/* /*
TODO: Rename CENTRE to CENTER in help wiki. TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.51.27: Mar 20, 2021 API database table renamed. (308219 lines) Version 20.51.28: Mar 20, 2021 Assignment groups database table renamed. (308219 lines)
1 change necessary in database:
RENAME TABLE asg_grp TO asg_groups;
Version 20.51.27: Mar 20, 2021 Debug database table renamed. (308219 lines)
1 change necessary in database: 1 change necessary in database:
RENAME TABLE debug TO dbg_debug; RENAME TABLE debug TO dbg_debug;

View File

@ -247,9 +247,9 @@ mysql> DESCRIBE asg_assignments;
"UNIQUE INDEX(AsgCod)," "UNIQUE INDEX(AsgCod),"
"INDEX(CrsCod,Hidden))"); "INDEX(CrsCod,Hidden))");
/***** Table asg_grp *****/ /***** Table asg_groups *****/
/* /*
mysql> DESCRIBE asg_grp; mysql> DESCRIBE asg_groups;
+--------+---------+------+-----+---------+-------+ +--------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra | | Field | Type | Null | Key | Default | Extra |
+--------+---------+------+-----+---------+-------+ +--------+---------+------+-----+---------+-------+
@ -258,7 +258,7 @@ mysql> DESCRIBE asg_grp;
+--------+---------+------+-----+---------+-------+ +--------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec) 2 rows in set (0.00 sec)
*/ */
DB_CreateTable ("CREATE TABLE IF NOT EXISTS asg_grp (" DB_CreateTable ("CREATE TABLE IF NOT EXISTS asg_groups ("
"AsgCod INT NOT NULL," "AsgCod INT NOT NULL,"
"GrpCod INT NOT NULL," "GrpCod INT NOT NULL,"
"UNIQUE INDEX(AsgCod,GrpCod))"); "UNIQUE INDEX(AsgCod,GrpCod))");

View File

@ -2736,14 +2736,15 @@ static void Brw_CreateFoldersAssignmentsIfNotExist (long ZoneUsrCod)
" AND Folder<>''" " AND Folder<>''"
" AND (" " AND ("
"AsgCod NOT IN" "AsgCod NOT IN"
" (SELECT AsgCod FROM asg_grp)" " (SELECT AsgCod"
" FROM asg_groups)"
" OR " " OR "
"AsgCod IN" "AsgCod IN"
" (SELECT asg_grp.AsgCod" " (SELECT asg_groups.AsgCod"
" FROM asg_grp," " FROM crs_grp_usr,"
"crs_grp_usr" "asg_groups"
" WHERE crs_grp_usr.UsrCod=%ld" " WHERE crs_grp_usr.UsrCod=%ld"
" AND asg_grp.GrpCod=crs_grp_usr.GrpCod)" " AND asg_groups.GrpCod=crs_grp_usr.GrpCod)"
")", ")",
Gbl.Hierarchy.Crs.CrsCod,ZoneUsrCod); Gbl.Hierarchy.Crs.CrsCod,ZoneUsrCod);

View File

@ -1692,8 +1692,8 @@ void Grp_ListGrpsToEditAsgAttSvyEvtMch (struct GroupType *GrpTyp,
const char *Field; const char *Field;
} AssociationsToGrps[Grp_NUM_ASSOCIATIONS_TO_GROUPS] = } AssociationsToGrps[Grp_NUM_ASSOCIATIONS_TO_GROUPS] =
{ {
[Grp_ASSIGNMENT] = {"asg_grp" ,"AsgCod"}, [Grp_ASSIGNMENT] = {"asg_groups" ,"AsgCod"},
[Grp_ATmt_EVENT ] = {"att_grp" ,"AttCod"}, [Grp_ATT_EVENT ] = {"att_grp" ,"AttCod"},
[Grp_SURVEY ] = {"svy_grp" ,"SvyCod"}, [Grp_SURVEY ] = {"svy_grp" ,"SvyCod"},
[Grp_EXA_EVENT ] = {"exa_groups","SesCod"}, [Grp_EXA_EVENT ] = {"exa_groups","SesCod"},
[Grp_MATCH ] = {"mch_groups","MchCod"}, [Grp_MATCH ] = {"mch_groups","MchCod"},

View File

@ -136,7 +136,7 @@ typedef enum
typedef enum typedef enum
{ {
Grp_ASSIGNMENT, Grp_ASSIGNMENT,
Grp_ATmt_EVENT, Grp_ATT_EVENT,
Grp_SURVEY, Grp_SURVEY,
Grp_EXA_EVENT, Grp_EXA_EVENT,
Grp_MATCH, Grp_MATCH,

View File

@ -1279,16 +1279,16 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
" WHERE asg_assignments.AsgCod=%ld" " WHERE asg_assignments.AsgCod=%ld"
" AND asg_assignments.AsgCod NOT IN" " AND asg_assignments.AsgCod NOT IN"
" (SELECT AsgCod" " (SELECT AsgCod"
" FROM asg_grp" " FROM asg_groups"
" WHERE AsgCod=%ld)" " WHERE AsgCod=%ld)"
" AND asg_assignments.CrsCod=crs_usr.CrsCod" " AND asg_assignments.CrsCod=crs_usr.CrsCod"
" AND crs_usr.UsrCod<>%ld)" " AND crs_usr.UsrCod<>%ld)"
" UNION " " UNION "
"(SELECT DISTINCT crs_grp_usr.UsrCod" "(SELECT DISTINCT crs_grp_usr.UsrCod"
" FROM asg_grp," " FROM asg_groups,"
"crs_grp_usr" "crs_grp_usr"
" WHERE asg_grp.AsgCod=%ld" " WHERE asg_groups.AsgCod=%ld"
" AND asg_grp.GrpCod=crs_grp_usr.GrpCod" " AND asg_groups.GrpCod=crs_grp_usr.GrpCod"
" AND crs_grp_usr.UsrCod<>%ld)", " AND crs_grp_usr.UsrCod<>%ld)",
Cod,Cod,Gbl.Usrs.Me.UsrDat.UsrCod, Cod,Cod,Gbl.Usrs.Me.UsrDat.UsrCod,
Cod,Gbl.Usrs.Me.UsrDat.UsrCod); Cod,Gbl.Usrs.Me.UsrDat.UsrCod);

View File

@ -67,7 +67,7 @@ static const char *Pag_ParamNumPag[Pag_NUM_WHAT_PAGINATE] =
[Pag_EXAMS ] = "NumPagExa", [Pag_EXAMS ] = "NumPagExa",
[Pag_GAMES ] = "NumPagGam", [Pag_GAMES ] = "NumPagGam",
[Pag_SURVEYS ] = "NumPagSvy", [Pag_SURVEYS ] = "NumPagSvy",
[Pag_ATmt_EVENTS ] = "NumPagAtt", [Pag_ATT_EVENTS ] = "NumPagAtt",
[Pag_THREADS_FORUM ] = "NumPagThr", [Pag_THREADS_FORUM ] = "NumPagThr",
[Pag_POSTS_FORUM ] = "NumPagPst", [Pag_POSTS_FORUM ] = "NumPagPst",
[Pag_MESSAGES_RECEIVED] = "NumPagRcv", [Pag_MESSAGES_RECEIVED] = "NumPagRcv",
@ -211,7 +211,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1); Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
@ -338,7 +338,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1); Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
@ -451,7 +451,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage); Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
@ -576,7 +576,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage); Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
@ -688,7 +688,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage); Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
@ -801,7 +801,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
WhichGroups = Grp_GetParamWhichGroups (); WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups); Grp_PutParamWhichGroups (&WhichGroups);
break; break;
case Pag_ATmt_EVENTS: case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor); Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags); Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder); Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);

View File

@ -48,7 +48,7 @@ typedef enum
Pag_EXAMS = 3, Pag_EXAMS = 3,
Pag_GAMES = 4, Pag_GAMES = 4,
Pag_SURVEYS = 5, Pag_SURVEYS = 5,
Pag_ATmt_EVENTS = 6, Pag_ATT_EVENTS = 6,
Pag_THREADS_FORUM = 7, Pag_THREADS_FORUM = 7,
Pag_POSTS_FORUM = 8, Pag_POSTS_FORUM = 8,
Pag_MESSAGES_RECEIVED = 9, Pag_MESSAGES_RECEIVED = 9,