From 5249780dfd1f295ad17a13b30ea12ff54c4a5eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 11 Jan 2019 12:32:41 +0100 Subject: [PATCH] Version 18.31.4 --- swad_action.c | 461 ++++++++++++++++++++++++----------------------- swad_action.h | 352 ++++++++++++++++++------------------ swad_changelog.h | 5 +- swad_connected.c | 238 +----------------------- swad_connected.h | 3 - swad_date.c | 26 +++ swad_date.h | 2 + swad_layout.c | 2 +- swad_statistic.c | 289 +++++++++++++++++++++++++++-- swad_statistic.h | 4 + swad_text.c | 39 +++- 11 files changed, 748 insertions(+), 673 deletions(-) diff --git a/swad_action.c b/swad_action.c index a11a4fd7..9c5546a1 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1257,249 +1257,250 @@ Users: 1055. ActLstSimUsr List users similar to a given one (possible duplicates) 1056. ActRemDupUsr Remove user from list of possible duplicate users - 1057. ActLstClk List last clicks in real time - Social: - 1058. ActSeeSocTmlGbl Show social timeline (global) - 1059. ActSeeSocPrf Suggest list of users to follow - 1060. ActSeeFor Show the level superior of the forums - 1061. ActSeeChtRms Show the chat rooms + 1057. ActSeeSocTmlGbl Show social timeline (global) + 1058. ActSeeSocPrf Suggest list of users to follow + 1059. ActSeeFor Show the level superior of the forums + 1060. ActSeeChtRms Show the chat rooms - 1062. ActRcvSocPstGbl Receive a public social post to be displayed in the timeline (global) - 1063. ActRcvSocComGbl Comment a social note in the timeline (global) - 1064. ActShaSocNotGbl Share a social note in the timeline (global) - 1065. ActUnsSocNotGbl Unshare a previously shared social note in the timeline (global) - 1066. ActFavSocNotGbl Favourite a social note in the timeline (global) - 1067. ActUnfSocNotGbl Unfavourite a previously favourited social note in the timeline (global) - 1068. ActFavSocComGbl Favourite a social comment in the timeline (global) - 1069. ActUnfSocComGbl Unfavourite a previously favourited social comment in the timeline (global) - 1070. ActReqRemSocPubGbl Request the removal of a social publishing in the timeline (global) - 1071. ActRemSocPubGbl Remove a social publishing in the timeline (global) - 1072. ActReqRemSocComGbl Request the removal of a comment in a social note (global) - 1073. ActRemSocComGbl Remove of a comment in a social note (global) + 1061. ActRcvSocPstGbl Receive a public social post to be displayed in the timeline (global) + 1062. ActRcvSocComGbl Comment a social note in the timeline (global) + 1063. ActShaSocNotGbl Share a social note in the timeline (global) + 1064. ActUnsSocNotGbl Unshare a previously shared social note in the timeline (global) + 1065. ActFavSocNotGbl Favourite a social note in the timeline (global) + 1066. ActUnfSocNotGbl Unfavourite a previously favourited social note in the timeline (global) + 1067. ActFavSocComGbl Favourite a social comment in the timeline (global) + 1068. ActUnfSocComGbl Unfavourite a previously favourited social comment in the timeline (global) + 1069. ActReqRemSocPubGbl Request the removal of a social publishing in the timeline (global) + 1070. ActRemSocPubGbl Remove a social publishing in the timeline (global) + 1071. ActReqRemSocComGbl Request the removal of a comment in a social note (global) + 1072. ActRemSocComGbl Remove of a comment in a social note (global) - 1074. ActReqOthPubPrf Request @nickname to show a public user's profile + 1073. ActReqOthPubPrf Request @nickname to show a public user's profile - 1075. ActRcvSocPstUsr Receive a public social post to be displayed in the timeline (user) - 1076. ActRcvSocComUsr Comment a social note in the timeline (user) - 1077. ActShaSocNotUsr Share a social note in the timeline (user) - 1078. ActUnsSocNotUsr Unshare a previously shared social note in the timeline (user) - 1079. ActFavSocNotUsr Favourite a social note in the timeline (user) - 1080. ActUnfSocNotUsr Unfavourite a previously favourited social note in the timeline (user) - 1081. ActFavSocComUsr Favourite a social comment in the timeline (user) - 1082. ActUnfSocComUsr Unfavourite a previously favourited social comment in the timeline (user) - 1083. ActReqRemSocPubUsr Request the removal of a social publishing in the timeline (user) - 1084. ActRemSocPubUsr Remove a social publishing in the timeline (user) - 1085. ActReqRemSocComUsr Request the removal of a comment in a social note (user) - 1086. ActRemSocComUsr Remove of a comment in a social note (user) + 1074. ActRcvSocPstUsr Receive a public social post to be displayed in the timeline (user) + 1075. ActRcvSocComUsr Comment a social note in the timeline (user) + 1076. ActShaSocNotUsr Share a social note in the timeline (user) + 1077. ActUnsSocNotUsr Unshare a previously shared social note in the timeline (user) + 1078. ActFavSocNotUsr Favourite a social note in the timeline (user) + 1079. ActUnfSocNotUsr Unfavourite a previously favourited social note in the timeline (user) + 1080. ActFavSocComUsr Favourite a social comment in the timeline (user) + 1081. ActUnfSocComUsr Unfavourite a previously favourited social comment in the timeline (user) + 1082. ActReqRemSocPubUsr Request the removal of a social publishing in the timeline (user) + 1083. ActRemSocPubUsr Remove a social publishing in the timeline (user) + 1084. ActReqRemSocComUsr Request the removal of a comment in a social note (user) + 1085. ActRemSocComUsr Remove of a comment in a social note (user) - 1087. ActCal1stClkTim Calculate first click time from log and store into user's figures - 1088. ActCalNumClk Calculate number of clicks from log and store into user's figures - 1089. ActCalNumFileViews Calculate number of file views and store into user's figures - 1090. ActCalNumForPst Calculate number of forum posts and store into user's figures - 1091. ActCalNumMsgSnt Calculate number of messages sent from log and store into user's figures + 1086. ActCal1stClkTim Calculate first click time from log and store into user's figures + 1087. ActCalNumClk Calculate number of clicks from log and store into user's figures + 1088. ActCalNumFileViews Calculate number of file views and store into user's figures + 1089. ActCalNumForPst Calculate number of forum posts and store into user's figures + 1090. ActCalNumMsgSnt Calculate number of messages sent from log and store into user's figures - 1092. ActFolUsr Follow another user - 1093. ActUnfUsr Unfollow another user - 1094. ActSeeFlg Show following - 1095. ActSeeFlr Show followers + 1091. ActFolUsr Follow another user + 1092. ActUnfUsr Unfollow another user + 1093. ActSeeFlg Show following + 1094. ActSeeFlr Show followers - 1096. ActSeeForCrsUsr Show top level of forum of users of the course - 1097. ActSeeForCrsTch Show top level of forum of teachers of the course - 1098. ActSeeForDegUsr Show top level of forum of users of the degree - 1099. ActSeeForDegTch Show top level of forum of teachers of the degree - 1100. ActSeeForCtrUsr Show top level of forum of users of the centre - 1101. ActSeeForCtrTch Show top level of forum of teachers of the centre - 1102. ActSeeForInsUsr Show top level of forum of users of the institution - 1103. ActSeeForInsTch Show top level of forum of teachers of the institution - 1104. ActSeeForGenUsr Show top level of forum of users general - 1105. ActSeeForGenTch Show top level of forum of teachers general - 1106. ActSeeForSWAUsr Show top level of forum of users of the platform - 1107. ActSeeForSWATch Show top level of forum of teachers of the platform - 1108. ActSeePstForCrsUsr Show the messages of a thread of the forum of users of the course - 1109. ActSeePstForCrsTch Show the messages of a thread of the forum of teachers of the course - 1110. ActSeePstForDegUsr Show the messages of a thread of the forum of users of the degree - 1111. ActSeePstForDegTch Show the messages of a thread of the forum of teachers of the degree - 1112. ActSeePstForCtrUsr Show the messages of a thread of the forum of users of the centre - 1113. ActSeePstForCtrTch Show the messages of a thread of the forum of teachers of the centre - 1114. ActSeePstForInsUsr Show the messages of a thread of the forum of users of the institution - 1115. ActSeePstForInsTch Show the messages of a thread of the forum of teachers of the institution - 1116. ActSeePstForGenUsr Show the messages of a thread of the forum of users general - 1117. ActSeePstForGenTch Show the messages of a thread of the forum of teachers general - 1118. ActSeePstForSWAUsr Show the messages of a thread of the forum of users of the platform - 1119. ActSeePstForSWATch Show the messages of a thread of the forum of teachers of the platform - 1120. ActRcvThrForCrsUsr Receive the first message of a new thread of forum of users of the course - 1121. ActRcvThrForCrsTch Receive the first message of a new thread of forum of teachers of the course - 1122. ActRcvThrForDegUsr Receive the first message of a new thread of forum of users of the degree - 1123. ActRcvThrForDegTch Receive the first message of a new thread of forum of teachers of the degree - 1124. ActRcvThrForCtrUsr Receive the first message of a new thread of forum of users of centre - 1125. ActRcvThrForCtrTch Receive the first message of a new thread of forum of teachers of centre - 1126. ActRcvThrForInsUsr Receive the first message of a new thread of forum of users of the institution - 1127. ActRcvThrForInsTch Receive the first message of a new thread of forum of teachers of the institution - 1128. ActRcvThrForGenUsr Receive the first message of a new thread of forum of users general - 1129. ActRcvThrForGenTch Receive the first message of a new thread of forum of teachers general - 1130. ActRcvThrForSWAUsr Receive the first message of a new thread of forum of users of the platform - 1131. ActRcvThrForSWATch Receive the first message of a new thread of forum of teachers of the platform - 1132. ActRcvRepForCrsUsr Receive a message of answer in a thread existente in the forum of users of the course - 1133. ActRcvRepForCrsTch Receive a message of answer in a thread existente in the forum of teachers of the course - 1134. ActRcvRepForDegUsr Receive a message of answer in a thread existente in the forum of users of the degree - 1135. ActRcvRepForDegTch Receive a message of answer in a thread existente in the forum of teachers of the degree - 1136. ActRcvRepForCtrUsr Receive a message of answer in a thread existente in the forum of users of centre - 1137. ActRcvRepForCtrTch Receive a message of answer in a thread existente in the forum of teachers of centre - 1138. ActRcvRepForInsUsr Receive a message of answer in a thread existente in the forum of users of the institution - 1139. ActRcvRepForInsTch Receive a message of answer in a thread existente in the forum of teachers of the institution - 1140. ActRcvRepForGenUsr Receive a message of answer in a thread existente in the forum of users general - 1141. ActRcvRepForGenTch Receive a message of answer in a thread existente in the forum of teachers general - 1142. ActRcvRepForSWAUsr Receive a message of answer in a thread existente in the forum of users of the platform - 1143. ActRcvRepForSWATch Receive a message of answer in a thread existente in the forum of teachers of the platform - 1144. ActReqDelThrCrsUsr Request the removal of a thread of forum of users of the course - 1145. ActReqDelThrCrsTch Request the removal of a thread of forum of teachers of the course - 1146. ActReqDelThrDegUsr Request the removal of a thread of forum of users of the degree - 1147. ActReqDelThrDegTch Request the removal of a thread of forum of teachers of the degree - 1148. ActReqDelThrCtrUsr Request the removal of a thread of forum of users of centre - 1149. ActReqDelThrCtrTch Request the removal of a thread of forum of teachers of centre - 1150. ActReqDelThrInsUsr Request the removal of a thread of forum of users of the institution - 1151. ActReqDelThrInsTch Request the removal of a thread of forum of teachers of the institution - 1152. ActReqDelThrGenUsr Request the removal of a thread of forum of users general - 1153. ActReqDelThrGenTch Request the removal of a thread of forum of teachers general - 1154. ActReqDelThrSWAUsr Request the removal of a thread of forum of users of the platform - 1155. ActReqDelThrSWATch Request the removal of a thread of forum of teachers of the platform - 1156. ActDelThrForCrsUsr Remove a thread of forum of users of the course - 1157. ActDelThrForCrsTch Remove a thread of forum of teachers of the course - 1158. ActDelThrForDegUsr Remove a thread of forum of users of the degree - 1159. ActDelThrForDegTch Remove a thread of forum of teachers of the degree - 1160. ActDelThrForCtrUsr Remove a thread of forum of users of centre - 1161. ActDelThrForCtrTch Remove a thread of forum of teachers of centre - 1162. ActDelThrForInsUsr Remove a thread of forum of users of the institution - 1163. ActDelThrForInsTch Remove a thread of forum of teachers of the institution - 1164. ActDelThrForGenUsr Remove a thread of forum of users general - 1165. ActDelThrForGenTch Remove a thread of forum of teachers general - 1166. ActDelThrForSWAUsr Remove a thread of forum of users of the platform - 1167. ActDelThrForSWATch Remove a thread of forum of teachers of the platform - 1168. ActCutThrForCrsUsr Cut a thread of forum of users of the course - 1169. ActCutThrForCrsTch Cut a thread of forum of teachers of the course - 1170. ActCutThrForDegUsr Cut a thread of forum of users of the degree - 1171. ActCutThrForDegTch Cut a thread of forum of teachers of the degree - 1172. ActCutThrForCtrUsr Cut a thread of forum of users of centre - 1173. ActCutThrForCtrTch Cut a thread of forum of teachers of centre - 1174. ActCutThrForInsUsr Cut a thread of forum of users of the institution - 1175. ActCutThrForInsTch Cut a thread of forum of teachers of the institution - 1176. ActCutThrForGenUsr Cut a thread of forum of users general - 1177. ActCutThrForGenTch Cut a thread of forum of teachers general - 1178. ActCutThrForSWAUsr Cut a thread of forum of users of the platform - 1179. ActCutThrForSWATch Cut a thread of forum of teachers of the platform - 1180. ActPasThrForCrsUsr Paste a thread of forum of users of the course - 1181. ActPasThrForCrsTch Paste a thread of forum of teachers of the course - 1182. ActPasThrForDegUsr Paste a thread of forum of users of the degree - 1183. ActPasThrForDegTch Paste a thread of forum of teachers of the degree - 1184. ActPasThrForCtrUsr Paste a thread of forum of users of centre - 1185. ActPasThrForCtrTch Paste a thread of forum of teachers of centre - 1186. ActPasThrForInsUsr Paste a thread of forum of users of the institution - 1187. ActPasThrForInsTch Paste a thread of forum of teachers of the institution - 1188. ActPasThrForGenUsr Paste a thread of forum of users general - 1189. ActPasThrForGenTch Paste a thread of forum of teachers general - 1190. ActPasThrForSWAUsr Paste a thread of forum of users of the platform - 1191. ActPasThrForSWATch Paste a thread of forum of teachers of the platform - 1192. ActDelPstForCrsUsr Remove a message of forum of users of the course - 1193. ActDelPstForCrsTch Remove a message of forum of teachers of the course - 1194. ActDelPstForDegUsr Remove a message of forum of users of the degree - 1195. ActDelPstForDegTch Remove a message of forum of teachers of the degree - 1196. ActDelPstForCtrUsr Remove a message of forum of users of centre - 1197. ActDelPstForCtrTch Remove a message of forum of teachers of centre - 1198. ActDelPstForInsUsr Remove a message of forum of users of the institution - 1199. ActDelPstForInsTch Remove a message of forum of teachers of the institution - 1200. ActDelPstForGenUsr Remove a message of forum of users general - 1201. ActDelPstForGenTch Remove a message of forum of teachers general - 1202. ActDelPstForSWAUsr Remove a message of forum of users of the platform - 1203. ActDelPstForSWATch Remove a message of forum of teachers of the platform - 1204. ActEnbPstForCrsUsr Enable a message of forum of users of the course - 1205. ActEnbPstForCrsTch Enable a message of forum of teachers of the course - 1206. ActEnbPstForDegUsr Enable a message of forum of users of the degree - 1207. ActEnbPstForDegTch Enable a message of forum of teachers of the degree - 1208. ActEnbPstForCtrUsr Enable a message of forum of users of centre - 1209. ActEnbPstForCtrTch Enable a message of forum of teachers of centre - 1210. ActEnbPstForInsUsr Enable a message of forum of users of the institution - 1211. ActEnbPstForInsTch Enable a message of forum of teachers of the institution - 1212. ActEnbPstForGenUsr Enable a message of forum of users general - 1213. ActEnbPstForGenTch Enable a message of forum of teachers general - 1214. ActEnbPstForSWAUsr Enable a message of forum of users of the platform - 1215. ActEnbPstForSWATch Enable a message of forum of teachers of the platform - 1216. ActDisPstForCrsUsr Disable a message of forum of users of the course - 1217. ActDisPstForCrsTch Disable a message of forum of teachers of the course - 1218. ActDisPstForDegUsr Disable a message of forum of users of the degree - 1219. ActDisPstForDegTch Disable a message of forum of teachers of the degree - 1220. ActDisPstForCtrUsr Disable a message of forum of users of centre - 1221. ActDisPstForCtrTch Disable a message of forum of teachers of centre - 1222. ActDisPstForInsUsr Disable a message of forum of users of the institution - 1223. ActDisPstForInsTch Disable a message of forum of teachers of the institution - 1224. ActDisPstForGenUsr Disable a message of forum of users general - 1225. ActDisPstForGenTch Disable a message of forum of teachers general - 1226. ActDisPstForSWAUsr Disable a message of forum of users of the platform - 1227. ActDisPstForSWATch Disable a message of forum of teachers of the platform + 1095. ActSeeForCrsUsr Show top level of forum of users of the course + 1096. ActSeeForCrsTch Show top level of forum of teachers of the course + 1097. ActSeeForDegUsr Show top level of forum of users of the degree + 1098. ActSeeForDegTch Show top level of forum of teachers of the degree + 1099. ActSeeForCtrUsr Show top level of forum of users of the centre + 1100. ActSeeForCtrTch Show top level of forum of teachers of the centre + 1101. ActSeeForInsUsr Show top level of forum of users of the institution + 1102. ActSeeForInsTch Show top level of forum of teachers of the institution + 1103. ActSeeForGenUsr Show top level of forum of users general + 1104. ActSeeForGenTch Show top level of forum of teachers general + 1105. ActSeeForSWAUsr Show top level of forum of users of the platform + 1106. ActSeeForSWATch Show top level of forum of teachers of the platform + 1107. ActSeePstForCrsUsr Show the messages of a thread of the forum of users of the course + 1108. ActSeePstForCrsTch Show the messages of a thread of the forum of teachers of the course + 1109. ActSeePstForDegUsr Show the messages of a thread of the forum of users of the degree + 1110. ActSeePstForDegTch Show the messages of a thread of the forum of teachers of the degree + 1111. ActSeePstForCtrUsr Show the messages of a thread of the forum of users of the centre + 1112. ActSeePstForCtrTch Show the messages of a thread of the forum of teachers of the centre + 1113. ActSeePstForInsUsr Show the messages of a thread of the forum of users of the institution + 1114. ActSeePstForInsTch Show the messages of a thread of the forum of teachers of the institution + 1115. ActSeePstForGenUsr Show the messages of a thread of the forum of users general + 1116. ActSeePstForGenTch Show the messages of a thread of the forum of teachers general + 1117. ActSeePstForSWAUsr Show the messages of a thread of the forum of users of the platform + 1118. ActSeePstForSWATch Show the messages of a thread of the forum of teachers of the platform + 1119. ActRcvThrForCrsUsr Receive the first message of a new thread of forum of users of the course + 1120. ActRcvThrForCrsTch Receive the first message of a new thread of forum of teachers of the course + 1121. ActRcvThrForDegUsr Receive the first message of a new thread of forum of users of the degree + 1122. ActRcvThrForDegTch Receive the first message of a new thread of forum of teachers of the degree + 1123. ActRcvThrForCtrUsr Receive the first message of a new thread of forum of users of centre + 1124. ActRcvThrForCtrTch Receive the first message of a new thread of forum of teachers of centre + 1125. ActRcvThrForInsUsr Receive the first message of a new thread of forum of users of the institution + 1126. ActRcvThrForInsTch Receive the first message of a new thread of forum of teachers of the institution + 1127. ActRcvThrForGenUsr Receive the first message of a new thread of forum of users general + 1128. ActRcvThrForGenTch Receive the first message of a new thread of forum of teachers general + 1129. ActRcvThrForSWAUsr Receive the first message of a new thread of forum of users of the platform + 1130. ActRcvThrForSWATch Receive the first message of a new thread of forum of teachers of the platform + 1131. ActRcvRepForCrsUsr Receive a message of answer in a thread existente in the forum of users of the course + 1132. ActRcvRepForCrsTch Receive a message of answer in a thread existente in the forum of teachers of the course + 1133. ActRcvRepForDegUsr Receive a message of answer in a thread existente in the forum of users of the degree + 1134. ActRcvRepForDegTch Receive a message of answer in a thread existente in the forum of teachers of the degree + 1135. ActRcvRepForCtrUsr Receive a message of answer in a thread existente in the forum of users of centre + 1136. ActRcvRepForCtrTch Receive a message of answer in a thread existente in the forum of teachers of centre + 1137. ActRcvRepForInsUsr Receive a message of answer in a thread existente in the forum of users of the institution + 1138. ActRcvRepForInsTch Receive a message of answer in a thread existente in the forum of teachers of the institution + 1139. ActRcvRepForGenUsr Receive a message of answer in a thread existente in the forum of users general + 1140. ActRcvRepForGenTch Receive a message of answer in a thread existente in the forum of teachers general + 1141. ActRcvRepForSWAUsr Receive a message of answer in a thread existente in the forum of users of the platform + 1142. ActRcvRepForSWATch Receive a message of answer in a thread existente in the forum of teachers of the platform + 1143. ActReqDelThrCrsUsr Request the removal of a thread of forum of users of the course + 1144. ActReqDelThrCrsTch Request the removal of a thread of forum of teachers of the course + 1145. ActReqDelThrDegUsr Request the removal of a thread of forum of users of the degree + 1146. ActReqDelThrDegTch Request the removal of a thread of forum of teachers of the degree + 1147. ActReqDelThrCtrUsr Request the removal of a thread of forum of users of centre + 1148. ActReqDelThrCtrTch Request the removal of a thread of forum of teachers of centre + 1149. ActReqDelThrInsUsr Request the removal of a thread of forum of users of the institution + 1150. ActReqDelThrInsTch Request the removal of a thread of forum of teachers of the institution + 1151. ActReqDelThrGenUsr Request the removal of a thread of forum of users general + 1152. ActReqDelThrGenTch Request the removal of a thread of forum of teachers general + 1153. ActReqDelThrSWAUsr Request the removal of a thread of forum of users of the platform + 1154. ActReqDelThrSWATch Request the removal of a thread of forum of teachers of the platform + 1155. ActDelThrForCrsUsr Remove a thread of forum of users of the course + 1156. ActDelThrForCrsTch Remove a thread of forum of teachers of the course + 1157. ActDelThrForDegUsr Remove a thread of forum of users of the degree + 1158. ActDelThrForDegTch Remove a thread of forum of teachers of the degree + 1159. ActDelThrForCtrUsr Remove a thread of forum of users of centre + 1160. ActDelThrForCtrTch Remove a thread of forum of teachers of centre + 1161. ActDelThrForInsUsr Remove a thread of forum of users of the institution + 1162. ActDelThrForInsTch Remove a thread of forum of teachers of the institution + 1163. ActDelThrForGenUsr Remove a thread of forum of users general + 1164. ActDelThrForGenTch Remove a thread of forum of teachers general + 1165. ActDelThrForSWAUsr Remove a thread of forum of users of the platform + 1166. ActDelThrForSWATch Remove a thread of forum of teachers of the platform + 1167. ActCutThrForCrsUsr Cut a thread of forum of users of the course + 1168. ActCutThrForCrsTch Cut a thread of forum of teachers of the course + 1169. ActCutThrForDegUsr Cut a thread of forum of users of the degree + 1170. ActCutThrForDegTch Cut a thread of forum of teachers of the degree + 1171. ActCutThrForCtrUsr Cut a thread of forum of users of centre + 1172. ActCutThrForCtrTch Cut a thread of forum of teachers of centre + 1173. ActCutThrForInsUsr Cut a thread of forum of users of the institution + 1174. ActCutThrForInsTch Cut a thread of forum of teachers of the institution + 1175. ActCutThrForGenUsr Cut a thread of forum of users general + 1176. ActCutThrForGenTch Cut a thread of forum of teachers general + 1177. ActCutThrForSWAUsr Cut a thread of forum of users of the platform + 1178. ActCutThrForSWATch Cut a thread of forum of teachers of the platform + 1179. ActPasThrForCrsUsr Paste a thread of forum of users of the course + 1180. ActPasThrForCrsTch Paste a thread of forum of teachers of the course + 1181. ActPasThrForDegUsr Paste a thread of forum of users of the degree + 1182. ActPasThrForDegTch Paste a thread of forum of teachers of the degree + 1183. ActPasThrForCtrUsr Paste a thread of forum of users of centre + 1184. ActPasThrForCtrTch Paste a thread of forum of teachers of centre + 1185. ActPasThrForInsUsr Paste a thread of forum of users of the institution + 1186. ActPasThrForInsTch Paste a thread of forum of teachers of the institution + 1187. ActPasThrForGenUsr Paste a thread of forum of users general + 1188. ActPasThrForGenTch Paste a thread of forum of teachers general + 1189. ActPasThrForSWAUsr Paste a thread of forum of users of the platform + 1190. ActPasThrForSWATch Paste a thread of forum of teachers of the platform + 1191. ActDelPstForCrsUsr Remove a message of forum of users of the course + 1192. ActDelPstForCrsTch Remove a message of forum of teachers of the course + 1193. ActDelPstForDegUsr Remove a message of forum of users of the degree + 1194. ActDelPstForDegTch Remove a message of forum of teachers of the degree + 1195. ActDelPstForCtrUsr Remove a message of forum of users of centre + 1196. ActDelPstForCtrTch Remove a message of forum of teachers of centre + 1197. ActDelPstForInsUsr Remove a message of forum of users of the institution + 1198. ActDelPstForInsTch Remove a message of forum of teachers of the institution + 1199. ActDelPstForGenUsr Remove a message of forum of users general + 1200. ActDelPstForGenTch Remove a message of forum of teachers general + 1201. ActDelPstForSWAUsr Remove a message of forum of users of the platform + 1202. ActDelPstForSWATch Remove a message of forum of teachers of the platform + 1203. ActEnbPstForCrsUsr Enable a message of forum of users of the course + 1204. ActEnbPstForCrsTch Enable a message of forum of teachers of the course + 1205. ActEnbPstForDegUsr Enable a message of forum of users of the degree + 1206. ActEnbPstForDegTch Enable a message of forum of teachers of the degree + 1207. ActEnbPstForCtrUsr Enable a message of forum of users of centre + 1208. ActEnbPstForCtrTch Enable a message of forum of teachers of centre + 1209. ActEnbPstForInsUsr Enable a message of forum of users of the institution + 1210. ActEnbPstForInsTch Enable a message of forum of teachers of the institution + 1211. ActEnbPstForGenUsr Enable a message of forum of users general + 1212. ActEnbPstForGenTch Enable a message of forum of teachers general + 1213. ActEnbPstForSWAUsr Enable a message of forum of users of the platform + 1214. ActEnbPstForSWATch Enable a message of forum of teachers of the platform + 1215. ActDisPstForCrsUsr Disable a message of forum of users of the course + 1216. ActDisPstForCrsTch Disable a message of forum of teachers of the course + 1217. ActDisPstForDegUsr Disable a message of forum of users of the degree + 1218. ActDisPstForDegTch Disable a message of forum of teachers of the degree + 1219. ActDisPstForCtrUsr Disable a message of forum of users of centre + 1220. ActDisPstForCtrTch Disable a message of forum of teachers of centre + 1221. ActDisPstForInsUsr Disable a message of forum of users of the institution + 1222. ActDisPstForInsTch Disable a message of forum of teachers of the institution + 1223. ActDisPstForGenUsr Disable a message of forum of users general + 1224. ActDisPstForGenTch Disable a message of forum of teachers general + 1225. ActDisPstForSWAUsr Disable a message of forum of users of the platform + 1226. ActDisPstForSWATch Disable a message of forum of teachers of the platform - 1228. ActCht Enter in a chat room to chat + 1227. ActCht Enter in a chat room to chat Messages: - 1229. ActSeeNtf Show my recent notifications - 1230. ActSeeAnn Show global announcements - 1231. ActSeeAllNot Show all notices - 1232. ActReqMsgUsr Write message to several users - 1233. ActSeeRcvMsg Show the messages received from other users (link in menu) - 1234. ActSeeSntMsg Show the messages sent to other users - 1235. ActMaiStd Send an email to students - 1236. ActWriAnn Show form to create a new global announcement - 1237. ActRcvAnn Receive and create a new global announcement - 1238. ActHidAnn Hide a global announcement that was active - 1239. ActRevAnn Reveal a global announcement that was hidden - 1240. ActRemAnn Remove global announcement - 1241. ActSeeOneNot Show (expand) a notice - 1242. ActWriNot Write a new notice - 1243. ActRcvNot Receive and create a new notice - 1244. ActHidNot Hide a notice that was active - 1245. ActRevNot Reveal a notice that was hidden - 1246. ActReqRemNot Request removal of a notice - 1247. ActRemNot Remove a notice + 1228. ActSeeNtf Show my recent notifications + 1229. ActSeeAnn Show global announcements + 1230. ActSeeAllNot Show all notices + 1231. ActReqMsgUsr Write message to several users + 1232. ActSeeRcvMsg Show the messages received from other users (link in menu) + 1233. ActSeeSntMsg Show the messages sent to other users + 1234. ActMaiStd Send an email to students + 1235. ActWriAnn Show form to create a new global announcement + 1236. ActRcvAnn Receive and create a new global announcement + 1237. ActHidAnn Hide a global announcement that was active + 1238. ActRevAnn Reveal a global announcement that was hidden + 1239. ActRemAnn Remove global announcement + 1240. ActSeeOneNot Show (expand) a notice + 1241. ActWriNot Write a new notice + 1242. ActRcvNot Receive and create a new notice + 1243. ActHidNot Hide a notice that was active + 1244. ActRevNot Reveal a notice that was hidden + 1245. ActReqRemNot Request removal of a notice + 1246. ActRemNot Remove a notice - 1248. ActSeeNewNtf Show my recent notifications (link in top heading) - 1249. ActMrkNtfSee Mark all my notifications as seen - 1250. ActSeeMai See mail domains - 1251. ActEdiMai Edit mail domains - 1252. ActNewMai Request the creation of a mail domain - 1253. ActRemMai Request the removal of a mail domain - 1254. ActRenMaiSho Request the change of a mail domain - 1255. ActRenMaiFul Request the change of the info of a mail domain + 1247. ActSeeNewNtf Show my recent notifications (link in top heading) + 1248. ActMrkNtfSee Mark all my notifications as seen + 1249. ActSeeMai See mail domains + 1250. ActEdiMai Edit mail domains + 1251. ActNewMai Request the creation of a mail domain + 1252. ActRemMai Request the removal of a mail domain + 1253. ActRenMaiSho Request the change of a mail domain + 1254. ActRenMaiFul Request the change of the info of a mail domain - 1256. ActRcvMsgUsr Sent/Receive a message of a user - 1257. ActReqDelAllSntMsg Request the removal of todos the messages sent to other users - 1258. ActReqDelAllRcvMsg Request the removal of todos the messages received from other users - 1259. ActDelAllSntMsg Remove todos the messages sent to other users - 1260. ActDelAllRcvMsg Remove todos the messages received from other users - 1261. ActDelSntMsg Remove a message sent to other users - 1262. ActDelRcvMsg Remove a message received from other user - 1263. ActExpSntMsg See (expand) sent message - 1264. ActExpRcvMsg See (expand) received message - 1265. ActConSntMsg Hide (contract) sent message - 1266. ActConRcvMsg Hide (contract) received message - 1267. ActLstBanUsr List banned users - 1268. ActBanUsrMsg Ban the sender of a message when showing received messages - 1269. ActUnbUsrMsg Unban the sender of a message when showing received messages - 1270. ActUnbUsrLst Unban a user when listing banned users + 1255. ActRcvMsgUsr Sent/Receive a message of a user + 1256. ActReqDelAllSntMsg Request the removal of todos the messages sent to other users + 1257. ActReqDelAllRcvMsg Request the removal of todos the messages received from other users + 1258. ActDelAllSntMsg Remove todos the messages sent to other users + 1259. ActDelAllRcvMsg Remove todos the messages received from other users + 1260. ActDelSntMsg Remove a message sent to other users + 1261. ActDelRcvMsg Remove a message received from other user + 1262. ActExpSntMsg See (expand) sent message + 1263. ActExpRcvMsg See (expand) received message + 1264. ActConSntMsg Hide (contract) sent message + 1265. ActConRcvMsg Hide (contract) received message + 1266. ActLstBanUsr List banned users + 1267. ActBanUsrMsg Ban the sender of a message when showing received messages + 1268. ActUnbUsrMsg Unban the sender of a message when showing received messages + 1269. ActUnbUsrLst Unban a user when listing banned users Statistics: - 1271. ActReqUseGbl Request showing use of the platform - 1272. ActSeePhoDeg Show a class photo with the average photos of the students of each degree - 1273. ActReqStaCrs Request statistics of courses - 1274. ActReqAccGbl Request query of clicks to the complete platform - 1275. ActReqMyUsgRep Request my usage report - 1276. ActMFUAct Show most frequently used actions + 1270. ActReqUseGbl Request showing use of the platform + 1271. ActSeePhoDeg Show a class photo with the average photos of the students of each degree + 1272. ActReqStaCrs Request statistics of courses + 1273. ActReqAccGbl Request query of clicks to the complete platform + 1274. ActReqMyUsgRep Request my usage report + 1275. ActMFUAct Show most frequently used actions + + 1276. ActSeeUseGbl Show use of the platform + 1277. ActPrnPhoDeg Show vista of impresión of the class photo with the average photos of the students of each degree. + 1278. ActCalPhoDeg Compute the average photos of the students of each degree + 1279. ActSeeAccGbl Query clicks to the complete platform + 1280. ActReqAccCrs Request query of clicks in the course + 1281. ActSeeAccCrs Query clicks to current course + 1282. ActSeeAllStaCrs Show statistics of courses + + 1283. ActLstClk List last clicks in real time - 1277. ActSeeUseGbl Show use of the platform - 1278. ActPrnPhoDeg Show vista of impresión of the class photo with the average photos of the students of each degree. - 1279. ActCalPhoDeg Compute the average photos of the students of each degree - 1280. ActSeeAccGbl Query clicks to the complete platform - 1281. ActReqAccCrs Request query of clicks in the course - 1282. ActSeeAccCrs Query clicks to current course - 1283. ActSeeAllStaCrs Show statistics of courses 1284. ActSeeMyUsgRep Show my usage report Profile: @@ -2843,8 +2844,6 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActLstSimUsr */{1579,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Dup_GetUsrCodAndListSimilarUsrs,NULL}, /* ActRemDupUsr */{1580,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Dup_RemoveUsrFromListDupUsrs ,NULL}, - /* ActLstClk */{ 989,-1,TabUnk,ActLstCon ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Con_ShowLastClicks ,NULL}, - // TabSoc ****************************************************************** /* ActSeeSocTmlGbl */{1490, 0,TabSoc,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ShowTimelineGbl2 ,"comment-dots" }, /* ActSeeSocPrf */{1520, 1,TabSoc,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_SeeSocialProfiles ,"user-check" }, @@ -3106,6 +3105,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeeAccCrs */{ 119,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeCrsAccesses ,NULL}, /* ActSeeAllStaCrs */{ 768,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Ind_ShowIndicatorsCourses ,NULL}, + /* ActLstClk */{ 989,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_ShowLastClicks ,NULL}, + /* ActSeeMyUsgRep */{1582,-1,TabUnk,ActReqMyUsgRep ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rep_ShowMyUsageReport ,NULL}, // TabPrf ****************************************************************** diff --git a/swad_action.h b/swad_action.h index 66c6fbb0..af1d7f9a 100644 --- a/swad_action.h +++ b/swad_action.h @@ -61,7 +61,7 @@ typedef enum typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 41 + 24 + 115 + 157 + 437 + 166 + 172 + 42 + 14 + 76) +#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 41 + 24 + 115 + 157 + 437 + 165 + 172 + 42 + 15 + 76) #define Act_MAX_ACTION_COD 1752 @@ -1274,191 +1274,189 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActLstSimUsr (ActRemOldBrf + 164) #define ActRemDupUsr (ActRemOldBrf + 165) -#define ActLstClk (ActRemOldBrf + 166) - /*****************************************************************************/ /******************************** Social tab *********************************/ /*****************************************************************************/ // Actions in menu -#define ActSeeSocTmlGbl (ActLstClk + 1) -#define ActSeeSocPrf (ActLstClk + 2) -#define ActSeeFor (ActLstClk + 3) -#define ActSeeChtRms (ActLstClk + 4) +#define ActSeeSocTmlGbl (ActRemDupUsr + 1) +#define ActSeeSocPrf (ActRemDupUsr + 2) +#define ActSeeFor (ActRemDupUsr + 3) +#define ActSeeChtRms (ActRemDupUsr + 4) // Secondary actions -#define ActRcvSocPstGbl (ActLstClk + 5) -#define ActRcvSocComGbl (ActLstClk + 6) -#define ActShaSocNotGbl (ActLstClk + 7) -#define ActUnsSocNotGbl (ActLstClk + 8) -#define ActFavSocNotGbl (ActLstClk + 9) -#define ActUnfSocNotGbl (ActLstClk + 10) -#define ActFavSocComGbl (ActLstClk + 11) -#define ActUnfSocComGbl (ActLstClk + 12) -#define ActReqRemSocPubGbl (ActLstClk + 13) -#define ActRemSocPubGbl (ActLstClk + 14) -#define ActReqRemSocComGbl (ActLstClk + 15) -#define ActRemSocComGbl (ActLstClk + 16) +#define ActRcvSocPstGbl (ActRemDupUsr + 5) +#define ActRcvSocComGbl (ActRemDupUsr + 6) +#define ActShaSocNotGbl (ActRemDupUsr + 7) +#define ActUnsSocNotGbl (ActRemDupUsr + 8) +#define ActFavSocNotGbl (ActRemDupUsr + 9) +#define ActUnfSocNotGbl (ActRemDupUsr + 10) +#define ActFavSocComGbl (ActRemDupUsr + 11) +#define ActUnfSocComGbl (ActRemDupUsr + 12) +#define ActReqRemSocPubGbl (ActRemDupUsr + 13) +#define ActRemSocPubGbl (ActRemDupUsr + 14) +#define ActReqRemSocComGbl (ActRemDupUsr + 15) +#define ActRemSocComGbl (ActRemDupUsr + 16) -#define ActReqOthPubPrf (ActLstClk + 17) +#define ActReqOthPubPrf (ActRemDupUsr + 17) -#define ActRcvSocPstUsr (ActLstClk + 18) -#define ActRcvSocComUsr (ActLstClk + 19) -#define ActShaSocNotUsr (ActLstClk + 20) -#define ActUnsSocNotUsr (ActLstClk + 21) -#define ActFavSocNotUsr (ActLstClk + 22) -#define ActUnfSocNotUsr (ActLstClk + 23) -#define ActFavSocComUsr (ActLstClk + 24) -#define ActUnfSocComUsr (ActLstClk + 25) -#define ActReqRemSocPubUsr (ActLstClk + 26) -#define ActRemSocPubUsr (ActLstClk + 27) -#define ActReqRemSocComUsr (ActLstClk + 28) -#define ActRemSocComUsr (ActLstClk + 29) +#define ActRcvSocPstUsr (ActRemDupUsr + 18) +#define ActRcvSocComUsr (ActRemDupUsr + 19) +#define ActShaSocNotUsr (ActRemDupUsr + 20) +#define ActUnsSocNotUsr (ActRemDupUsr + 21) +#define ActFavSocNotUsr (ActRemDupUsr + 22) +#define ActUnfSocNotUsr (ActRemDupUsr + 23) +#define ActFavSocComUsr (ActRemDupUsr + 24) +#define ActUnfSocComUsr (ActRemDupUsr + 25) +#define ActReqRemSocPubUsr (ActRemDupUsr + 26) +#define ActRemSocPubUsr (ActRemDupUsr + 27) +#define ActReqRemSocComUsr (ActRemDupUsr + 28) +#define ActRemSocComUsr (ActRemDupUsr + 29) -#define ActSeeOthPubPrf (ActLstClk + 30) -#define ActCal1stClkTim (ActLstClk + 31) -#define ActCalNumClk (ActLstClk + 32) -#define ActCalNumFilVie (ActLstClk + 33) -#define ActCalNumForPst (ActLstClk + 34) -#define ActCalNumMsgSnt (ActLstClk + 35) +#define ActSeeOthPubPrf (ActRemDupUsr + 30) +#define ActCal1stClkTim (ActRemDupUsr + 31) +#define ActCalNumClk (ActRemDupUsr + 32) +#define ActCalNumFilVie (ActRemDupUsr + 33) +#define ActCalNumForPst (ActRemDupUsr + 34) +#define ActCalNumMsgSnt (ActRemDupUsr + 35) -#define ActFolUsr (ActLstClk + 36) -#define ActUnfUsr (ActLstClk + 37) -#define ActSeeFlg (ActLstClk + 38) -#define ActSeeFlr (ActLstClk + 39) +#define ActFolUsr (ActRemDupUsr + 36) +#define ActUnfUsr (ActRemDupUsr + 37) +#define ActSeeFlg (ActRemDupUsr + 38) +#define ActSeeFlr (ActRemDupUsr + 39) -#define ActSeeForCrsUsr (ActLstClk + 40) -#define ActSeeForCrsTch (ActLstClk + 41) -#define ActSeeForDegUsr (ActLstClk + 42) -#define ActSeeForDegTch (ActLstClk + 43) -#define ActSeeForCtrUsr (ActLstClk + 44) -#define ActSeeForCtrTch (ActLstClk + 45) -#define ActSeeForInsUsr (ActLstClk + 46) -#define ActSeeForInsTch (ActLstClk + 47) -#define ActSeeForGenUsr (ActLstClk + 48) -#define ActSeeForGenTch (ActLstClk + 49) -#define ActSeeForSWAUsr (ActLstClk + 50) -#define ActSeeForSWATch (ActLstClk + 51) -#define ActSeePstForCrsUsr (ActLstClk + 52) -#define ActSeePstForCrsTch (ActLstClk + 53) -#define ActSeePstForDegUsr (ActLstClk + 54) -#define ActSeePstForDegTch (ActLstClk + 55) -#define ActSeePstForCtrUsr (ActLstClk + 56) -#define ActSeePstForCtrTch (ActLstClk + 57) -#define ActSeePstForInsUsr (ActLstClk + 58) -#define ActSeePstForInsTch (ActLstClk + 59) -#define ActSeePstForGenUsr (ActLstClk + 60) -#define ActSeePstForGenTch (ActLstClk + 61) -#define ActSeePstForSWAUsr (ActLstClk + 62) -#define ActSeePstForSWATch (ActLstClk + 63) -#define ActRcvThrForCrsUsr (ActLstClk + 64) -#define ActRcvThrForCrsTch (ActLstClk + 65) -#define ActRcvThrForDegUsr (ActLstClk + 66) -#define ActRcvThrForDegTch (ActLstClk + 67) -#define ActRcvThrForCtrUsr (ActLstClk + 68) -#define ActRcvThrForCtrTch (ActLstClk + 69) -#define ActRcvThrForInsUsr (ActLstClk + 70) -#define ActRcvThrForInsTch (ActLstClk + 71) -#define ActRcvThrForGenUsr (ActLstClk + 72) -#define ActRcvThrForGenTch (ActLstClk + 73) -#define ActRcvThrForSWAUsr (ActLstClk + 74) -#define ActRcvThrForSWATch (ActLstClk + 75) -#define ActRcvRepForCrsUsr (ActLstClk + 76) -#define ActRcvRepForCrsTch (ActLstClk + 77) -#define ActRcvRepForDegUsr (ActLstClk + 78) -#define ActRcvRepForDegTch (ActLstClk + 79) -#define ActRcvRepForCtrUsr (ActLstClk + 80) -#define ActRcvRepForCtrTch (ActLstClk + 81) -#define ActRcvRepForInsUsr (ActLstClk + 82) -#define ActRcvRepForInsTch (ActLstClk + 83) -#define ActRcvRepForGenUsr (ActLstClk + 84) -#define ActRcvRepForGenTch (ActLstClk + 85) -#define ActRcvRepForSWAUsr (ActLstClk + 86) -#define ActRcvRepForSWATch (ActLstClk + 87) -#define ActReqDelThrCrsUsr (ActLstClk + 88) -#define ActReqDelThrCrsTch (ActLstClk + 89) -#define ActReqDelThrDegUsr (ActLstClk + 90) -#define ActReqDelThrDegTch (ActLstClk + 91) -#define ActReqDelThrCtrUsr (ActLstClk + 92) -#define ActReqDelThrCtrTch (ActLstClk + 93) -#define ActReqDelThrInsUsr (ActLstClk + 94) -#define ActReqDelThrInsTch (ActLstClk + 95) -#define ActReqDelThrGenUsr (ActLstClk + 96) -#define ActReqDelThrGenTch (ActLstClk + 97) -#define ActReqDelThrSWAUsr (ActLstClk + 98) -#define ActReqDelThrSWATch (ActLstClk + 99) -#define ActDelThrForCrsUsr (ActLstClk + 100) -#define ActDelThrForCrsTch (ActLstClk + 101) -#define ActDelThrForDegUsr (ActLstClk + 102) -#define ActDelThrForDegTch (ActLstClk + 103) -#define ActDelThrForCtrUsr (ActLstClk + 104) -#define ActDelThrForCtrTch (ActLstClk + 105) -#define ActDelThrForInsUsr (ActLstClk + 106) -#define ActDelThrForInsTch (ActLstClk + 107) -#define ActDelThrForGenUsr (ActLstClk + 108) -#define ActDelThrForGenTch (ActLstClk + 109) -#define ActDelThrForSWAUsr (ActLstClk + 110) -#define ActDelThrForSWATch (ActLstClk + 111) -#define ActCutThrForCrsUsr (ActLstClk + 112) -#define ActCutThrForCrsTch (ActLstClk + 113) -#define ActCutThrForDegUsr (ActLstClk + 114) -#define ActCutThrForDegTch (ActLstClk + 115) -#define ActCutThrForCtrUsr (ActLstClk + 116) -#define ActCutThrForCtrTch (ActLstClk + 117) -#define ActCutThrForInsUsr (ActLstClk + 118) -#define ActCutThrForInsTch (ActLstClk + 119) -#define ActCutThrForGenUsr (ActLstClk + 120) -#define ActCutThrForGenTch (ActLstClk + 121) -#define ActCutThrForSWAUsr (ActLstClk + 122) -#define ActCutThrForSWATch (ActLstClk + 123) -#define ActPasThrForCrsUsr (ActLstClk + 124) -#define ActPasThrForCrsTch (ActLstClk + 125) -#define ActPasThrForDegUsr (ActLstClk + 126) -#define ActPasThrForDegTch (ActLstClk + 127) -#define ActPasThrForCtrUsr (ActLstClk + 128) -#define ActPasThrForCtrTch (ActLstClk + 129) -#define ActPasThrForInsUsr (ActLstClk + 130) -#define ActPasThrForInsTch (ActLstClk + 131) -#define ActPasThrForGenUsr (ActLstClk + 132) -#define ActPasThrForGenTch (ActLstClk + 133) -#define ActPasThrForSWAUsr (ActLstClk + 134) -#define ActPasThrForSWATch (ActLstClk + 135) -#define ActDelPstForCrsUsr (ActLstClk + 136) -#define ActDelPstForCrsTch (ActLstClk + 137) -#define ActDelPstForDegUsr (ActLstClk + 138) -#define ActDelPstForDegTch (ActLstClk + 139) -#define ActDelPstForCtrUsr (ActLstClk + 140) -#define ActDelPstForCtrTch (ActLstClk + 141) -#define ActDelPstForInsUsr (ActLstClk + 142) -#define ActDelPstForInsTch (ActLstClk + 143) -#define ActDelPstForGenUsr (ActLstClk + 144) -#define ActDelPstForGenTch (ActLstClk + 145) -#define ActDelPstForSWAUsr (ActLstClk + 146) -#define ActDelPstForSWATch (ActLstClk + 147) -#define ActEnbPstForCrsUsr (ActLstClk + 148) -#define ActEnbPstForCrsTch (ActLstClk + 149) -#define ActEnbPstForDegUsr (ActLstClk + 150) -#define ActEnbPstForDegTch (ActLstClk + 151) -#define ActEnbPstForCtrUsr (ActLstClk + 152) -#define ActEnbPstForCtrTch (ActLstClk + 153) -#define ActEnbPstForInsUsr (ActLstClk + 154) -#define ActEnbPstForInsTch (ActLstClk + 155) -#define ActEnbPstForGenUsr (ActLstClk + 156) -#define ActEnbPstForGenTch (ActLstClk + 157) -#define ActEnbPstForSWAUsr (ActLstClk + 158) -#define ActEnbPstForSWATch (ActLstClk + 159) -#define ActDisPstForCrsUsr (ActLstClk + 160) -#define ActDisPstForCrsTch (ActLstClk + 161) -#define ActDisPstForDegUsr (ActLstClk + 162) -#define ActDisPstForDegTch (ActLstClk + 163) -#define ActDisPstForCtrUsr (ActLstClk + 164) -#define ActDisPstForCtrTch (ActLstClk + 165) -#define ActDisPstForInsUsr (ActLstClk + 166) -#define ActDisPstForInsTch (ActLstClk + 167) -#define ActDisPstForGenUsr (ActLstClk + 168) -#define ActDisPstForGenTch (ActLstClk + 169) -#define ActDisPstForSWAUsr (ActLstClk + 170) -#define ActDisPstForSWATch (ActLstClk + 171) +#define ActSeeForCrsUsr (ActRemDupUsr + 40) +#define ActSeeForCrsTch (ActRemDupUsr + 41) +#define ActSeeForDegUsr (ActRemDupUsr + 42) +#define ActSeeForDegTch (ActRemDupUsr + 43) +#define ActSeeForCtrUsr (ActRemDupUsr + 44) +#define ActSeeForCtrTch (ActRemDupUsr + 45) +#define ActSeeForInsUsr (ActRemDupUsr + 46) +#define ActSeeForInsTch (ActRemDupUsr + 47) +#define ActSeeForGenUsr (ActRemDupUsr + 48) +#define ActSeeForGenTch (ActRemDupUsr + 49) +#define ActSeeForSWAUsr (ActRemDupUsr + 50) +#define ActSeeForSWATch (ActRemDupUsr + 51) +#define ActSeePstForCrsUsr (ActRemDupUsr + 52) +#define ActSeePstForCrsTch (ActRemDupUsr + 53) +#define ActSeePstForDegUsr (ActRemDupUsr + 54) +#define ActSeePstForDegTch (ActRemDupUsr + 55) +#define ActSeePstForCtrUsr (ActRemDupUsr + 56) +#define ActSeePstForCtrTch (ActRemDupUsr + 57) +#define ActSeePstForInsUsr (ActRemDupUsr + 58) +#define ActSeePstForInsTch (ActRemDupUsr + 59) +#define ActSeePstForGenUsr (ActRemDupUsr + 60) +#define ActSeePstForGenTch (ActRemDupUsr + 61) +#define ActSeePstForSWAUsr (ActRemDupUsr + 62) +#define ActSeePstForSWATch (ActRemDupUsr + 63) +#define ActRcvThrForCrsUsr (ActRemDupUsr + 64) +#define ActRcvThrForCrsTch (ActRemDupUsr + 65) +#define ActRcvThrForDegUsr (ActRemDupUsr + 66) +#define ActRcvThrForDegTch (ActRemDupUsr + 67) +#define ActRcvThrForCtrUsr (ActRemDupUsr + 68) +#define ActRcvThrForCtrTch (ActRemDupUsr + 69) +#define ActRcvThrForInsUsr (ActRemDupUsr + 70) +#define ActRcvThrForInsTch (ActRemDupUsr + 71) +#define ActRcvThrForGenUsr (ActRemDupUsr + 72) +#define ActRcvThrForGenTch (ActRemDupUsr + 73) +#define ActRcvThrForSWAUsr (ActRemDupUsr + 74) +#define ActRcvThrForSWATch (ActRemDupUsr + 75) +#define ActRcvRepForCrsUsr (ActRemDupUsr + 76) +#define ActRcvRepForCrsTch (ActRemDupUsr + 77) +#define ActRcvRepForDegUsr (ActRemDupUsr + 78) +#define ActRcvRepForDegTch (ActRemDupUsr + 79) +#define ActRcvRepForCtrUsr (ActRemDupUsr + 80) +#define ActRcvRepForCtrTch (ActRemDupUsr + 81) +#define ActRcvRepForInsUsr (ActRemDupUsr + 82) +#define ActRcvRepForInsTch (ActRemDupUsr + 83) +#define ActRcvRepForGenUsr (ActRemDupUsr + 84) +#define ActRcvRepForGenTch (ActRemDupUsr + 85) +#define ActRcvRepForSWAUsr (ActRemDupUsr + 86) +#define ActRcvRepForSWATch (ActRemDupUsr + 87) +#define ActReqDelThrCrsUsr (ActRemDupUsr + 88) +#define ActReqDelThrCrsTch (ActRemDupUsr + 89) +#define ActReqDelThrDegUsr (ActRemDupUsr + 90) +#define ActReqDelThrDegTch (ActRemDupUsr + 91) +#define ActReqDelThrCtrUsr (ActRemDupUsr + 92) +#define ActReqDelThrCtrTch (ActRemDupUsr + 93) +#define ActReqDelThrInsUsr (ActRemDupUsr + 94) +#define ActReqDelThrInsTch (ActRemDupUsr + 95) +#define ActReqDelThrGenUsr (ActRemDupUsr + 96) +#define ActReqDelThrGenTch (ActRemDupUsr + 97) +#define ActReqDelThrSWAUsr (ActRemDupUsr + 98) +#define ActReqDelThrSWATch (ActRemDupUsr + 99) +#define ActDelThrForCrsUsr (ActRemDupUsr + 100) +#define ActDelThrForCrsTch (ActRemDupUsr + 101) +#define ActDelThrForDegUsr (ActRemDupUsr + 102) +#define ActDelThrForDegTch (ActRemDupUsr + 103) +#define ActDelThrForCtrUsr (ActRemDupUsr + 104) +#define ActDelThrForCtrTch (ActRemDupUsr + 105) +#define ActDelThrForInsUsr (ActRemDupUsr + 106) +#define ActDelThrForInsTch (ActRemDupUsr + 107) +#define ActDelThrForGenUsr (ActRemDupUsr + 108) +#define ActDelThrForGenTch (ActRemDupUsr + 109) +#define ActDelThrForSWAUsr (ActRemDupUsr + 110) +#define ActDelThrForSWATch (ActRemDupUsr + 111) +#define ActCutThrForCrsUsr (ActRemDupUsr + 112) +#define ActCutThrForCrsTch (ActRemDupUsr + 113) +#define ActCutThrForDegUsr (ActRemDupUsr + 114) +#define ActCutThrForDegTch (ActRemDupUsr + 115) +#define ActCutThrForCtrUsr (ActRemDupUsr + 116) +#define ActCutThrForCtrTch (ActRemDupUsr + 117) +#define ActCutThrForInsUsr (ActRemDupUsr + 118) +#define ActCutThrForInsTch (ActRemDupUsr + 119) +#define ActCutThrForGenUsr (ActRemDupUsr + 120) +#define ActCutThrForGenTch (ActRemDupUsr + 121) +#define ActCutThrForSWAUsr (ActRemDupUsr + 122) +#define ActCutThrForSWATch (ActRemDupUsr + 123) +#define ActPasThrForCrsUsr (ActRemDupUsr + 124) +#define ActPasThrForCrsTch (ActRemDupUsr + 125) +#define ActPasThrForDegUsr (ActRemDupUsr + 126) +#define ActPasThrForDegTch (ActRemDupUsr + 127) +#define ActPasThrForCtrUsr (ActRemDupUsr + 128) +#define ActPasThrForCtrTch (ActRemDupUsr + 129) +#define ActPasThrForInsUsr (ActRemDupUsr + 130) +#define ActPasThrForInsTch (ActRemDupUsr + 131) +#define ActPasThrForGenUsr (ActRemDupUsr + 132) +#define ActPasThrForGenTch (ActRemDupUsr + 133) +#define ActPasThrForSWAUsr (ActRemDupUsr + 134) +#define ActPasThrForSWATch (ActRemDupUsr + 135) +#define ActDelPstForCrsUsr (ActRemDupUsr + 136) +#define ActDelPstForCrsTch (ActRemDupUsr + 137) +#define ActDelPstForDegUsr (ActRemDupUsr + 138) +#define ActDelPstForDegTch (ActRemDupUsr + 139) +#define ActDelPstForCtrUsr (ActRemDupUsr + 140) +#define ActDelPstForCtrTch (ActRemDupUsr + 141) +#define ActDelPstForInsUsr (ActRemDupUsr + 142) +#define ActDelPstForInsTch (ActRemDupUsr + 143) +#define ActDelPstForGenUsr (ActRemDupUsr + 144) +#define ActDelPstForGenTch (ActRemDupUsr + 145) +#define ActDelPstForSWAUsr (ActRemDupUsr + 146) +#define ActDelPstForSWATch (ActRemDupUsr + 147) +#define ActEnbPstForCrsUsr (ActRemDupUsr + 148) +#define ActEnbPstForCrsTch (ActRemDupUsr + 149) +#define ActEnbPstForDegUsr (ActRemDupUsr + 150) +#define ActEnbPstForDegTch (ActRemDupUsr + 151) +#define ActEnbPstForCtrUsr (ActRemDupUsr + 152) +#define ActEnbPstForCtrTch (ActRemDupUsr + 153) +#define ActEnbPstForInsUsr (ActRemDupUsr + 154) +#define ActEnbPstForInsTch (ActRemDupUsr + 155) +#define ActEnbPstForGenUsr (ActRemDupUsr + 156) +#define ActEnbPstForGenTch (ActRemDupUsr + 157) +#define ActEnbPstForSWAUsr (ActRemDupUsr + 158) +#define ActEnbPstForSWATch (ActRemDupUsr + 159) +#define ActDisPstForCrsUsr (ActRemDupUsr + 160) +#define ActDisPstForCrsTch (ActRemDupUsr + 161) +#define ActDisPstForDegUsr (ActRemDupUsr + 162) +#define ActDisPstForDegTch (ActRemDupUsr + 163) +#define ActDisPstForCtrUsr (ActRemDupUsr + 164) +#define ActDisPstForCtrTch (ActRemDupUsr + 165) +#define ActDisPstForInsUsr (ActRemDupUsr + 166) +#define ActDisPstForInsTch (ActRemDupUsr + 167) +#define ActDisPstForGenUsr (ActRemDupUsr + 168) +#define ActDisPstForGenTch (ActRemDupUsr + 169) +#define ActDisPstForSWAUsr (ActRemDupUsr + 170) +#define ActDisPstForSWATch (ActRemDupUsr + 171) -#define ActCht (ActLstClk + 172) +#define ActCht (ActRemDupUsr + 172) /*****************************************************************************/ /******************************* Messages tab ********************************/ @@ -1530,7 +1528,9 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActSeeAccCrs (ActUnbUsrLst + 12) #define ActSeeAllStaCrs (ActUnbUsrLst + 13) -#define ActSeeMyUsgRep (ActUnbUsrLst + 14) +#define ActLstClk (ActUnbUsrLst + 14) + +#define ActSeeMyUsgRep (ActUnbUsrLst + 15) /*****************************************************************************/ /******************************** Profile tab ********************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 8691a044..23d2a2da 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -348,8 +348,6 @@ Buenos d // TODO: Fix bug: un usuario no identificado no debería ver el icono para acceder a sus asignaturas en la opción de buscar. -// TODO: La pestaña Evaluación debería estar visible para un usuario identificado sin asignatura seleccionada, al menos para ver las encuestas globales. - /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ @@ -369,10 +367,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.31.3 (2019-01-11)" +#define Log_PLATFORM_VERSION "SWAD 18.31.4 (2019-01-11)" #define CSS_FILE "swad18.31.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.31.4: Jan 11, 2019 Option for last clicks is moved to analytics tab. (239587 lines) Version 18.31.3: Jan 11, 2019 Changes in some icons. (239533 lines) Copy the following icons to icon public directory: sudo cp icon/chart-line.svg /var/www/html/swad/icon/ diff --git a/swad_connected.c b/swad_connected.c index b2dec8a5..4e6aeae3 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -39,7 +39,6 @@ #include "swad_hierarchy.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_role.h" #include "swad_string.h" #include "swad_table.h" #include "swad_user.h" @@ -74,7 +73,6 @@ static void Con_ComputeConnectedUsrsWithARoleCurrentCrsOneByOne (Rol_Role_t Role static void Con_ShowConnectedUsrsCurrentCrsOneByOneOnRightColumn (Rol_Role_t Role); static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role); static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t Role); -static void Con_WriteHoursMinutesSecondsFromSeconds (time_t Seconds); /*****************************************************************************/ /************************** Show connected users *****************************/ @@ -141,213 +139,6 @@ static void Con_PutIconToUpdateConnected (void) Frm_EndForm (); } -/*****************************************************************************/ -/*************** Put a link to show last clicks in real time *****************/ -/*****************************************************************************/ - -void Con_PutLinkToLastClicks (void) - { - extern const char *Txt_Last_clicks; - - Lay_PutContextualLink (ActLstClk,NULL,NULL, - "mouse-pointer.svg", - Txt_Last_clicks,Txt_Last_clicks, - NULL); - } - -/*****************************************************************************/ -/****************************** Show last clicks *****************************/ -/*****************************************************************************/ - -void Con_ShowLastClicks (void) - { - extern const char *Hlp_USERS_Connected_last_clicks; - extern const char *Txt_Last_clicks_in_real_time; - - /***** Start box *****/ - Box_StartBox (NULL,Txt_Last_clicks_in_real_time,NULL, - Hlp_USERS_Connected_last_clicks,Box_NOT_CLOSABLE); - - /***** Get and show last clicks *****/ - fprintf (Gbl.F.Out,"
"); - Con_GetAndShowLastClicks (); - fprintf (Gbl.F.Out,"
"); // Used for AJAX based refresh - - /***** End box *****/ - Box_EndBox (); - } - -/*****************************************************************************/ -/**************** Get last clicks from database and show them ****************/ -/*****************************************************************************/ - -void Con_GetAndShowLastClicks (void) - { - extern const char *Txt_Click; - extern const char *Txt_ELAPSED_TIME; - extern const char *Txt_Role; - extern const char *Txt_Country; - extern const char *Txt_Institution; - extern const char *Txt_Centre; - extern const char *Txt_Degree; - extern const char *Txt_Action; - extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; - MYSQL_RES *mysql_res; - MYSQL_ROW row; - unsigned long NumRow; - unsigned long NumRows; - long ActCod; - const char *ClassRow; - time_t TimeDiff; - struct Country Cty; - struct Instit Ins; - struct Centre Ctr; - struct Degree Deg; - - /***** Get last clicks from database *****/ - /* Important for maximum performance: - do the LIMIT in the big log table before the JOIN */ - NumRows = DB_QuerySELECT (&mysql_res,"can not get last clicks", - "SELECT last_logs.LogCod,last_logs.ActCod," - "last_logs.Dif,last_logs.Role," - "last_logs.CtyCod,last_logs.InsCod," - "last_logs.CtrCod,last_logs.DegCod," - "actions.Txt" - " FROM" - " (SELECT LogCod,ActCod," - "UNIX_TIMESTAMP()-UNIX_TIMESTAMP(ClickTime) AS Dif," - "Role,CtyCod,InsCod,CtrCod,DegCod" - " FROM log_recent ORDER BY LogCod DESC LIMIT 20)" - " AS last_logs,actions" - " WHERE last_logs.ActCod=actions.ActCod" - " AND actions.Language='es'"); - - /***** Write list of connected users *****/ - Tbl_StartTableCenter (1); - fprintf (Gbl.F.Out,"" - "" - "%s" // Click - "" - "" - "%s" // Elapsed time - "" - "" - "%s" // Role - "" - "" - "%s" // Country - "" - "" - "%s" // Institution - "" - "" - "%s" // Centre - "" - "" - "%s" // Degree - "" - "" - "%s" // Action - "" - "", - Txt_Click, - Txt_ELAPSED_TIME, - Txt_Role, - Txt_Country, - Txt_Institution, - Txt_Centre, - Txt_Degree, - Txt_Action); - - for (NumRow = 0; - NumRow < NumRows; - NumRow++) - { - row = mysql_fetch_row (mysql_res); - - /* Get action code (row[1]) */ - ActCod = Str_ConvertStrCodToLongCod (row[1]); - - /* Use a special color for this row depending on the action */ - ClassRow = (Act_GetBrowserTab (Act_GetActionFromActCod (ActCod)) == Act_DOWNLD_FILE) ? "DAT_SMALL_YELLOW LEFT_MIDDLE" : - (ActCod == Act_GetActCod (ActLogIn ) || - ActCod == Act_GetActCod (ActLogInNew)) ? "DAT_SMALL_GREEN" : - (ActCod == Act_GetActCod (ActLogOut )) ? "DAT_SMALL_RED" : - (ActCod == Act_GetActCod (ActWebSvc )) ? "DAT_SMALL_BLUE" : - "DAT_SMALL_GREY"; - - /* Compute elapsed time from last access */ - if (sscanf (row[2],"%ld",&TimeDiff) != 1) - TimeDiff = (time_t) 0; - - /* Get country code (row[4]) */ - Cty.CtyCod = Str_ConvertStrCodToLongCod (row[4]); - Cty_GetCountryName (Cty.CtyCod,Cty.Name[Gbl.Prefs.Language]); - - /* Get institution code (row[5]) */ - Ins.InsCod = Str_ConvertStrCodToLongCod (row[5]); - Ins_GetShortNameOfInstitution (&Ins); - - /* Get centre code (row[6]) */ - Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[6]); - Ctr_GetShortNameOfCentreByCod (&Ctr); - - /* Get degree code (row[7]) */ - Deg.DegCod = Str_ConvertStrCodToLongCod (row[7]); - Deg_GetShortNameOfDegreeByCod (&Deg); - - /* Print table row */ - fprintf (Gbl.F.Out,"" - "" - "%s" // Click - "" - "" // Elapsed time - "", - ClassRow,row[0], - ClassRow); - Con_WriteHoursMinutesSecondsFromSeconds (TimeDiff); - fprintf (Gbl.F.Out,"" - "" - "%s" // Role - "" - "" - "%s" // Country - "" - "" - "%s" // Institution - "" - "" - "%s" // Centre - "" - "" - "%s" // Degree - "" - "" - "%s" // Action - "" - "", - ClassRow,Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN], - ClassRow,Cty.Name[Gbl.Prefs.Language], - ClassRow,Ins.ShrtName, - ClassRow,Ctr.ShrtName, - ClassRow,Deg.ShrtName, - ClassRow,row[8]); - } - Tbl_EndTable (); - - /***** Free structure that stores the query result *****/ - mysql_free_result (mysql_res); - } - /*****************************************************************************/ /******************** Show total number of connected users *******************/ /*****************************************************************************/ @@ -1071,7 +862,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) fprintf (Gbl.F.Out,"
", Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column - Con_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff); + Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff); fprintf (Gbl.F.Out,"
"); // Used for automatic update, only when displayed on right column fprintf (Gbl.F.Out,"" @@ -1288,7 +1079,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R fprintf (Gbl.F.Out,"", Font,Gbl.RowEvenOdd); - Con_WriteHoursMinutesSecondsFromSeconds (TimeDiff); + Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); fprintf (Gbl.F.Out,"" ""); @@ -1304,31 +1095,6 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R DB_FreeMySQLResult (&mysql_res); } -/*****************************************************************************/ -/********* Write time difference in seconds as hours:minutes:seconds *********/ -/*****************************************************************************/ -// TimeDiff must be in seconds - -static void Con_WriteHoursMinutesSecondsFromSeconds (time_t Seconds) - { - time_t Hours = Seconds / (60 * 60); - time_t Minutes = (Seconds / 60) % 60; - - Seconds %= 60; - if (Hours) - fprintf (Gbl.F.Out,"%ld:%02ld'%02ld"", - (long) Hours, - (long) Minutes, - (long) Seconds); - else if (Minutes) - fprintf (Gbl.F.Out,"%ld'%02ld"", - (long) Minutes, - (long) Seconds); - else - fprintf (Gbl.F.Out,"%ld"", - (long) Seconds); - } - /*****************************************************************************/ /****** Write script to automatically update clocks of connected users *******/ /*****************************************************************************/ diff --git a/swad_connected.h b/swad_connected.h index 3e7387f2..6a8e9a84 100644 --- a/swad_connected.h +++ b/swad_connected.h @@ -51,9 +51,6 @@ struct ConnectedUsrs /*****************************************************************************/ void Con_ShowConnectedUsrs (void); -void Con_PutLinkToLastClicks (void); -void Con_ShowLastClicks (void); -void Con_GetAndShowLastClicks (void); void Con_ShowGlobalConnectedUsrs (void); void Con_ComputeConnectedUsrsBelongingToCurrentCrs (void); void Con_ShowConnectedUsrsBelongingToCurrentCrs (void); diff --git a/swad_date.c b/swad_date.c index 230abc13..64162e04 100644 --- a/swad_date.c +++ b/swad_date.c @@ -1537,3 +1537,29 @@ void Dat_WriteScriptMonths (void) } fprintf (Gbl.F.Out,"];\n"); } + +/*****************************************************************************/ +/********* Write time difference in seconds as hours:minutes:seconds *********/ +/*****************************************************************************/ +// TimeDiff must be in seconds + +void Dat_WriteHoursMinutesSecondsFromSeconds (time_t Seconds) + { + time_t Hours = Seconds / (60 * 60); + time_t Minutes = (Seconds / 60) % 60; + + Seconds %= 60; + if (Hours) + fprintf (Gbl.F.Out,"%ld:%02ld'%02ld"", + (long) Hours, + (long) Minutes, + (long) Seconds); + else if (Minutes) + fprintf (Gbl.F.Out,"%ld'%02ld"", + (long) Minutes, + (long) Seconds); + else + fprintf (Gbl.F.Out,"%ld"", + (long) Seconds); + } + diff --git a/swad_date.h b/swad_date.h index 807e8ba8..6615ccc6 100644 --- a/swad_date.h +++ b/swad_date.h @@ -188,4 +188,6 @@ void Dat_AssignDate (struct Date *DateDst,struct Date *DateSrc); void Dat_WriteScriptMonths (void); +void Dat_WriteHoursMinutesSecondsFromSeconds (time_t Seconds); + #endif diff --git a/swad_layout.c b/swad_layout.c index 12ba4667..2c5bc6bd 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1404,7 +1404,7 @@ void Lay_RefreshLastClicks (void) fprintf (Gbl.F.Out,"%lu|",Cfg_TIME_TO_REFRESH_LAST_CLICKS); /***** Get and show last clicks *****/ - Con_GetAndShowLastClicks (); + Sta_GetAndShowLastClicks (); } /***** All the output is made, so don't write anymore *****/ diff --git a/swad_statistic.c b/swad_statistic.c index 27af138e..c021f14a 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -54,6 +54,7 @@ #include "swad_parameter.h" #include "swad_profile.h" #include "swad_project.h" +#include "swad_role.h" #include "swad_social.h" #include "swad_statistic.h" #include "swad_tab.h" @@ -139,6 +140,9 @@ typedef enum /***************************** Internal prototypes ***************************/ /*****************************************************************************/ +static void Sta_PutLinkToCourseHits (void); +static void Sta_PutLinkToGlobalHits (void); + static void Sta_WriteSelectorCountType (void); static void Sta_WriteSelectorAction (void); static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse); @@ -425,6 +429,17 @@ void Sta_AskShowCrsHits (void) Sta_ClicksGroupedBy_t ClicksGroupedBy; unsigned long i; + /***** Contextual links *****/ + fprintf (Gbl.F.Out,"
"); + + /* Put form to go to test edition and configuration */ + Sta_PutLinkToGlobalHits (); + + /* Link to show last clicks in real time */ + Con_PutLinkToLastClicks (); + + fprintf (Gbl.F.Out,"
"); + /***** Get and update type of list, number of columns in class photo and preference about view photos *****/ @@ -602,7 +617,6 @@ void Sta_AskShowGblHits (void) { extern const char *Hlp_ANALYTICS_Visits_global_visits; extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Visits_to_course; extern const char *Txt_Statistics_of_all_visits; extern const char *Txt_Users; extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT]; @@ -618,20 +632,7 @@ void Sta_AskShowGblHits (void) fprintf (Gbl.F.Out,"
"); /* Put form to go to test edition and configuration */ - if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected - switch (Gbl.Usrs.Me.Role.Logged) - { - case Rol_NET: - case Rol_TCH: - case Rol_SYS_ADM: - Lay_PutContextualLink (ActReqAccCrs,NULL,NULL, - "chart-line.svg", - Txt_Visits_to_course,Txt_Visits_to_course, - NULL); - break; - default: - break; - } + Sta_PutLinkToCourseHits (); /* Link to show last clicks in real time */ Con_PutLinkToLastClicks (); @@ -737,6 +738,44 @@ void Sta_AskShowGblHits (void) Frm_EndForm (); } +/*****************************************************************************/ +/*************** Put a link to show visits to current course *****************/ +/*****************************************************************************/ + +static void Sta_PutLinkToCourseHits (void) + { + extern const char *Txt_Visits_to_course; + + if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected + switch (Gbl.Usrs.Me.Role.Logged) + { + case Rol_NET: + case Rol_TCH: + case Rol_SYS_ADM: + Lay_PutContextualLink (ActReqAccCrs,NULL,NULL, + "chart-line.svg", + Txt_Visits_to_course,Txt_Visits_to_course, + NULL); + break; + default: + break; + } + } + +/*****************************************************************************/ +/********************* Put a link to show global visits **********************/ +/*****************************************************************************/ + +static void Sta_PutLinkToGlobalHits (void) + { + extern const char *Txt_Global_visits; + + Lay_PutContextualLink (ActReqAccGbl,NULL,NULL, + "chart-line.svg", + Txt_Global_visits,Txt_Global_visits, + NULL); + } + /*****************************************************************************/ /****** Put selectors for type of access count and for degree or course ******/ /*****************************************************************************/ @@ -9616,3 +9655,223 @@ void Sta_WriteTime (char Str[Dat_MAX_BYTES_TIME],long TimeInMicroseconds) TimeInMicroseconds / (60 * 1000000L), (TimeInMicroseconds / 1000000L) % 60); } + + +/*****************************************************************************/ +/*************** Put a link to show last clicks in real time *****************/ +/*****************************************************************************/ + +void Con_PutLinkToLastClicks (void) + { + extern const char *Txt_Last_clicks; + + Lay_PutContextualLink (ActLstClk,NULL,NULL, + "mouse-pointer.svg", + Txt_Last_clicks,Txt_Last_clicks, + NULL); + } + +/*****************************************************************************/ +/****************************** Show last clicks *****************************/ +/*****************************************************************************/ + +void Sta_ShowLastClicks (void) + { + extern const char *Hlp_USERS_Connected_last_clicks; + extern const char *Txt_Last_clicks_in_real_time; + + /***** Contextual links *****/ + fprintf (Gbl.F.Out,"
"); + + /* Put form to go to test edition and configuration */ + Sta_PutLinkToGlobalHits (); + + /* Put form to go to test edition and configuration */ + Sta_PutLinkToCourseHits (); + + fprintf (Gbl.F.Out,"
"); + + /***** Start box *****/ + Box_StartBox (NULL,Txt_Last_clicks_in_real_time,NULL, + Hlp_USERS_Connected_last_clicks,Box_NOT_CLOSABLE); + + /***** Get and show last clicks *****/ + fprintf (Gbl.F.Out,"
"); + Sta_GetAndShowLastClicks (); + fprintf (Gbl.F.Out,"
"); // Used for AJAX based refresh + + /***** End box *****/ + Box_EndBox (); + } + +/*****************************************************************************/ +/**************** Get last clicks from database and show them ****************/ +/*****************************************************************************/ + +void Sta_GetAndShowLastClicks (void) + { + extern const char *Txt_Click; + extern const char *Txt_ELAPSED_TIME; + extern const char *Txt_Role; + extern const char *Txt_Country; + extern const char *Txt_Institution; + extern const char *Txt_Centre; + extern const char *Txt_Degree; + extern const char *Txt_Action; + extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; + MYSQL_RES *mysql_res; + MYSQL_ROW row; + unsigned long NumRow; + unsigned long NumRows; + long ActCod; + const char *ClassRow; + time_t TimeDiff; + struct Country Cty; + struct Instit Ins; + struct Centre Ctr; + struct Degree Deg; + + /***** Get last clicks from database *****/ + /* Important for maximum performance: + do the LIMIT in the big log table before the JOIN */ + NumRows = DB_QuerySELECT (&mysql_res,"can not get last clicks", + "SELECT last_logs.LogCod,last_logs.ActCod," + "last_logs.Dif,last_logs.Role," + "last_logs.CtyCod,last_logs.InsCod," + "last_logs.CtrCod,last_logs.DegCod," + "actions.Txt" + " FROM" + " (SELECT LogCod,ActCod," + "UNIX_TIMESTAMP()-UNIX_TIMESTAMP(ClickTime) AS Dif," + "Role,CtyCod,InsCod,CtrCod,DegCod" + " FROM log_recent ORDER BY LogCod DESC LIMIT 20)" + " AS last_logs,actions" + " WHERE last_logs.ActCod=actions.ActCod" + " AND actions.Language='es'"); + + /***** Write list of connected users *****/ + Tbl_StartTableCenter (1); + fprintf (Gbl.F.Out,"" + "" + "%s" // Click + "" + "" + "%s" // Elapsed time + "" + "" + "%s" // Role + "" + "" + "%s" // Country + "" + "" + "%s" // Institution + "" + "" + "%s" // Centre + "" + "" + "%s" // Degree + "" + "" + "%s" // Action + "" + "", + Txt_Click, + Txt_ELAPSED_TIME, + Txt_Role, + Txt_Country, + Txt_Institution, + Txt_Centre, + Txt_Degree, + Txt_Action); + + for (NumRow = 0; + NumRow < NumRows; + NumRow++) + { + row = mysql_fetch_row (mysql_res); + + /* Get action code (row[1]) */ + ActCod = Str_ConvertStrCodToLongCod (row[1]); + + /* Use a special color for this row depending on the action */ + ClassRow = (Act_GetBrowserTab (Act_GetActionFromActCod (ActCod)) == Act_DOWNLD_FILE) ? "DAT_SMALL_YELLOW LEFT_MIDDLE" : + (ActCod == Act_GetActCod (ActLogIn ) || + ActCod == Act_GetActCod (ActLogInNew)) ? "DAT_SMALL_GREEN" : + (ActCod == Act_GetActCod (ActLogOut )) ? "DAT_SMALL_RED" : + (ActCod == Act_GetActCod (ActWebSvc )) ? "DAT_SMALL_BLUE" : + "DAT_SMALL_GREY"; + + /* Compute elapsed time from last access */ + if (sscanf (row[2],"%ld",&TimeDiff) != 1) + TimeDiff = (time_t) 0; + + /* Get country code (row[4]) */ + Cty.CtyCod = Str_ConvertStrCodToLongCod (row[4]); + Cty_GetCountryName (Cty.CtyCod,Cty.Name[Gbl.Prefs.Language]); + + /* Get institution code (row[5]) */ + Ins.InsCod = Str_ConvertStrCodToLongCod (row[5]); + Ins_GetShortNameOfInstitution (&Ins); + + /* Get centre code (row[6]) */ + Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[6]); + Ctr_GetShortNameOfCentreByCod (&Ctr); + + /* Get degree code (row[7]) */ + Deg.DegCod = Str_ConvertStrCodToLongCod (row[7]); + Deg_GetShortNameOfDegreeByCod (&Deg); + + /* Print table row */ + fprintf (Gbl.F.Out,"" + "" + "%s" // Click + "" + "" // Elapsed time + "", + ClassRow,row[0], + ClassRow); + Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); + fprintf (Gbl.F.Out,"" + "" + "%s" // Role + "" + "" + "%s" // Country + "" + "" + "%s" // Institution + "" + "" + "%s" // Centre + "" + "" + "%s" // Degree + "" + "" + "%s" // Action + "" + "", + ClassRow,Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN], + ClassRow,Cty.Name[Gbl.Prefs.Language], + ClassRow,Ins.ShrtName, + ClassRow,Ctr.ShrtName, + ClassRow,Deg.ShrtName, + ClassRow,row[8]); + } + Tbl_EndTable (); + + /***** Free structure that stores the query result *****/ + mysql_free_result (mysql_res); + } + diff --git a/swad_statistic.h b/swad_statistic.h index a75917e2..964f4d75 100644 --- a/swad_statistic.h +++ b/swad_statistic.h @@ -191,4 +191,8 @@ void Sta_ComputeTimeToSendPage (void); void Sta_WriteTimeToGenerateAndSendPage (void); void Sta_WriteTime (char Str[Dat_MAX_BYTES_TIME],long TimeInMicroseconds); +void Con_PutLinkToLastClicks (void); +void Sta_ShowLastClicks (void); +void Sta_GetAndShowLastClicks (void); + #endif diff --git a/swad_text.c b/swad_text.c index 477eed4b..38a5e385 100644 --- a/swad_text.c +++ b/swad_text.c @@ -13567,6 +13567,27 @@ const char *Txt_Get_a_new_password = "Obter uma nova senha"; #endif +const char *Txt_Global_visits = +#if L==1 // ca + "Accessos globals"; +#elif L==2 // de + "Globale Anmeldungen"; +#elif L==3 // en + "Global visits"; +#elif L==4 // es + "Accesos globales"; +#elif L==5 // fr + "Visites globales"; +#elif L==6 // gn + "Accesos globales"; // Okoteve traducción +#elif L==7 // it + "Accessi globali"; +#elif L==8 // pl + "Globalne wizyty"; +#elif L==9 // pt + "Visitas globais"; +#endif + const char *Txt_Go_back = #if L==1 // ca "Tornar enrere"; @@ -41613,23 +41634,23 @@ const char *Txt_Statistics_of_all_visits = const char *Txt_Statistics_of_visits_to_the_course_X = // Warning: it is very important to include %s in the following sentences #if L==1 // ca - "Estadística d'accessos a l'assignatura %s"; + "Estadística d'accessos a l'assignatura %s"; #elif L==2 // de - "Statistics of visits to the course %s"; // Need Übersetzung + "Statistik der Besuche des Kurses %s"; #elif L==3 // en - "Statistics of visits to the course %s"; + "Statistics of visits to the course %s"; #elif L==4 // es - "Estadística de accesos a la asignatura %s"; + "Estadística de accesos a la asignatura %s"; #elif L==5 // fr - "Statistics of visits to the course %s"; // Besoin de traduction + "Statistiques de visites a la matière %s"; #elif L==6 // gn - "Estadística de accesos a la asignatura %s"; // Okoteve traducción + "Estadística de accesos a la asignatura %s"; // Okoteve traducción #elif L==7 // it - "Statistiche degli accessi al corso %s"; + "Statistiche delle visite al corso %s"; #elif L==8 // pl - "Statistics of visits to the course %s"; // Potrzebujesz tlumaczenie + "Statystyki odwiedzin kursu %s"; #elif L==9 // pt - "Estatísticas de visitas à disciplina %s"; + "Estatísticas de visitas à disciplina %s"; #endif const char *Txt_Status =