diff --git a/swad_account.c b/swad_account.c
index 196cd609..48daf996 100644
--- a/swad_account.c
+++ b/swad_account.c
@@ -313,6 +313,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
Gbl.RowEvenOdd);
UsrDat->Sex = Usr_SEX_UNKNOWN;
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
+ Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NED_TCH);
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
fprintf (Gbl.F.Out,""
"");
diff --git a/swad_action.c b/swad_action.c
index 6bc4e577..b141c4d0 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -2475,11 +2475,11 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqEnrSevStd */{1426,-1,TabUnk,ActLstStd ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqAdminStds ,NULL},
/* ActReqEnrSevTch */{1427,-1,TabUnk,ActLstTch ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqAdminTchs ,NULL},
- /* ActReqLstStdAtt */{1073,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ReqListStdsAttendanceCrs ,NULL},
+ /* ActReqLstStdAtt */{1073,-1,TabUnk,ActSeeAtt ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ReqListStdsAttendanceCrs ,NULL},
/* ActSeeLstMyAtt */{1473,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ListMyAttendanceCrs ,NULL},
/* ActPrnLstMyAtt */{1474,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Usr_PrintMyAttendanceCrs ,NULL},
- /* ActSeeLstStdAtt */{1074,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ListStdsAttendanceCrs ,NULL},
- /* ActPrnLstStdAtt */{1075,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Usr_PrintStdsAttendanceCrs ,NULL},
+ /* ActSeeLstStdAtt */{1074,-1,TabUnk,ActSeeAtt ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ListStdsAttendanceCrs ,NULL},
+ /* ActPrnLstStdAtt */{1075,-1,TabUnk,ActSeeAtt ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Usr_PrintStdsAttendanceCrs ,NULL},
/* ActFrmNewAtt */{1063,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Att_RequestCreatOrEditAttEvent ,NULL},
/* ActEdiOneAtt */{1064,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Att_RequestCreatOrEditAttEvent ,NULL},
/* ActNewAtt */{1065,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Att_RecFormAttEvent ,NULL},
@@ -5111,9 +5111,20 @@ void Act_AdjustCurrentAction (void)
the only action possible is show a form to ask for enrolment *****/
if (!Gbl.Usrs.Me.UsrDat.Accepted && Gbl.Action.Act != ActLogOut)
{
- Gbl.Action.Act = (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STD) ? ActReqAccEnrStd :
- ActReqAccEnrTch;
- Tab_SetCurrentTab ();
+ switch (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB)
+ {
+ case Rol_STD:
+ Gbl.Action.Act = ActReqAccEnrStd;
+ Tab_SetCurrentTab ();
+ break;
+ case Rol_NED_TCH:
+ case Rol_TCH:
+ Gbl.Action.Act = ActReqAccEnrTch;
+ Tab_SetCurrentTab ();
+ break;
+ default:
+ break;
+ }
return;
}
@@ -5171,6 +5182,8 @@ void Act_AdjustCurrentAction (void)
if (Gbl.Action.Act == ActMnu) // Do the following check sometimes, for example when the user changes the current tab
Gbl.CurrentCrs.Info.ShowMsgMustBeRead = Inf_GetIfIMustReadAnyCrsInfoInThisCrs ();
break;
+ case Rol_NED_TCH:
+ break;
case Rol_TCH:
if (Gbl.Action.Act == ActReqTst ||
Gbl.Action.Act == ActEdiTstQst)
diff --git a/swad_announcement.c b/swad_announcement.c
index 06dc970d..39771e8f 100644
--- a/swad_announcement.c
+++ b/swad_announcement.c
@@ -425,13 +425,15 @@ void Ann_ShowFormAnnouncement (void)
"
",
The_ClassForm[Gbl.Prefs.Theme],
Txt_Users);
- Rol_WriteSelectorRoles (1 << Rol_UNK |
- 1 << Rol_GST |
- 1 << Rol_STD |
+ Rol_WriteSelectorRoles (1 << Rol_UNK |
+ 1 << Rol_GST |
+ 1 << Rol_STD |
+ 1 << Rol_NED_TCH |
1 << Rol_TCH,
- 1 << Rol_UNK |
- 1 << Rol_GST |
- 1 << Rol_STD |
+ 1 << Rol_UNK |
+ 1 << Rol_GST |
+ 1 << Rol_STD |
+ 1 << Rol_NED_TCH |
1 << Rol_TCH,
false,false);
fprintf (Gbl.F.Out," | "
diff --git a/swad_assignment.c b/swad_assignment.c
index e4684d9b..6c02400c 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -589,6 +589,7 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams);
// no break
case Rol_STD:
+ case Rol_NED_TCH:
/***** Put form to print assignment *****/
Lay_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams);
break;
@@ -1713,27 +1714,35 @@ static bool Asg_CheckIfIBelongToCrsOrGrpsThisAssignment (long AsgCod)
{
char Query[512];
- if (Gbl.Usrs.Me.LoggedRole == Rol_STD ||
- Gbl.Usrs.Me.LoggedRole == Rol_TCH)
+ switch (Gbl.Usrs.Me.LoggedRole)
{
- // Students and teachers can edit assignments depending on groups
- /***** Get if I can edit an assignment from database *****/
- sprintf (Query,"SELECT COUNT(*) FROM assignments"
- " WHERE AsgCod=%ld"
- " AND "
- "("
- "AsgCod NOT IN (SELECT AsgCod FROM asg_grp)" // Assignment is for the whole course
- " OR "
- "AsgCod IN" // Assignment is for specific groups
- " (SELECT asg_grp.AsgCod FROM asg_grp,crs_grp_usr"
- " WHERE crs_grp_usr.UsrCod=%ld"
- " AND asg_grp.GrpCod=crs_grp_usr.GrpCod)"
- ")",
- AsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
- return (DB_QueryCOUNT (Query,"can not check if I can do an assignment") != 0);
+ case Rol_STD:
+ case Rol_NED_TCH:
+ case Rol_TCH:
+ // Students and teachers can do assignments depending on groups
+ /***** Get if I can do an assignment from database *****/
+ sprintf (Query,"SELECT COUNT(*) FROM assignments"
+ " WHERE AsgCod=%ld"
+ " AND "
+ "("
+ "AsgCod NOT IN (SELECT AsgCod FROM asg_grp)" // Assignment is for the whole course
+ " OR "
+ "AsgCod IN" // Assignment is for specific groups
+ " (SELECT asg_grp.AsgCod FROM asg_grp,crs_grp_usr"
+ " WHERE crs_grp_usr.UsrCod=%ld"
+ " AND asg_grp.GrpCod=crs_grp_usr.GrpCod)"
+ ")",
+ AsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
+ return (DB_QueryCOUNT (Query,"can not check if I can do an assignment") != 0);
+ case Rol_DEG_ADM:
+ case Rol_CTR_ADM:
+ case Rol_INS_ADM:
+ case Rol_SYS_ADM:
+ // Admins can view assignments
+ return true;
+ default:
+ return false;
}
- else
- return (Gbl.Usrs.Me.LoggedRole > Rol_TCH); // Admins can edit assignments
}
/*****************************************************************************/
diff --git a/swad_attendance.c b/swad_attendance.c
index 262fa85d..b7a8ec61 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -101,7 +101,9 @@ static void Att_RemoveAttEventFromCurrentCrs (long AttCod);
static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att);
static void Att_ListAttStudents (struct AttendanceEvent *Att);
-static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat,struct AttendanceEvent *Att);
+static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,
+ struct UsrData *UsrDat,
+ struct AttendanceEvent *Att);
static void Att_PutParamsCodGrps (long AttCod);
static void Att_GetNumStdsTotalWhoAreInAttEvent (struct AttendanceEvent *Att);
static unsigned Att_GetNumStdsFromAListWhoAreInAttEvent (long AttCod,long LstSelectedUsrCods[],unsigned NumStdsInList);
@@ -166,6 +168,7 @@ void Att_SeeAttEvents (void)
case Rol_STD:
Att_PutFormToListMyAttendance ();
break;
+ case Rol_NED_TCH:
case Rol_TCH:
case Rol_SYS_ADM:
Att_PutFormToListStdsAttendance ();
@@ -232,8 +235,8 @@ static void Att_ShowAllAttEvents (void)
{
/***** Table head *****/
Lay_StartTableWideMargin (2);
- fprintf (Gbl.F.Out,""
- " | "); // Column for contextual icons
+ fprintf (Gbl.F.Out,"
"
+ " | "); // Column for contextual icons
for (Order = Dat_START_TIME;
Order <= Dat_END_TIME;
Order++)
@@ -1822,6 +1825,7 @@ void Att_SeeOneAttEvent (void)
case Rol_STD:
Att_ListAttOnlyMeAsStudent (&Att);
break;
+ case Rol_NED_TCH:
case Rol_TCH:
case Rol_SYS_ADM:
/***** Show list of students *****/
@@ -1998,7 +2002,9 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
/************ Write a row of a table with the data of a student **************/
/*****************************************************************************/
-static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat,struct AttendanceEvent *Att)
+static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,
+ struct UsrData *UsrDat,
+ struct AttendanceEvent *Att)
{
extern const char *Txt_Present;
extern const char *Txt_Absent;
@@ -2007,6 +2013,37 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
bool ShowPhoto;
char CommentStd[Cns_MAX_BYTES_TEXT + 1];
char CommentTch[Cns_MAX_BYTES_TEXT + 1];
+ bool ICanChangeStdAttendance;
+ bool ICanEditStdComment;
+ bool ICanEditTchComment;
+
+ /***** Set who can edit *****/
+ switch (Gbl.Usrs.Me.LoggedRole)
+ {
+ case Rol_STD:
+ // A student can see only her/his attendance
+ if (UsrDat->UsrCod != Gbl.Usrs.Me.UsrDat.UsrCod)
+ Lay_ShowErrorAndExit ("Wrong call.");
+ ICanChangeStdAttendance = false;
+ ICanEditStdComment = Att->Open; // Attendance event is open
+ ICanEditTchComment = false;
+ break;
+ case Rol_TCH:
+ ICanChangeStdAttendance = true;
+ ICanEditStdComment = false;
+ ICanEditTchComment = true;
+ break;
+ case Rol_SYS_ADM:
+ ICanChangeStdAttendance = true;
+ ICanEditStdComment = false;
+ ICanEditTchComment = false;
+ break;
+ default:
+ ICanChangeStdAttendance = false;
+ ICanEditStdComment = false;
+ ICanEditTchComment = false;
+ break;
+ }
/***** Check if this student is already registered in the current event *****/
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att->AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
@@ -2036,7 +2073,7 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
UsrDat->EncryptedUsrCod);
if (Present) // This student has attended to the event?
fprintf (Gbl.F.Out," checked=\"checked\"");
- if (Gbl.Usrs.Me.LoggedRole == Rol_STD) // A student can not change his attendance
+ if (!ICanChangeStdAttendance)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," />"
"");
@@ -2084,13 +2121,13 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
/***** Student's comment: write form or text */
fprintf (Gbl.F.Out,"",
Gbl.RowEvenOdd);
- if (Gbl.Usrs.Me.LoggedRole == Rol_STD && Att->Open) // Show with form
+ if (ICanEditStdComment) // Show with form
fprintf (Gbl.F.Out,"",
UsrDat->UsrCod,CommentStd);
- else // Show without form
+ else // Show without form
{
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
CommentStd,Cns_MAX_BYTES_TEXT,false);
@@ -2101,13 +2138,13 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
/***** Teacher's comment: write form, text or nothing */
fprintf (Gbl.F.Out," | ",
Gbl.RowEvenOdd);
- if (Gbl.Usrs.Me.LoggedRole == Rol_TCH) // Show with form
+ if (ICanEditTchComment) // Show with form
fprintf (Gbl.F.Out,"",
UsrDat->UsrCod,CommentTch);
- else if (Att->CommentTchVisible) // Show without form
+ else if (Att->CommentTchVisible) // Show without form
{
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
CommentTch,Cns_MAX_BYTES_TEXT,false);
diff --git a/swad_centre.c b/swad_centre.c
index f6b59dc8..9bf3eb3e 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -631,6 +631,19 @@ static void Ctr_Configuration (bool PrintView)
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_TCH,Gbl.CurrentCtr.Ctr.CtrCod));
+ /***** Number of non-editing teachers in courses of this centre *****/
+ fprintf (Gbl.F.Out," |
"
+ ""
+ "%s:"
+ " | "
+ ""
+ "%u"
+ " | "
+ "
",
+ The_ClassForm[Gbl.Prefs.Theme],
+ Txt_ROLES_PLURAL_Abc[Rol_NED_TCH][Usr_SEX_UNKNOWN],
+ Usr_GetNumUsrsInCrssOfCtr (Rol_NED_TCH,Gbl.CurrentCtr.Ctr.CtrCod));
+
/***** Number of students in courses of this centre *****/
fprintf (Gbl.F.Out,""
""
@@ -647,15 +660,16 @@ static void Ctr_Configuration (bool PrintView)
/***** Number of users in courses of this centre *****/
fprintf (Gbl.F.Out," |
"
""
- "%s + %s:"
+ "%s + %s + %s:"
" | "
""
"%u"
" | "
"
",
The_ClassForm[Gbl.Prefs.Theme],
- Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
- Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
+ Txt_ROLES_PLURAL_Abc[Rol_TCH ][Usr_SEX_UNKNOWN],
+ Txt_ROLES_PLURAL_Abc[Rol_NED_TCH][Usr_SEX_UNKNOWN],
+ Txt_ROLES_PLURAL_Abc[Rol_STD ][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_UNK,Gbl.CurrentCtr.Ctr.CtrCod));
}
diff --git a/swad_changelog.h b/swad_changelog.h
index b3186a07..a7fabe09 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -233,13 +233,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.220 (2017-05-19)"
+#define Log_PLATFORM_VERSION "SWAD 16.220.1 (2017-05-20)"
#define CSS_FILE "swad16.209.3.css"
#define JS_FILE "swad16.206.3.js"
// 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 16.220.1: May 20, 2017 Changes related with new role. Not finished. (219332 lines)
Version 16.220: May 19, 2017 Changes permission of actions after creating new role. Not finished. (219227 lines)
Version 16.219: May 19, 2017 New role: non-editing teacher. Not finished. (219226 lines)
Version 16.218: May 19, 2017 Changes in permissions of actions. (218888 lines)
diff --git a/swad_chat.c b/swad_chat.c
index 832653b3..25b9c4b9 100644
--- a/swad_chat.c
+++ b/swad_chat.c
@@ -140,8 +140,7 @@ void Cht_ShowListOfAvailableChatRooms (void)
Txt_Chat_rooms);
/***** Link to chat available for all the users *****/
- IsLastItemInLevel[1] = (Gbl.Usrs.Me.LoggedRole != Rol_STD &&
- Gbl.Usrs.Me.LoggedRole != Rol_TCH &&
+ IsLastItemInLevel[1] = (!Gbl.Usrs.Me.IBelongToCurrentCrs &&
!Gbl.Usrs.Me.MyDegs.Num);
sprintf (ThisRoomFullName,"%s (%s)",Txt_General,Txt_SEX_PLURAL_abc[Usr_SEX_ALL]);
Cht_WriteLinkToChat1 ("GBL_USR",Txt_SEX_PLURAL_Abc[Usr_SEX_ALL],ThisRoomFullName,1,IsLastItemInLevel);
@@ -157,7 +156,8 @@ void Cht_ShowListOfAvailableChatRooms (void)
switch (Gbl.Usrs.Me.LoggedRole)
{
case Rol_STD:
- sprintf (ThisRoomFullName,"%s (%s)",Txt_General,Txt_ROLES_PLURAL_abc[Rol_STD][Usr_SEX_ALL]);
+ sprintf (ThisRoomFullName,"%s (%s)",
+ Txt_General,Txt_ROLES_PLURAL_abc[Rol_STD][Usr_SEX_ALL]);
Cht_WriteLinkToChat1 ("GBL_STD",Txt_Students_ABBREVIATION,ThisRoomFullName,1,IsLastItemInLevel);
fprintf (Gbl.F.Out,"");
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_TCH);
+ Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_NED_TCH);
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_STD);
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_GST);
@@ -528,6 +532,7 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
Gbl.Usrs.Connected.NumUsrs = 0;
Gbl.Usrs.Connected.NumUsrsToList = 0;
Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Rol_TCH);
+ Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Rol_NED_TCH);
Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Rol_STD);
fprintf (Gbl.F.Out,"");
@@ -762,6 +767,7 @@ static void Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Rol_Role_t
" AND connected.UsrCod=usr_data.UsrCod");
break;
case Rol_STD:
+ case Rol_NED_TCH:
case Rol_TCH:
switch (Gbl.Scope.Current)
{
@@ -988,10 +994,21 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
/***** Write full name and link *****/
fprintf (Gbl.F.Out,"",
Font,Gbl.RowEvenOdd);
- Act_FormStartUnique ((Role == Rol_STD) ? ActSeeRecOneStd :
- ActSeeRecOneTch); // Must be unique because
- // the list of connected users
- // is dynamically updated via AJAX
+ // The form must be unique because
+ // the list of connected users
+ // is dynamically updated via AJAX
+ switch (Role)
+ {
+ case Rol_STD:
+ Act_FormStartUnique (ActSeeRecOneStd);
+ break;
+ case Rol_NED_TCH:
+ case Rol_TCH:
+ Act_FormStartUnique (ActSeeRecOneTch);
+ break;
+ default:
+ Lay_ShowErrorAndExit ("Wrong role");
+ }
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
fprintf (Gbl.F.Out,""); // Limited width
Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
@@ -1052,6 +1069,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
" ORDER BY Dif");
break;
case Rol_STD:
+ case Rol_NED_TCH:
case Rol_TCH:
switch (Gbl.Scope.Current)
{
@@ -1182,8 +1200,18 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
Font,Gbl.RowEvenOdd);
if (PutLinkToRecord)
{
- Act_FormStart ((Role == Rol_STD) ? ActSeeRecOneStd :
- ActSeeRecOneTch);
+ switch (Role)
+ {
+ case Rol_STD:
+ Act_FormStart (ActSeeRecOneStd);
+ break;
+ case Rol_NED_TCH:
+ case Rol_TCH:
+ Act_FormStart (ActSeeRecOneTch);
+ break;
+ default:
+ Lay_ShowErrorAndExit ("Wrong role");
+ }
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
}
fprintf (Gbl.F.Out," "); // Limited width
diff --git a/swad_user.c b/swad_user.c
index 93414190..cce06c31 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -3706,7 +3706,7 @@ unsigned Usr_GetNumUsrsInCrssOfDeg (Rol_Role_t Role,long DegCod)
/*****************************************************************************/
/************ Count how many users with a role belong to a centre ************/
/*****************************************************************************/
-// Here Rol_UNK means students or teachers
+// Here Rol_UNK means any user (students, non-editing teachers or teachers)
unsigned Usr_GetNumUsrsInCrssOfCtr (Rol_Role_t Role,long CtrCod)
{
|