diff --git a/icon/marker.svg b/icon/marker.svg new file mode 100644 index 00000000..dc0b8a91 --- /dev/null +++ b/icon/marker.svg @@ -0,0 +1 @@ + diff --git a/swad_changelog.h b/swad_changelog.h index 0b49c075..72a3c098 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -453,10 +453,15 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.73.4 (2019-03-12)" +#define Log_PLATFORM_VERSION "SWAD 18.73.6 (2019-03-12)" #define CSS_FILE "swad18.68.3.css" #define JS_FILE "swad18.64.js" /* + Version 18.73.6: Mar 12, 2019 Create new email message from list of users. This option will be active when email action allows selecting individual users. (239580 lines) + Copy the following icon to icon public directory: +sudo cp icon/marker.svg /var/www/html/swad/icon/ + + Version 18.73.5: Mar 12, 2019 Non-editing teachers can select users who don't belong to any group. (? lines) Version 18.73.4: Mar 12, 2019 Non-editing teachers can send email to students. (239555 lines) Version 18.73.3: Mar 12, 2019 Don't show icon in record to send a message is user has banned me. (239553 lines) Version 18.73.2: Mar 12, 2019 Only user's groups are selectable when sending a message. (239549 lines) diff --git a/swad_mail.c b/swad_mail.c index 53bfebe7..b7cfa1f9 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -884,7 +884,7 @@ void Mai_ListEmails (void) Usr_UsrDataConstructor (&UsrDat); /***** List the students' email addresses *****/ - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); for (NumUsr = 0, NumStdsWithEmail = 0, NumAcceptedStdsWithEmail = 0, StrAddresses[0] = '\0'; NumUsr < Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs; @@ -955,7 +955,7 @@ void Mai_ListEmails (void) StrAddresses, Txt_Create_email_message, The_ClassFormOutBoxBold[Gbl.Prefs.Theme]); - Ico_PutIconTextLink ("pen.svg", + Ico_PutIconTextLink ("marker.svg", Txt_Create_email_message); fprintf (Gbl.F.Out,"" "
"); diff --git a/swad_user.c b/swad_user.c index 03e17ae0..75f58995 100644 --- a/swad_user.c +++ b/swad_user.c @@ -8021,6 +8021,7 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t UsrsRole) extern const char *Txt_View_homework; extern const char *Txt_View_attendance; extern const char *Txt_Send_message; + extern const char *Txt_Create_email_message; extern const char *Txt_Follow; extern const char *Txt_Unfollow; const char *Label[Usr_LIST_USRS_NUM_OPTIONS] = @@ -8030,6 +8031,7 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t UsrsRole) Txt_View_homework, // Usr_OPTION_HOMEWORK Txt_View_attendance, // Usr_OPTION_ATTENDANCE Txt_Send_message, // Usr_OPTION_MESSAGE + Txt_Create_email_message, // Usr_OPTION_EMAIL // TODO: Not activated. Active it when email to users allows selecting individual users Txt_Follow, // Usr_OPTION_FOLLOW Txt_Unfollow, // Usr_OPTION_UNFOLLOW }; @@ -8056,25 +8058,32 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t UsrsRole) case Rol_STD: ICanChooseOption[Usr_OPTION_RECORDS] = ICanChooseOption[Usr_OPTION_MESSAGE] = - ICanChooseOption[Usr_OPTION_FOLLOW] = (Gbl.Scope.Current == Sco_SCOPE_CRS && - (Gbl.Usrs.Me.IBelongToCurrentCrs || + ICanChooseOption[Usr_OPTION_FOLLOW] = + ICanChooseOption[Usr_OPTION_UNFOLLOW] = (Gbl.Scope.Current == Sco_SCOPE_CRS && + (Gbl.Usrs.Me.Role.Logged == Rol_STD || + Gbl.Usrs.Me.Role.Logged == Rol_NET || + Gbl.Usrs.Me.Role.Logged == Rol_TCH || Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)); ICanChooseOption[Usr_OPTION_HOMEWORK] = - ICanChooseOption[Usr_OPTION_ATTENDANCE] = (Gbl.Usrs.Me.Role.Logged == Rol_NET || - Gbl.Usrs.Me.Role.Logged == Rol_TCH || - Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM); - ICanChooseOption[Usr_OPTION_UNFOLLOW] = true; + ICanChooseOption[Usr_OPTION_ATTENDANCE] = (Gbl.Scope.Current == Sco_SCOPE_CRS && + (Gbl.Usrs.Me.Role.Logged == Rol_NET || + Gbl.Usrs.Me.Role.Logged == Rol_TCH || + Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)); break; case Rol_TCH: ICanChooseOption[Usr_OPTION_RECORDS] = ICanChooseOption[Usr_OPTION_MESSAGE] = - ICanChooseOption[Usr_OPTION_FOLLOW] = (Gbl.Scope.Current == Sco_SCOPE_CRS); - - ICanChooseOption[Usr_OPTION_HOMEWORK] = (Gbl.Usrs.Me.Role.Logged == Rol_NET || - Gbl.Usrs.Me.Role.Logged == Rol_TCH || - Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM); - ICanChooseOption[Usr_OPTION_UNFOLLOW] = true; + ICanChooseOption[Usr_OPTION_FOLLOW] = + ICanChooseOption[Usr_OPTION_UNFOLLOW] = (Gbl.Scope.Current == Sco_SCOPE_CRS && + (Gbl.Usrs.Me.Role.Logged == Rol_STD || + Gbl.Usrs.Me.Role.Logged == Rol_NET || + Gbl.Usrs.Me.Role.Logged == Rol_TCH || + Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)); + ICanChooseOption[Usr_OPTION_HOMEWORK] = (Gbl.Scope.Current == Sco_SCOPE_CRS && + (Gbl.Usrs.Me.Role.Logged == Rol_NET || + Gbl.Usrs.Me.Role.Logged == Rol_TCH || + Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)); break; default: return false; @@ -8201,6 +8210,16 @@ void Usr_DoActionOnSeveralUsrs1 (void) break; } break; + case Usr_OPTION_EMAIL: // TODO: Not activated. Active it when email to users allows selecting individual users + switch (Gbl.Action.Act) + { + case ActDoActOnSevStd: + Gbl.Action.Act = ActMaiStd; + break; + default: + break; + } + break; case Usr_OPTION_FOLLOW: switch (Gbl.Action.Act) { diff --git a/swad_user.h b/swad_user.h index 765c176d..0aacf6af 100644 --- a/swad_user.h +++ b/swad_user.h @@ -115,7 +115,7 @@ typedef enum } Usr_ShowUsrsType_t; #define Usr_SHOW_USRS_TYPE_DEFAULT Usr_LIST_AS_CLASS_PHOTO -#define Usr_LIST_USRS_NUM_OPTIONS 7 +#define Usr_LIST_USRS_NUM_OPTIONS 8 typedef enum { Usr_OPTION_UNKNOWN = 0, @@ -123,8 +123,9 @@ typedef enum Usr_OPTION_HOMEWORK = 2, Usr_OPTION_ATTENDANCE = 3, Usr_OPTION_MESSAGE = 4, - Usr_OPTION_FOLLOW = 5, - Usr_OPTION_UNFOLLOW = 6, + Usr_OPTION_EMAIL = 5, // TODO: Not activated. Active it when email to users allows selecting individual users + Usr_OPTION_FOLLOW = 6, + Usr_OPTION_UNFOLLOW = 7, } Usr_ListUsrsOption_t; #define Usr_LIST_USRS_DEFAULT_OPTION Usr_OPTION_RECORDS