mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 10:45:23 +02:00
Version 16.103.2
This commit is contained in:
parent
b7d1f17328
commit
96f3bb963b
|
@ -184,17 +184,20 @@
|
||||||
// TODO: Draw future dates in attendance, surveys, assignments in blue?
|
// TODO: Draw future dates in attendance, surveys, assignments in blue?
|
||||||
// TODO: change checkbox "Obligar a los estudiantes a leer esta información"
|
// TODO: change checkbox "Obligar a los estudiantes a leer esta información"
|
||||||
|
|
||||||
|
// TODO: Fix bug: after registering a teacher in a course in USERS > Teachers, the confirmation is displayed in USERS > Others.
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.103.1 (2016-12-16)"
|
#define Log_PLATFORM_VERSION "SWAD 16.103.2 (2016-12-17)"
|
||||||
#define CSS_FILE "swad16.103.1.css"
|
#define CSS_FILE "swad16.103.1.css"
|
||||||
#define JS_FILE "swad16.101.js"
|
#define JS_FILE "swad16.101.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 16.103.2: Dec 17, 2016 Code refactoring in user enrollment. (211133 lines)
|
||||||
Version 16.103.1: Dec 16, 2016 Changes in layout of tabs. (211123 lines)
|
Version 16.103.1: Dec 16, 2016 Changes in layout of tabs. (211123 lines)
|
||||||
Version 16.103: Dec 16, 2016 Contextual help on course info. (211130 lines)
|
Version 16.103: Dec 16, 2016 Contextual help on course info. (211130 lines)
|
||||||
Version 16.102: Dec 15, 2016 Fixed bug in mail to students, reported by GitHub user raistmaj.
|
Version 16.102: Dec 15, 2016 Fixed bug in mail to students, reported by GitHub user raistmaj.
|
||||||
|
|
|
@ -223,11 +223,9 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,
|
||||||
// the user does not belong to the current course
|
// the user does not belong to the current course
|
||||||
|
|
||||||
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||||
Cns_QuietOrVerbose_t QuietOrVerbose,
|
|
||||||
Enr_KeepOrSetAccepted_t KeepOrSetAccepted)
|
Enr_KeepOrSetAccepted_t KeepOrSetAccepted)
|
||||||
{
|
{
|
||||||
extern const char *Usr_StringsUsrListTypeInDB[Usr_NUM_USR_LIST_TYPES];
|
extern const char *Usr_StringsUsrListTypeInDB[Usr_NUM_USR_LIST_TYPES];
|
||||||
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y;
|
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
|
|
||||||
/***** Check if user's role is allowed *****/
|
/***** Check if user's role is allowed *****/
|
||||||
|
@ -264,14 +262,6 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||||
If this user wants to receive notifications by email,
|
If this user wants to receive notifications by email,
|
||||||
activate the sending of a notification *****/
|
activate the sending of a notification *****/
|
||||||
Enr_NotifyAfterEnrollment (UsrDat,NewRole);
|
Enr_NotifyAfterEnrollment (UsrDat,NewRole);
|
||||||
|
|
||||||
/***** Show info message *****/
|
|
||||||
if (QuietOrVerbose == Cns_VERBOSE)
|
|
||||||
{
|
|
||||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_course_Y,
|
|
||||||
UsrDat->FullName,Gbl.CurrentCrs.Crs.FullName);
|
|
||||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1648,7 +1638,8 @@ static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole,
|
||||||
false)) // User does belong to current course, modify his/her role
|
false)) // User does belong to current course, modify his/her role
|
||||||
Enr_ModifyRoleInCurrentCrs (UsrDat,RegRemRole,Cns_QUIET);
|
Enr_ModifyRoleInCurrentCrs (UsrDat,RegRemRole,Cns_QUIET);
|
||||||
else
|
else
|
||||||
Enr_RegisterUsrInCurrentCrs (UsrDat,RegRemRole,Cns_QUIET,
|
/* Register user */
|
||||||
|
Enr_RegisterUsrInCurrentCrs (UsrDat,RegRemRole,
|
||||||
Enr_SET_ACCEPTED_TO_FALSE);
|
Enr_SET_ACCEPTED_TO_FALSE);
|
||||||
|
|
||||||
/***** Register user in the selected groups *****/
|
/***** Register user in the selected groups *****/
|
||||||
|
@ -3475,6 +3466,7 @@ void Enr_AcceptRegisterMeInCrs (void)
|
||||||
|
|
||||||
void Enr_CreateNewUsr (void)
|
void Enr_CreateNewUsr (void)
|
||||||
{
|
{
|
||||||
|
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y;
|
||||||
extern const char *Txt_The_ID_X_is_not_valid;
|
extern const char *Txt_The_ID_X_is_not_valid;
|
||||||
Rol_Role_t NewRole;
|
Rol_Role_t NewRole;
|
||||||
|
|
||||||
|
@ -3507,9 +3499,17 @@ void Enr_CreateNewUsr (void)
|
||||||
false)) // User does belong to current course, modify his/her role
|
false)) // User does belong to current course, modify his/her role
|
||||||
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE);
|
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE);
|
||||||
else
|
else
|
||||||
Enr_RegisterUsrInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE,
|
{
|
||||||
|
/* Register user */
|
||||||
|
Enr_RegisterUsrInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,
|
||||||
Enr_SET_ACCEPTED_TO_FALSE);
|
Enr_SET_ACCEPTED_TO_FALSE);
|
||||||
|
|
||||||
|
/* Show success message */
|
||||||
|
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_course_Y,
|
||||||
|
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||||
|
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||||
|
}
|
||||||
|
|
||||||
/***** Change user's groups *****/
|
/***** Change user's groups *****/
|
||||||
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
||||||
Grp_ChangeOtherUsrGrps ();
|
Grp_ChangeOtherUsrGrps ();
|
||||||
|
@ -3533,6 +3533,7 @@ void Enr_CreateNewUsr (void)
|
||||||
|
|
||||||
void Enr_ModifyUsr (void)
|
void Enr_ModifyUsr (void)
|
||||||
{
|
{
|
||||||
|
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y;
|
||||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
char UnsignedStr[10+1];
|
char UnsignedStr[10+1];
|
||||||
unsigned UnsignedNum;
|
unsigned UnsignedNum;
|
||||||
|
@ -3573,9 +3574,17 @@ void Enr_ModifyUsr (void)
|
||||||
false)) // User does belong to current course, modify his/her role
|
false)) // User does belong to current course, modify his/her role
|
||||||
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE);
|
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE);
|
||||||
else
|
else
|
||||||
Enr_RegisterUsrInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,Cns_VERBOSE,
|
{
|
||||||
|
/* Register user */
|
||||||
|
Enr_RegisterUsrInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole,
|
||||||
Enr_SET_ACCEPTED_TO_FALSE);
|
Enr_SET_ACCEPTED_TO_FALSE);
|
||||||
|
|
||||||
|
/* Show success message */
|
||||||
|
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_course_Y,
|
||||||
|
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||||
|
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||||
|
}
|
||||||
|
|
||||||
/***** Change user's groups *****/
|
/***** Change user's groups *****/
|
||||||
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,7 +76,6 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,
|
||||||
Rol_Role_t NewRole,
|
Rol_Role_t NewRole,
|
||||||
Cns_QuietOrVerbose_t QuietOrVerbose);
|
Cns_QuietOrVerbose_t QuietOrVerbose);
|
||||||
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||||
Cns_QuietOrVerbose_t QuietOrVerbose,
|
|
||||||
Enr_KeepOrSetAccepted_t KeepOrSetAccepted);
|
Enr_KeepOrSetAccepted_t KeepOrSetAccepted);
|
||||||
|
|
||||||
void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction);
|
void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user