Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-49440 msgcntr modify the default behavior for 'mark as read' #12948

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private void setMasks() {
noneMask.put(PermissionLevel.CHANGE_SETTINGS,Boolean.valueOf(false));
noneMask.put(PermissionLevel.POST_TO_GRADEBOOK, Boolean.valueOf(false));
noneMask.put(PermissionLevel.READ, Boolean.valueOf(false));
noneMask.put(PermissionLevel.MARK_AS_READ,Boolean.valueOf(false));
noneMask.put(PermissionLevel.MARK_AS_NOT_READ,Boolean.valueOf(true));
noneMask.put(PermissionLevel.MODERATE_POSTINGS, Boolean.valueOf(false));
noneMask.put(PermissionLevel.IDENTIFY_ANON_AUTHORS, Boolean.valueOf(false));
noneMask.put(PermissionLevel.DELETE_OWN, Boolean.valueOf(false));
Expand All @@ -513,7 +513,7 @@ private void setMasks() {
contributorMask.put(PermissionLevel.CHANGE_SETTINGS,Boolean.valueOf(false));
contributorMask.put(PermissionLevel.POST_TO_GRADEBOOK, Boolean.valueOf(false));
contributorMask.put(PermissionLevel.READ, Boolean.valueOf(true));
contributorMask.put(PermissionLevel.MARK_AS_READ,Boolean.valueOf(true));
contributorMask.put(PermissionLevel.MARK_AS_NOT_READ,Boolean.valueOf(false));
contributorMask.put(PermissionLevel.MODERATE_POSTINGS, Boolean.valueOf(false));
contributorMask.put(PermissionLevel.IDENTIFY_ANON_AUTHORS, Boolean.valueOf(false));
contributorMask.put(PermissionLevel.DELETE_OWN, Boolean.valueOf(false));
Expand All @@ -531,7 +531,7 @@ private void setMasks() {
ownerMask.put(PermissionLevel.CHANGE_SETTINGS,Boolean.valueOf(true));
ownerMask.put(PermissionLevel.POST_TO_GRADEBOOK, Boolean.valueOf(true));
ownerMask.put(PermissionLevel.READ, Boolean.valueOf(true));
ownerMask.put(PermissionLevel.MARK_AS_READ,Boolean.valueOf(true));
ownerMask.put(PermissionLevel.MARK_AS_NOT_READ,Boolean.valueOf(false));
ownerMask.put(PermissionLevel.MODERATE_POSTINGS, Boolean.valueOf(true));
ownerMask.put(PermissionLevel.IDENTIFY_ANON_AUTHORS, Boolean.valueOf(false));
ownerMask.put(PermissionLevel.DELETE_OWN, Boolean.valueOf(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cdfm_toolbar_separator = |
cdfm_moderator_comment_text = Comment By
cdfm_moderator_comment_text_anon = Comment By Moderator
cdfm_moderate = Moderate
cdfm_mark_as_read=Mark as Read
cdfm_mark_as_not_read=Mark as Not Read
cdfm_readby= - Read by:
stat_list = Statistics & Grading
stat_list_student = Statistics
Expand Down Expand Up @@ -183,7 +183,7 @@ cdfm_mark_check_as_read=Mark Read
cdfm_mark_check_as_unread=Mark Unread
cdfm_mark_check_as_delete=Delete
cdfm_mark_check_move_to_folder=Move
cdfm_mark_all_as_read=Mark All as Read
cdfm_mark_all_as_not_read=Mark All as Not Read
cdfm_reply=Reply
cdfm_print=Print
cdfm_printer_friendly=Printer Friendly Format
Expand Down Expand Up @@ -303,7 +303,7 @@ cdfm_failed_create_topic=Failed to create new topic
cdfm_failed_rend_message=Failed Rending Messages
cdfm_view_under_construct=This view is under contruction
cdfm_lost_association=Lost association with current topic
cdfm_no_message_mark_read=No message selected to mark as read. Please select a message.
cdfm_no_message_mark_no_read=No message selected to mark as not read. Please select a message.
cdfm_grade_successful=Grade submission successful.
cdfm_grade_greater_than_zero=Please input a number greater than or equal to 0.
cdfm_grade_decimal_warn=Please input number with 2 or fewer digits after decimal point.
Expand Down Expand Up @@ -413,7 +413,7 @@ perm_revise_any=Edit Any
perm_revise_own=Edit Own
perm_delete_any=Delete Any
perm_delete_own=Delete Own
perm_mark_as_read=Mark as Read
perm_mark_as_not_read=Mark as Not Read
perm_choose_assignment_head=Grading
perm_choose_assignment=Gradebook item:
perm_choose_assignment_none_f=You can associate a grade from the Gradebook to this forum, but there are no existing Gradebook items.
Expand Down Expand Up @@ -655,7 +655,7 @@ pvt_missing_body = You must write your message before you can send it.
pvt_missing_body_draft =You must write your message before you can save it.
pvt_confirm_msg_delete = Are you sure you want to delete this message? If yes, click Delete to delete the message.
pvt_enter_search_text = Please enter text for search.
pvt_no_message_mark_read=No message selected to mark as read. Please select a message.
pvt_no_message_mark_no_read=No message selected to mark as not read. Please select a message.
pvt_no_message_mark_delete=No message selected for deletion. Please select a message.
pvt_no_message_mark_move=No message selected to move to another folder. Please select a message.
pvt_deleted_success=The message(s) you selected have been successfully moved to the Deleted folder.
Expand Down Expand Up @@ -698,7 +698,7 @@ pvt_scheduler_send= Schedule when this message will be sent
pvt_scheduler_send_as_email= Schedule the message to be sent at the selected date and time
pvt_scheduler_send_date= Date:
syn_anon=No unread message counts as you aren't logged in.
syn_mark_as_read=Mark all as read
syn_mark_as_not_read=Mark all as not read
syn_site_heading=Site
syn_private_heading=New Messages
syn_discussion_heading=New in Discussions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cdfm_toolbar_separator=|
cdfm_moderator_comment_text=Comentario de
cdfm_moderator_comment_text_anon=Comentario del moderador
cdfm_moderate=Moderar
cdfm_mark_as_read=Marcar como le\u00eddo
cdfm_mark_as_not_read=Marcar como no le\u00eddo
cdfm_readby=- Le\u00eddo por\:
stat_list=Estad\u00edsticas y calificaci\u00f3n
stat_list_student=Estad\u00edsticas
Expand Down Expand Up @@ -183,7 +183,7 @@ cdfm_mark_check_as_read=Marcar le\u00eddos
cdfm_mark_check_as_unread=Marcar no le\u00eddos
cdfm_mark_check_as_delete=Eliminar
cdfm_mark_check_move_to_folder=Mover
cdfm_mark_all_as_read=Marcar todos como le\u00eddos
cdfm_mark_all_as_not_read=Marcar todos como no le\u00eddos
cdfm_reply=Responder
cdfm_print=Imprimir
cdfm_printer_friendly=Versi\u00f3n imprimible
Expand Down Expand Up @@ -409,7 +409,7 @@ perm_revise_any=Editar cualquiera
perm_revise_own=Editar propios
perm_delete_any=Eliminar cualquiera
perm_delete_own=Eliminar propios
perm_mark_as_read=Marcar como le\u00eddo
perm_mark_as_read=Marcar como no le\u00eddo
perm_choose_assignment_head=Calificaci\u00f3n
perm_choose_assignment=\u00cdtem de calificaci\u00f3n\:
perm_choose_assignment_none_f=Puede asociar un \u00edtem de Calificaciones con este foro, sin embargo, no hay todav\u00eda \u00edtems creados.
Expand Down Expand Up @@ -651,7 +651,7 @@ pvt_missing_body=Debe escribir el mensaje antes de enviarlo.
pvt_missing_body_draft=Debe escribir el mensaje antes de guardarlo.
pvt_confirm_msg_delete=\u00bfEst\u00e1 seguro que desea eliminar este mensaje? En caso afirmativo, haga clic en Eliminar para eliminar el mensaje.
pvt_enter_search_text=Introduzca el texto de b\u00fasqueda.
pvt_no_message_mark_read=No se ha seleccionado ning\u00fan mensaje para marcarlo como le\u00eddo. Seleccione un mensaje.
pvt_no_message_mark_no_read=No se ha seleccionado ning\u00fan mensaje para marcarlo como no le\u00eddo. Seleccione un mensaje.
pvt_no_message_mark_delete=No hay mensajes seleccionados para eliminar. Seleccione un mensaje.
pvt_no_message_mark_move=No hay mensajes seleccionados para mover a otra carpeta. Seleccione un mensaje.
pvt_deleted_success=Los mensajes seleccionados se han movido correctamente a la carpeta de mensajes Eliminados.
Expand Down Expand Up @@ -694,7 +694,7 @@ pvt_scheduler_send=Programar env\u00edo
pvt_scheduler_send_as_email=Programar el env\u00edo del mensaje en la fecha y hora seleccionada
pvt_scheduler_send_date=Fecha\:
syn_anon=Si no hay mensajes sin leer, se considera que no est\u00e1 conectado.
syn_mark_as_read=Marcar todos como le\u00eddos
syn_mark_as_not_read=Marcar todos como no le\u00eddos
syn_site_heading=Sitio
syn_private_heading=Mensajes nuevos
syn_discussion_heading=Nuevos mensajes en foros
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class BulkPermission {
private boolean changeSettings;
private boolean deleteAny;
private boolean deleteOwn;
private boolean markAsRead;
private boolean markAsNotRead;
private boolean moderatePostings;
private boolean movePostings;
private boolean newResponse;
Expand All @@ -35,7 +35,7 @@ public class BulkPermission {
private boolean reviseOwn;

public void setAllPermissions(boolean toTrueOrFalse) {
changeSettings = deleteAny = deleteOwn = markAsRead = moderatePostings = movePostings = newTopic
changeSettings = deleteAny = deleteOwn = markAsNotRead = moderatePostings = movePostings = newTopic
= newResponse = newResponseToResponse = postToGradebook = read = reviseAny = reviseOwn
= toTrueOrFalse;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface DefaultPermissionsManager
public static final String FUNCTION_REVISE_OWN="messagecenter.reviseOwn";
public static final String FUNCTION_DELETE_ANY="messagecenter.deleteAny";
public static final String FUNCTION_DELETE_OWN="messagecenter.deleteOwn";
public static final String FUNCTION_MARK_AS_READ="messagecenter.markAsRead";
public static final String FUNCTION_MARK_AS_NOT_READ="messagecenter.markAsNotRead";

public static final String MESSAGE_FUNCTION_PREFIX="msg.";
public static final String MESSAGE_FUNCTION_EMAIL= MESSAGE_FUNCTION_PREFIX +"emailout";
Expand Down Expand Up @@ -83,6 +83,6 @@ public interface DefaultPermissionsManager

public boolean isDeleteOwn(String role);

public boolean isMarkAsRead(String role);
public boolean isMarkAsNotRead(String role);

}
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ String saveMessage(Message message, boolean logEvent, String toolId, String user

public void markMessageApproval(Long messageId, boolean approved);

public void markMessageReadForUser(Long topicId, Long messageId, boolean read);
public void markMessageNotReadForUser(Long topicId, Long messageId, boolean read);

public void markMessageReadForUser(Long topicId, Long messageId, boolean read, String userId);
public void markMessageNotReadForUser(Long topicId, Long messageId, boolean read, String userId);

public void markMessageReadForUser(Long topicId, Long messageId, boolean read, String userId, String context, String toolId);
public void markMessageNotReadForUser(Long topicId, Long messageId, boolean read, String userId, String context, String toolId);

public boolean isMessageReadForUser(Long topicId, Long messageId);
public boolean isMessageNotReadForUser(Long topicId, Long messageId);

public UnreadStatus findUnreadStatus(Long topicId, Long messageId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public interface MessagePermissions {

public Boolean getReviseOwn();

public Boolean getMarkAsRead();
public Boolean getMarkAsNotRead();

public void setMarkAsRead(Boolean markAsRead);
public void setMarkAsNotRead(Boolean markAsNotRead);

public void setReviseOwn(Boolean reviseOwn);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface PermissionLevel extends MutableEntity{
public static final String CHANGE_SETTINGS = "changeSettings";
public static final String POST_TO_GRADEBOOK = "postToGradebook";
public static final String READ = "read";
public static final String MARK_AS_READ = "markAsRead";
public static final String MARK_AS_NOT_READ = "markAsNotRead";
public static final String MODERATE_POSTINGS = "moderatePostings";
public static final String IDENTIFY_ANON_AUTHORS = "identifyAnonAuthors";
public static final String DELETE_OWN = "deleteOwn";
Expand Down Expand Up @@ -58,9 +58,9 @@ public interface PermissionLevel extends MutableEntity{

public void setDeleteOwn(Boolean deleteOwn);

public Boolean getMarkAsRead();
public Boolean getMarkAsNotRead();

public void setMarkAsRead(Boolean markAsRead);
public void setMarkAsNotRead(Boolean markAsNotRead);

public Boolean getModeratePostings();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,12 @@ public void saveTopicMessagePermissions(DiscussionTopic topic,
public void markMessageAs(Message message, boolean readStatus);

/**
* Mark the read status for a given message for a given user
* Mark the not read status for a given message for a given user
* @param message
* @param readStatus
* @param userId
*/
public void markMessageReadStatusForUser(Message message, boolean readStatus, String userId);
public void markMessageNotReadStatusForUser(Message message, boolean readStatus, String userId);


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public interface PrivateMessageManager {

public void saveForumSettings(PrivateForum forum);

public void markMessageAsReadForUser(final PrivateMessage message);
public void markMessageAsReadForUser(final PrivateMessage message, final String contextId);
public void markMessageAsReadForUser(final PrivateMessage message, final String contextId, final String userId, String toolId);
public void markMessageAsNotReadForUser(final PrivateMessage message);
public void markMessageAsNotReadForUser(final PrivateMessage message, final String contextId);
public void markMessageAsNotReadForUser(final PrivateMessage message, final String contextId, final String userId, String toolId);

public void markMessageAsUnreadForUser(final PrivateMessage message);
public void markMessageAsUnreadForUser(final PrivateMessage message, final String contextId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public interface UIPermissionsManager
* @param topic
* @return
*/
public boolean isMarkAsRead(DiscussionTopic topic, DiscussionForum forum);
public boolean isMarkAsNotRead(DiscussionTopic topic, DiscussionForum forum);

/**
* Returns whether current user has perm to moderate in this situation
Expand Down
Loading
Loading