block:dashboard:querycatalogue:queryusersresourcestypes

Catalogue de requêtes génériques

Block Dashboard (Elément de tableau de bord)

Liste des ressources consultées par utilisateurs

  • Actuellement sur 5 types de ressources : url, tests, devoirs, page, dossier
  • Filtrage par cours
  • Filtrage par usager

SELECT

 CONCAT(cm.id, '-', u.id) as pkey,
 CONCAT(u.lastname, ' ', u.firstname) as user,
 cm.id,
 c.shortname as sn,
 c.fullname as fn,
 cc1.name as cc1,
 m.name as rtype,
 CASE WHEN m.name = 'resource' THEN r.name
            WHEN m.name = 'page' THEN p.name
            WHEN m.name = 'url' THEN ur.name
            WHEN m.name = 'quiz' THEN q.name
            WHEN m.name = 'workshop' THEN w.name
            WHEN m.name = 'folder' THEN f.name ELSE 'N.C.' END as rname,
 COUNT(*) as viewes,
 MAX(l.timecreated) as lastview

FROM

 {modules} m,
 {user} u,
 {course} c,
 {course_categories} cc1,
 {logstore_standard_log} l,
 {course_modules} cm

LEFT JOIN

 {resource} r

ON

 r.id = cm.instance

LEFT JOIN

 {url} ur

ON

 ur.id = cm.instance

LEFT JOIN

 {folder} f

ON

 f.id = cm.instance

LEFT JOIN

 {quiz} q

ON

 q.id = cm.instance

LEFT JOIN

 {page} p

ON

 p.id = cm.instance

LEFT JOIN

 {workshop} w

ON

 w.id = cm.instance

WHERE

 m.id = cm.module AND
 m.name IN('resource', 'page', 'url', 'folder', 'quiz') AND
 cm.course = c.id AND
 cc1.id = c.category AND
 l.objecttable = m.name AND
 l.objectid = cm.instance AND
 l.userid = u.id AND
 l.action = 'viewed'
 
 <%%FILTERS%%>

GROUP BY

  CONCAT(cm.id, '-', u.id)

Configuration

Tzo4OiJzdGRDbGFzcyI6MTA0OntzOjU6InRpdGxlIjtzOjQ4OiJMaXN0ZSBkZXMgcmVzc291cmNlcyBjb25zdWx0w6llcyBwYXIgdXRpbGlzYXRldXIiO3M6MTM6ImluYmxvY2tsYXlvdXQiO3M6MToiMCI7czo2OiJ0YXJnZXQiO3M6NjoibW9vZGxlIjtzOjg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oiZmlsZW91dHB1dCI7czowOiIiO3M6MTc6ImZpbGVvdXRwdXRmb3JtYXRzIjtzOjA6IiI7czoxMDoiZmlsZWZvcm1hdCI7czozOiJDU1YiO3M6MTU6ImZpbGVzcWxvdXR0YWJsZSI7czowOiIiO3M6MTI6ImZpbGVsb2NhdGlvbiI7czowOiIiO3M6MjE6ImZpbGVwYXRoYWRtaW5vdmVycmlkZSI7czowOiIiO3M6ODoic2F2ZXZpZXciO3M6MjM6IkVucmVnaXN0cmVyIGV0IGFmZmljaGVyIjtzOjk6InNxbHBhcmFtcyI7TjtzOjk6ImlzcnVubmluZyI7aTowO3M6ODoibGFzdGNyb24iO2k6MDt9

Crédits

  • Valéry Frémaux (valery@activeprolearn.com)- Développements et documentation
  • Florence Labord (florence@activeprolearn.com) - documentation

Revenir au catalogue de requêtes génériques - Index du composant - Revenir à l'index des plugins - Revenir au catalogue

block/dashboard/querycatalogue/queryusersresourcestypes.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki