diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scala index 9896056723..78906f0132 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scala @@ -41,8 +41,9 @@ case class User( answers: Map[String,Vector[String]] = Map(), genericData: Map[String, Vector[GenericData]] = Map(), talk: Talk = Talk(), - emojis: Vector[Emoji] = Vector(), - reactions: Vector[Emoji] = Vector(), + reactions: Vector[Reaction] = Vector(), + raiseHand: Vector[Long] = Vector(), + away: Vector[Away] = Vector(), webcams: Vector[Webcam] = Vector(), totalOfMessages: Long = 0, ) @@ -75,11 +76,16 @@ case class Talk( lastTalkStartedOn: Long = 0, ) -case class Emoji( +case class Reaction( name: String, sentOn: Long = System.currentTimeMillis(), ) +case class Away( + startedOn: Long = System.currentTimeMillis(), + stoppedOn: Long = 0, +) + case class Webcam( startedOn: Long = System.currentTimeMillis(), stoppedOn: Long = 0, @@ -366,7 +372,7 @@ class LearningDashboardActor( user <- findUserByIntId(meeting, msg.body.userId) } yield { if (msg.body.raiseHand) { - val updatedUser = user.copy(emojis = user.emojis :+ Emoji("raiseHand")) + val updatedUser = user.copy(raiseHand = user.raiseHand :+ System.currentTimeMillis()) val updatedMeeting = meeting.copy(users = meeting.users + (updatedUser.userKey -> updatedUser)) meetings += (updatedMeeting.intId -> updatedMeeting) @@ -379,12 +385,15 @@ class LearningDashboardActor( meeting <- meetings.values.find(m => m.intId == msg.header.meetingId) user <- findUserByIntId(meeting, msg.body.userId) } yield { - if (msg.body.away) { - val updatedUser = user.copy(emojis = user.emojis :+ Emoji("away")) - val updatedMeeting = meeting.copy(users = meeting.users + (updatedUser.userKey -> updatedUser)) - - meetings += (updatedMeeting.intId -> updatedMeeting) + val updatedUser = if (msg.body.away) { + user.copy(away = user.away :+ Away()) + } else { + val lastAway: Away = user.away.last.copy(stoppedOn = System.currentTimeMillis()) + user.copy(away = user.away.dropRight(1) :+ lastAway) } + + val updatedMeeting = meeting.copy(users = meeting.users + (updatedUser.userKey -> updatedUser)) + meetings += (updatedMeeting.intId -> updatedMeeting) } } @@ -400,26 +409,9 @@ class LearningDashboardActor( }).length > 0 if(!hasSameReactionInLast30Seconds) { - val updatedUser = user.copy(reactions = user.reactions :+ Emoji(msg.body.reactionEmoji)) + val updatedUser = user.copy(reactions = user.reactions :+ Reaction(msg.body.reactionEmoji)) val updatedMeeting = meeting.copy(users = meeting.users + (updatedUser.userKey -> updatedUser)) meetings += (updatedMeeting.intId -> updatedMeeting) - - //Convert Reactions to legacy Emoji (while LearningDashboard doesn't support Reactions) - val emoji = msg.body.reactionEmoji.codePointAt(0) match { - case 128515 => "happy" - case 128528 => "neutral" - case 128577 => "sad" - case 128077 => "thumbsUp" - case 128078 => "thumbsDown" - case 128079 => "applause" - case _ => "none" - } - - if (emoji != "none") { - val updatedUserWithEmoji = updatedUser.copy(emojis = user.emojis :+ Emoji(emoji)) - val updatedMeetingWithEmoji = meeting.copy(users = meeting.users + (updatedUserWithEmoji.userKey -> updatedUserWithEmoji)) - meetings += (updatedMeeting.intId -> updatedMeetingWithEmoji) - } } } } diff --git a/bbb-learning-dashboard/.eslintrc.js b/bbb-learning-dashboard/.eslintrc.js index db36352796..c06c3f8d99 100644 --- a/bbb-learning-dashboard/.eslintrc.js +++ b/bbb-learning-dashboard/.eslintrc.js @@ -21,6 +21,8 @@ module.exports = { 'import/no-absolute-path': 0, 'import/no-unresolved': 0, 'import/no-extraneous-dependencies': 1, + 'import/no-named-as-default': 0, + 'import/no-named-as-default-member': 0, 'react/prop-types': 'off', 'jsx-a11y/no-access-key': 0, 'react/jsx-props-no-spreading': 'off', diff --git a/bbb-learning-dashboard/src/App.js b/bbb-learning-dashboard/src/App.js index 952e50e9ab..df133f494f 100644 --- a/bbb-learning-dashboard/src/App.js +++ b/bbb-learning-dashboard/src/App.js @@ -10,7 +10,6 @@ import './bbb-icons.css'; import { FormattedMessage, FormattedDate, injectIntl, FormattedTime, } from 'react-intl'; -import { emojiConfigs } from './services/EmojiService'; import CardBody from './components/Card'; import UsersTable from './components/UsersTable'; import UserDetails from './components/UserDetails/component'; @@ -125,38 +124,31 @@ class App extends React.Component { }); } - fetchMostUsedEmojis() { + fetchMostUsedReactions() { const { activitiesJson } = this.state; if (!activitiesJson) { return []; } - // Icon elements - const emojis = [...Object.keys(emojiConfigs)]; - const icons = {}; - emojis.forEach((emoji) => { - icons[emoji] = (); - }); - - // Count each emoji - const emojiCount = {}; - emojis.forEach((emoji) => { - emojiCount[emoji] = 0; - }); - const allEmojisUsed = Object + // Count each reaction + const reactionCount = {}; + const allReactionsUsed = Object .values(activitiesJson.users || {}) - .map((user) => user.emojis || []) + .map((user) => user.reactions || []) .flat(1); - allEmojisUsed.forEach((emoji) => { - emojiCount[emoji.name] += 1; + allReactionsUsed.forEach((reaction) => { + if (typeof reactionCount[reaction.name] === 'undefined') { + reactionCount[reaction.name] = 0; + } + reactionCount[reaction.name] += 1; }); // Get the three most used - const mostUsedEmojis = Object - .entries(emojiCount) + const mostUsedReactions = Object + .entries(reactionCount) .filter(([, count]) => count) .sort(([, countA], [, countB]) => countA - countB) .reverse() .slice(0, 3); - return mostUsedEmojis.map(([emoji]) => icons[emoji]); + return mostUsedReactions.map(([reaction]) => reaction); } updateModalUser() { @@ -245,14 +237,13 @@ class App extends React.Component { ) => genericDataListForSpecificUser?.columnTitle); // This line will eliminate duplicates. const genericDataColumnTitleList = [...new Set(genericDataColumnTitleWithDuplicates)]; - console.log('teste aqui ----> ', activitiesJson, genericDataColumnTitleList); document.title = `${intl.formatMessage({ id: 'app.learningDashboard.bigbluebuttonTitle', defaultMessage: 'BigBlueButton' })} - ${intl.formatMessage({ id: 'app.learningDashboard.dashboardTitle', defaultMessage: 'Learning Analytics Dashboard' })} - ${activitiesJson.name}`; - function totalOfEmojis() { + function totalOfReactions() { if (activitiesJson && activitiesJson.users) { return Object.values(activitiesJson.users) - .reduce((prevVal, elem) => prevVal + elem.emojis.length, 0); + .reduce((prevVal, elem) => prevVal + elem.reactions.length, 0); } return 0; } @@ -303,19 +294,19 @@ class App extends React.Component { } // Calculate points of Raise hand - const usersRaiseHand = allUsers.map((currUser) => currUser.emojis.filter((emoji) => emoji.name === 'raiseHand').length); + const usersRaiseHand = allUsers.map((currUser) => currUser.raiseHand.length); const maxRaiseHand = Math.max(...usersRaiseHand); const totalRaiseHand = usersRaiseHand.reduce((prev, val) => prev + val, 0); if (maxRaiseHand > 0) { meetingAveragePoints += ((totalRaiseHand / nrOfUsers) / maxRaiseHand) * 2; } - // Calculate points of Emojis - const usersEmojis = allUsers.map((currUser) => currUser.emojis.filter((emoji) => emoji.name !== 'raiseHand').length); - const maxEmojis = Math.max(...usersEmojis); - const totalEmojis = usersEmojis.reduce((prev, val) => prev + val, 0); - if (maxEmojis > 0) { - meetingAveragePoints += ((totalEmojis / nrOfUsers) / maxEmojis) * 2; + // Calculate points of Reactions + const usersReactions = allUsers.map((currUser) => currUser.reactions.length); + const maxReactions = Math.max(...usersReactions); + const totalReactions = usersReactions.reduce((prev, val) => prev + val, 0); + if (maxReactions > 0) { + meetingAveragePoints += ((totalReactions / nrOfUsers) / maxReactions) * 2; } // Calculate points of Polls @@ -482,11 +473,11 @@ class App extends React.Component { - {this.fetchMostUsedEmojis()} + {this.fetchMostUsedReactions()} diff --git a/bbb-learning-dashboard/src/components/StatusTable.jsx b/bbb-learning-dashboard/src/components/StatusTable.jsx index 50c7faa0bc..56c19cf813 100644 --- a/bbb-learning-dashboard/src/components/StatusTable.jsx +++ b/bbb-learning-dashboard/src/components/StatusTable.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; -import { emojiConfigs, filterUserEmojis } from '../services/EmojiService'; +import { filterUserReactions } from '../services/ReactionService'; import UserAvatar from './UserAvatar'; const intlMessages = defineMessages({ @@ -24,31 +24,31 @@ const intlMessages = defineMessages({ class StatusTable extends React.Component { componentDidMount() { - // This code is needed to prevent emojis from overflowing. - const emojis = document.getElementsByClassName('timeline-emoji'); - for (let i = 0; i < emojis.length; i += 1) { - const emojiStyle = window.getComputedStyle(emojis[i]); - const offsetLeft = Number(emojiStyle + // This code is needed to prevent reactions from overflowing. + const reactions = document.getElementsByClassName('timeline-reaction'); + for (let i = 0; i < reactions.length; i += 1) { + const reactionStyle = window.getComputedStyle(reactions[i]); + const offsetLeft = Number(reactionStyle .left .replace(/px/g, '') .trim()); if (offsetLeft < 0) { - emojis[i].style.left = '0'; + reactions[i].style.left = '0'; } } } componentDidUpdate() { - // This code is needed to prevent emojis from overflowing. - const emojis = document.getElementsByClassName('timeline-emoji'); - for (let i = 0; i < emojis.length; i += 1) { - const emojiStyle = window.getComputedStyle(emojis[i]); - const offsetLeft = Number(emojiStyle + // This code is needed to prevent reactions from overflowing. + const reactions = document.getElementsByClassName('timeline-reaction'); + for (let i = 0; i < reactions.length; i += 1) { + const reactionStyle = window.getComputedStyle(reactions[i]); + const offsetLeft = Number(reactionStyle .left .replace(/px/g, '') .trim()); if (offsetLeft < 0) { - emojis[i].style.left = '0'; + reactions[i].style.left = '0'; } } } @@ -287,8 +287,7 @@ class StatusTable extends React.Component { { usersPeriods[user.userKey].length > 0 ? ( usersPeriods[user.userKey].map((userPeriod) => { const { registeredOn, leftOn } = userPeriod; - const userEmojisInPeriod = filterUserEmojis(user, - null, + const userReactionsInPeriod = filterUserReactions(user, registeredOn >= boundaryLeft && registeredOn <= boundaryRight ? registeredOn : boundaryLeft, leftOn >= boundaryLeft && leftOn <= boundaryRight @@ -301,34 +300,21 @@ class StatusTable extends React.Component { || (boundaryLeft >= registeredOn && leftOn === 0) ? makeLineThrough(userPeriod, period) : null } - { userEmojisInPeriod.map((emoji) => { - const offset = ((emoji.sentOn - period.start) * 100) + { userReactionsInPeriod.map((reaction) => { + const offset = ((reaction.sentOn - period.start) * 100) / (interval); const origin = isRTL ? 'right' : 'left'; const redress = '(0.875rem / 2 + 0.25rem + 2px)'; return (
- + {reaction.name}
); }) } diff --git a/bbb-learning-dashboard/src/components/UserDetails/component.jsx b/bbb-learning-dashboard/src/components/UserDetails/component.jsx index 31b27f5b4e..22a1ea4d1b 100644 --- a/bbb-learning-dashboard/src/components/UserDetails/component.jsx +++ b/bbb-learning-dashboard/src/components/UserDetails/component.jsx @@ -109,8 +109,8 @@ const UserDatailsComponent = (props) => { const usersTalkTime = allUsersArr.map((currUser) => currUser.talk.totalTime); const usersMessages = allUsersArr.map((currUser) => currUser.totalOfMessages); - const usersEmojis = allUsersArr.map((currUser) => currUser.emojis.filter((emoji) => emoji.name !== 'raiseHand').length); - const usersRaiseHands = allUsersArr.map((currUser) => currUser.emojis.filter((emoji) => emoji.name === 'raiseHand').length); + const usersReactions = allUsersArr.map((currUser) => currUser.reactions.length); + const usersRaiseHands = allUsersArr.map((currUser) => currUser.raiseHand.length); const usersAnswers = allUsersArr.map((currUser) => Object.values(currUser.answers || {}).length); const totalPolls = Object.values(polls || {}).length; @@ -132,18 +132,18 @@ const UserDatailsComponent = (props) => { function getPointsOfRaiseHand(u) { const maxRaiseHand = Math.max(...usersRaiseHands); - const userRaiseHand = u.emojis.filter((emoji) => emoji.name === 'raiseHand').length; + const userRaiseHand = u.reactions.length; if (maxRaiseHand > 0) { return (userRaiseHand / maxRaiseHand) * 2; } return 0; } - function getPointsofEmoji(u) { - const maxEmojis = Math.max(...usersEmojis); - const userEmojis = u.emojis.filter((emoji) => emoji.name !== 'raiseHand').length; - if (maxEmojis > 0) { - return (userEmojis / maxEmojis) * 2; + function getPointsofReaction(u) { + const maxReactions = Math.max(...usersReactions); + const userReactions = u.reactions.length; + if (maxReactions > 0) { + return (userReactions / maxReactions) * 2; } return 0; } @@ -161,7 +161,7 @@ const UserDatailsComponent = (props) => { const messagesAverage = usersMessages .reduce((prev, curr) => prev + curr, 0) / (allUsersArr.length || 1); - const emojisAverage = usersEmojis + const reactionsAverage = usersReactions .reduce((prev, curr) => prev + curr, 0) / (allUsersArr.length || 1); const raiseHandsAverage = usersRaiseHands @@ -173,7 +173,7 @@ const UserDatailsComponent = (props) => { const activityPointsFunctions = { 'Talk Time': getPointsOfTalk, Messages: getPointsOfChatting, - Emojis: getPointsofEmoji, + Reactions: getPointsofReaction, 'Raise Hands': getPointsOfRaiseHand, 'Poll Votes': getPointsOfPolls, }; @@ -181,7 +181,7 @@ const UserDatailsComponent = (props) => { const averages = { 'Talk Time': talkTimeAverage, Messages: messagesAverage, - Emojis: emojisAverage, + Reactions: reactionsAverage, 'Raise Hands': raiseHandsAverage, 'Poll Votes': pollsAverage, }; @@ -436,7 +436,7 @@ const UserDatailsComponent = (props) => { - { ['Talk Time', 'Messages', 'Emojis', 'Raise Hands', 'Poll Votes'].map((category) => { + { ['Talk Time', 'Messages', 'Reactions', 'Raise Hands', 'Poll Votes'].map((category) => { let totalOfActivity = 0; switch (category) { @@ -446,11 +446,11 @@ const UserDatailsComponent = (props) => { case 'Messages': totalOfActivity = user.totalOfMessages; break; - case 'Emojis': - totalOfActivity = user.emojis.filter((emoji) => emoji.name !== 'raiseHand').length; + case 'Reactions': + totalOfActivity = user.reactions.length; break; case 'Raise Hands': - totalOfActivity = user.emojis.filter((emoji) => emoji.name === 'raiseHand').length; + totalOfActivity = user.raiseHand.length; break; case 'Poll Votes': totalOfActivity = Object.values(user.answers).length; diff --git a/bbb-learning-dashboard/src/components/UsersTable.jsx b/bbb-learning-dashboard/src/components/UsersTable.jsx index f10dd13765..e98b9a8f84 100644 --- a/bbb-learning-dashboard/src/components/UsersTable.jsx +++ b/bbb-learning-dashboard/src/components/UsersTable.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { FormattedMessage, FormattedDate, FormattedNumber, injectIntl, } from 'react-intl'; -import { getUserEmojisSummary, emojiConfigs } from '../services/EmojiService'; +import { getUserReactionsSummary } from '../services/ReactionService'; import { getActivityScore, getSumOfTime, tsToHHmmss } from '../services/UserService'; import UserAvatar from './UserAvatar'; import { UserDetailsContext } from './UserDetails/context'; @@ -73,9 +73,9 @@ class UsersTable extends React.Component { talkTimeOrder, webcamTimeOrder, lastFieldClicked, } = this.state; - const usersEmojisSummary = {}; + const usersReactionsSummary = {}; Object.values(allUsers || {}).forEach((user) => { - usersEmojisSummary[user.userKey] = getUserEmojisSummary(user, 'raiseHand'); + usersReactionsSummary[user.userKey] = getUserReactionsSummary(user); }); function getOnlinePercentage(registeredOn, leftOn) { @@ -206,7 +206,7 @@ class UsersTable extends React.Component { - + @@ -429,42 +429,25 @@ class UsersTable extends React.Component { ) : null } - + { - Object.keys(usersEmojisSummary[user.userKey] || {}).map((emoji) => ( + Object.keys(usersReactionsSummary[user.userKey] || {}).map((reaction) => (
- + {reaction}   - { usersEmojisSummary[user.userKey][emoji] } + { usersReactionsSummary[user.userKey][reaction] }   -
)) } - { user.emojis.filter((emoji) => emoji.name === 'raiseHand').length > 0 + { user.raiseHand.length > 0 ? ( - - - + ✋   - {user.emojis.filter((emoji) => emoji.name === 'raiseHand').length} + {user.raiseHand.length} ) : null } diff --git a/bbb-learning-dashboard/src/services/EmojiService.js b/bbb-learning-dashboard/src/services/EmojiService.js deleted file mode 100644 index 20fdd737ce..0000000000 --- a/bbb-learning-dashboard/src/services/EmojiService.js +++ /dev/null @@ -1,74 +0,0 @@ -export const emojiConfigs = { - away: { - icon: 'icon-bbb-time', - intlId: 'app.actionsBar.emojiMenu.awayLabel', - defaultMessage: 'Away', - }, - neutral: { - icon: 'icon-bbb-undecided', - intlId: 'app.actionsBar.emojiMenu.neutralLabel', - defaultMessage: 'Undecided', - }, - confused: { - icon: 'icon-bbb-confused', - intlId: 'app.actionsBar.emojiMenu.confusedLabel', - defaultMessage: 'Confused', - }, - sad: { - icon: 'icon-bbb-sad', - intlId: 'app.actionsBar.emojiMenu.sadLabel', - defaultMessage: 'Sad', - }, - happy: { - icon: 'icon-bbb-happy', - intlId: 'app.actionsBar.emojiMenu.happyLabel', - defaultMessage: 'Happy', - }, - applause: { - icon: 'icon-bbb-applause', - intlId: 'app.actionsBar.emojiMenu.applauseLabel', - defaultMessage: 'Applaud', - }, - thumbsUp: { - icon: 'icon-bbb-thumbs_up', - intlId: 'app.actionsBar.emojiMenu.thumbsUpLabel', - defaultMessage: 'Thumbs up', - }, - thumbsDown: { - icon: 'icon-bbb-thumbs_down', - intlId: 'app.actionsBar.emojiMenu.thumbsDownLabel', - defaultMessage: 'Thumbs down', - }, - raiseHand: { - icon: 'icon-bbb-hand', - intlId: 'app.actionsBar.emojiMenu.raiseHandLabel', - defaultMessage: 'Raise hand', - }, -}; - -export function getUserEmojisSummary(user, skipNames = null, start = null, end = null) { - const userEmojis = {}; - user.emojis.forEach((emoji) => { - if (typeof emojiConfigs[emoji.name] === 'undefined') return; - if (skipNames != null && skipNames.split(',').indexOf(emoji.name) > -1) return; - if (start != null && emoji.sentOn < start) return; - if (end != null && emoji.sentOn > end) return; - if (typeof userEmojis[emoji.name] === 'undefined') { - userEmojis[emoji.name] = 0; - } - userEmojis[emoji.name] += 1; - }); - return userEmojis; -} - -export function filterUserEmojis(user, skipNames = null, start = null, end = null) { - const userEmojis = []; - user.emojis.forEach((emoji) => { - if (typeof emojiConfigs[emoji.name] === 'undefined') return; - if (skipNames != null && skipNames.split(',').indexOf(emoji.name) > -1) return; - if (start != null && emoji.sentOn < start) return; - if (end != null && emoji.sentOn > end) return; - userEmojis.push(emoji); - }); - return userEmojis; -} diff --git a/bbb-learning-dashboard/src/services/ReactionService.js b/bbb-learning-dashboard/src/services/ReactionService.js new file mode 100644 index 0000000000..cc9b077b86 --- /dev/null +++ b/bbb-learning-dashboard/src/services/ReactionService.js @@ -0,0 +1,20 @@ +export function getUserReactionsSummary(user) { + const userReactions = {}; + user.reactions.forEach((reaction) => { + if (typeof userReactions[reaction.name] === 'undefined') { + userReactions[reaction.name] = 0; + } + userReactions[reaction.name] += 1; + }); + return userReactions; +} + +export function filterUserReactions(user, start = null, end = null) { + const userReactions = []; + user.reactions.forEach((reaction) => { + if (start != null && reaction.sentOn < start) return; + if (end != null && reaction.sentOn > end) return; + userReactions.push(reaction); + }); + return userReactions; +} diff --git a/bbb-learning-dashboard/src/services/UserService.js b/bbb-learning-dashboard/src/services/UserService.js index f7a977de7c..194c667417 100644 --- a/bbb-learning-dashboard/src/services/UserService.js +++ b/bbb-learning-dashboard/src/services/UserService.js @@ -1,4 +1,4 @@ -import { emojiConfigs, filterUserEmojis } from './EmojiService'; +import { filterUserReactions } from './ReactionService'; export function getActivityScore(user, allUsers, totalOfPolls) { if (user.isModerator) return 0; @@ -21,19 +21,19 @@ export function getActivityScore(user, allUsers, totalOfPolls) { } // Calculate points of Raise hand - const usersRaiseHand = allUsersArr.map((currUser) => currUser.emojis.filter((emoji) => emoji.name === 'raiseHand').length); + const usersRaiseHand = allUsersArr.map((currUser) => currUser.raiseHand.length); const maxRaiseHand = Math.max(...usersRaiseHand); - const userRaiseHand = user.emojis.filter((emoji) => emoji.name === 'raiseHand').length; + const userRaiseHand = user.raiseHand.length; if (maxRaiseHand > 0) { userPoints += (userRaiseHand / maxRaiseHand) * 2; } - // Calculate points of Emojis - const usersEmojis = allUsersArr.map((currUser) => currUser.emojis.filter((emoji) => emoji.name !== 'raiseHand').length); - const maxEmojis = Math.max(...usersEmojis); - const userEmojis = user.emojis.filter((emoji) => emoji.name !== 'raiseHand').length; - if (maxEmojis > 0) { - userPoints += (userEmojis / maxEmojis) * 2; + // Calculate points of Reactions + const usersReactions = allUsersArr.map((currUser) => currUser.reactions.length); + const maxReactions = Math.max(...usersReactions); + const userReactions = user.reactions.length; + if (maxReactions > 0) { + userPoints += (userReactions / maxReactions) * 2; } // Calculate points of Polls @@ -101,8 +101,8 @@ const tableHeaderFields = [ defaultMessage: 'Messages', }, { - id: 'colEmojis', - defaultMessage: 'Emojis', + id: 'colReactions', + defaultMessage: 'Reactions', }, { id: 'pollVotes', @@ -130,10 +130,6 @@ export function makeUserCSVData(users, polls, intl) { const userRecords = {}; const userValues = Object.values(users || {}); const pollValues = Object.values(polls || {}); - const skipEmojis = Object - .keys(emojiConfigs) - .filter((emoji) => emoji !== 'raiseHand') - .join(','); for (let i = 0; i < userValues.length; i += 1) { const user = userValues[i]; @@ -155,9 +151,9 @@ export function makeUserCSVData(users, polls, intl) { talk: user.talk.totalTime > 0 ? tsToHHmmss(user.talk.totalTime) : '-', webcam: webcam > 0 ? tsToHHmmss(webcam) : '-', messages: user.totalOfMessages, - raiseHand: filterUserEmojis(user, 'raiseHand').length, + raiseHand: user.raiseHand.length, answers: Object.keys(user.answers).length, - emojis: filterUserEmojis(user, skipEmojis).length, + reactions: filterUserReactions(user).length, registeredOn: intl.formatDate(joinTime, { year: 'numeric', month: 'numeric', diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index f40839915b..704a51c8a4 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -1372,7 +1372,6 @@ "app.learningDashboard.userDetails.anonymousAnswer": "Anonymous Poll", "app.learningDashboard.userDetails.talkTime": "Talk Time", "app.learningDashboard.userDetails.messages": "Messages", - "app.learningDashboard.userDetails.emojis": "Emojis", "app.learningDashboard.userDetails.raiseHands": "Raise Hands", "app.learningDashboard.userDetails.pollVotes": "Poll Votes", "app.learningDashboard.userDetails.onlineIndicator": "{0} online time", @@ -1381,7 +1380,7 @@ "app.learningDashboard.usersTable.colTalk": "Talk time", "app.learningDashboard.usersTable.colWebcam": "Webcam Time", "app.learningDashboard.usersTable.colMessages": "Messages", - "app.learningDashboard.usersTable.colEmojis": "Emojis", + "app.learningDashboard.usersTable.colReactions": "Reactions", "app.learningDashboard.usersTable.colRaiseHands": "Raise Hands", "app.learningDashboard.usersTable.colActivityScore": "Activity Score", "app.learningDashboard.usersTable.colStatus": "Status",