diff --git a/swad_ID.c b/swad_ID.c
index 59727802b..16eb8f321 100644
--- a/swad_ID.c
+++ b/swad_ID.c
@@ -512,7 +512,7 @@ void ID_ShowFormOthIDs (void)
Lay_StartRoundFrame (NULL,Txt_ID,NULL,NULL);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
/***** Form with the user's ID *****/
fprintf (Gbl.F.Out,"
");
@@ -692,7 +692,7 @@ void ID_RemoveOtherUsrID (void)
ID_GetListIDsFromUsrCod (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
}
else // User not found
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
@@ -807,7 +807,7 @@ void ID_NewOtherUsrID (void)
ID_GetListIDsFromUsrCod (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
}
else // User not found
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
@@ -1014,7 +1014,7 @@ static void ID_ReqConfOrConfOtherUsrID (ID_ReqConfOrConfID_t ReqConfOrConfID)
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
}
else // User not found
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
diff --git a/swad_changelog.h b/swad_changelog.h
index 25bd3e812..3cefd107c 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -166,13 +166,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.63.6 (2016-11-17)"
+#define Log_PLATFORM_VERSION "SWAD 16.64 (2016-11-17)"
#define CSS_FILE "swad16.60.1.css"
#define JS_FILE "swad16.46.1.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.64: Nov 17, 2016 Contextual help on students.
+ Code refactoring in record cards. (207231 lines)
Version 16.63.6: Nov 16, 2016 Contextual help on email unconfirmed. (207184 lines)
Version 16.63.5: Nov 16, 2016 Contextual help on edition of countries. (207180 lines)
Version 16.63.4: Nov 16, 2016 Contextual help on edition of institutions. (207177 lines)
diff --git a/swad_enrollment.c b/swad_enrollment.c
index f241578d8..d139f6c0a 100644
--- a/swad_enrollment.c
+++ b/swad_enrollment.c
@@ -3112,7 +3112,7 @@ static void Enr_ShowFormToEditOtherUsr (void)
fprintf (Gbl.F.Out,"");
/***** User's record *****/
- Rec_ShowSharedUsrRecord (Rec_FORM_MODIFY_RECORD_OTHER_EXISTING_USR,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_EXISTING_USR_FORM,&Gbl.Usrs.Other.UsrDat);
}
/*****************************************************************************/
diff --git a/swad_global.h b/swad_global.h
index f857ddd55..8937218b3 100644
--- a/swad_global.h
+++ b/swad_global.h
@@ -401,7 +401,7 @@ struct Globals
struct
{
struct UsrData *UsrDat;
- Rec_RecordViewType_t TypeOfView;
+ Rec_SharedRecordViewType_t TypeOfView;
} Record;
struct
{
diff --git a/swad_help.c b/swad_help.c
index 3cfee4a60..fc59a6e80 100644
--- a/swad_help.c
+++ b/swad_help.c
@@ -93,6 +93,14 @@ const char *Hlp_ASSESSMENT_Marks = WIKI "ASSESSMENT.Marks";
const char *Hlp_USERS_Groups = WIKI "USERS.Groups";
+const char *Hlp_USERS_Students = WIKI "USERS.Students";
+const char *Hlp_USERS_Students_shared_record_card = WIKI "USERS.Students#shared-record-card";
+const char *Hlp_USERS_Students_course_record_card = WIKI "USERS.Students#course-record-card";
+
+const char *Hlp_USERS_Teachers = WIKI "USERS.Teachers";
+
+const char *Hlp_USERS_Others_guests = WIKI "USERS.Others#guests";
+
const char *Hlp_USERS_Attendance = WIKI "USERS.Attendance";
/***** SOCIAL tab *****/
diff --git a/swad_mail.c b/swad_mail.c
index 52f8e6d3b..20c3b44bb 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -1127,7 +1127,7 @@ void Mai_ShowFormOthEmail (void)
Lay_StartRoundFrame (NULL,Txt_Email,NULL,NULL);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
/***** Form with the user's email *****/
fprintf (Gbl.F.Out,"");
@@ -1324,7 +1324,7 @@ void Mai_RemoveOtherUsrEmail (void)
Mai_RemoveEmail (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
}
else // User not found
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
@@ -1403,7 +1403,7 @@ void Mai_NewOtherUsrEmail (void)
(Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)); // It's me?
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
}
else // User not found
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
diff --git a/swad_password.c b/swad_password.c
index 47d2a7f30..c211059ec 100644
--- a/swad_password.c
+++ b/swad_password.c
@@ -809,7 +809,7 @@ void Pwd_ShowFormOthPwd (void)
Lay_StartRoundFrame (NULL,Txt_Password,NULL,NULL);
/***** Show user's record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
/***** Form to change password *****/
/* Start form */
diff --git a/swad_profile.c b/swad_profile.c
index 684e15a23..526ac72d2 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -283,7 +283,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
}
/***** Common record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_PUBLIC,UsrDat);
/***** Show details of user's profile *****/
Prf_ShowDetailsUserProfile (UsrDat);
diff --git a/swad_record.c b/swad_record.c
index b53777006..15751ccbe 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -72,15 +72,16 @@ static void Rec_WriteHeadingRecordFields (void);
static void Rec_GetFieldByCod (long FieldCod,char *Name,unsigned *NumLines,Rec_VisibilityRecordFields_t *Visibility);
static void Rec_ShowRecordOneStdCrs (void);
-static void Rec_ListRecordsStds (Rec_RecordViewType_t TypeOfView);
+static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
+ Rec_CourseRecordViewType_t CrsTypeOfView);
static void Rec_ShowRecordOneTchCrs (void);
static void Rec_ShowLinkToPrintPreviewOfRecords (void);
static void Rec_GetParamRecordsPerPage (void);
static void Rec_WriteFormShowOfficeHours (bool ShowOfficeHours,const char *ListUsrCods);
static bool Rec_GetParamShowOfficeHours (void);
-static void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat,
- const char *Anchor);
+static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
+ struct UsrData *UsrDat,const char *Anchor);
static void Rec_ShowMyCrsRecordUpdated (void);
static void Rec_PutIconsCommands (void);
@@ -94,25 +95,25 @@ static void Rec_ShowFullName (struct UsrData *UsrDat);
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks);
static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData);
static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat,
- Rec_RecordViewType_t TypeOfView);
+ Rec_SharedRecordViewType_t TypeOfView);
static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm);
static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm);
static void Rec_ShowRole (struct UsrData *UsrDat,
- Rec_RecordViewType_t TypeOfView,
+ Rec_SharedRecordViewType_t TypeOfView,
const char *ClassForm);
static void Rec_ShowSurname1 (struct UsrData *UsrDat,
- Rec_RecordViewType_t TypeOfView,
+ Rec_SharedRecordViewType_t TypeOfView,
bool DataForm,
const char *ClassForm);
static void Rec_ShowSurname2 (struct UsrData *UsrDat,
bool DataForm,
const char *ClassForm);
static void Rec_ShowFirstName (struct UsrData *UsrDat,
- Rec_RecordViewType_t TypeOfView,
+ Rec_SharedRecordViewType_t TypeOfView,
bool DataForm,
const char *ClassForm);
static void Rec_ShowCountry (struct UsrData *UsrDat,
- Rec_RecordViewType_t TypeOfView,
+ Rec_SharedRecordViewType_t TypeOfView,
const char *ClassForm);
static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
bool ShowData,bool DataForm,
@@ -939,8 +940,8 @@ void Rec_ListRecordsGsts (void)
extern const char *Txt_You_must_select_one_ore_more_users;
unsigned NumUsrs = 0;
const char *Ptr;
- Rec_RecordViewType_t TypeOfView = (Gbl.Action.Act == ActSeeRecSevGst) ? Rec_RECORD_LIST :
- Rec_RECORD_PRINT;
+ Rec_SharedRecordViewType_t TypeOfView = (Gbl.Action.Act == ActSeeRecSevGst) ? Rec_SHA_RECORD_LIST :
+ Rec_SHA_RECORD_PRINT;
struct UsrData UsrDat;
/***** Assign users listing type depending on current action *****/
@@ -1059,7 +1060,7 @@ static void Rec_ShowRecordOneStdCrs (void)
fprintf (Gbl.F.Out,"");
/***** Common record *****/
- Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
+ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
/***** Record of the student in the course *****/
/* Get list of fields of records in current course */
@@ -1069,10 +1070,10 @@ static void Rec_ShowRecordOneStdCrs (void)
{
if (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
- Rec_ShowCrsRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
+ Rec_ShowCrsRecord (Rec_CRS_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
else if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT &&
Gbl.Usrs.Me.UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod) // It's me
- Rec_ShowCrsRecord (Rec_FORM_MY_COURSE_RECORD_AS_STUDENT,&Gbl.Usrs.Other.UsrDat,NULL);
+ Rec_ShowCrsRecord (Rec_CRS_MY_RECORD_AS_STUDENT_FORM,&Gbl.Usrs.Other.UsrDat,NULL);
}
/* Free list of fields of records */
@@ -1085,15 +1086,18 @@ static void Rec_ShowRecordOneStdCrs (void)
void Rec_ListRecordsStdsForEdit (void)
{
- Rec_ListRecordsStds (Rec_RECORD_LIST);
+ Rec_ListRecordsStds (Rec_SHA_RECORD_LIST,
+ Rec_CRS_RECORD_LIST);
}
void Rec_ListRecordsStdsForPrint (void)
{
- Rec_ListRecordsStds (Rec_RECORD_PRINT);
+ Rec_ListRecordsStds (Rec_SHA_RECORD_PRINT,
+ Rec_CRS_RECORD_PRINT);
}
-static void Rec_ListRecordsStds (Rec_RecordViewType_t TypeOfView)
+static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
+ Rec_CourseRecordViewType_t CrsTypeOfView)
{
extern const char *Txt_You_must_select_one_ore_more_students;
unsigned NumUsr = 0;
@@ -1105,7 +1109,7 @@ static void Rec_ListRecordsStds (Rec_RecordViewType_t TypeOfView)
Gbl.Usrs.Listing.RecsUsrs = Rec_RECORD_USERS_STUDENTS;
/***** Get parameter with number of user records per page (only for printing) *****/
- if (TypeOfView == Rec_RECORD_PRINT)
+ if (ShaTypeOfView == Rec_SHA_RECORD_PRINT)
Rec_GetParamRecordsPerPage ();
/***** Get list of selected students *****/
@@ -1122,7 +1126,7 @@ static void Rec_ListRecordsStds (Rec_RecordViewType_t TypeOfView)
/***** Get list of fields of records in current course *****/
Rec_GetListRecordFieldsInCurrentCrs ();
- if (TypeOfView == Rec_RECORD_LIST)
+ if (ShaTypeOfView == Rec_SHA_RECORD_LIST)
{
fprintf (Gbl.F.Out,"