openacs-4/.../www/tracking-rte/list.tcl (deleted)
1   set man_id [ ad_get_client_property trackingrte man_id ]
2   set community_id [dotlrn_community::get_community_id]
3  
4   template::list::create \
5       -name students \
6       -multirow students \
7       -elements {
8           course_name {
9                   label "Course title"
10           }
11           user_id {
12                   label "student ID"
13                   display_eval {[person::name -person_id $user_id]}
14                   link_url_col drill_url
15           }
16           max_attained {
17                   label "Max raw score attained by this student"
18           }
19  
20       }
21  
22   db_multirow \
23       -extend {
24           edit_url
25           drill_url
26       } students which_students {
27           select user_id, course_name,  max(score_raw) as max_attained from
28                   (
29                   select *
30                   from
31                           lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif
32                   where
33                           lorsm.community_id=:community_id
34                   and
35                           lorsm.track_id=cmi.track_id
36                   and
37                           lorsm.course_id=:man_id
38                   and
39                           manif.man_id=:man_id
40                   ) alltracks
41                   group by
42                           user_id, course_name
43     } {
44           set edit_url [export_vars -base "drill-student" {user_id}]
45           set drill_url [export_vars -base "drill-student" {user_id}]
46       }
47