sql

You are currently browsing articles tagged sql.

CE/Vista Reports and Tracking displays summaries of activity. If an instructor seeks to know who clicked on a specific file, then Reports and Tracking falls down on the job.

Course Instructor can produce a report of the raw tracking data. However, access to the role falls under the Administration tab so people running the system need to make a user specifically to enroll themselves at the course level to get the reports. (Annoying.)

Instead the administrators for my campuses pass up to my level of support requests to generate reports. For providing these I have SQL to produce a report. This example is for users who clicked on a specific file. Anything in bold is what the SQL composer will need to alter.

set lines 200 pages 9999
col user format a20
col action format a32
col pagename format a80

clear breaks computes
break on User skip 1
compute count of Action on User

select tp.user_name "User",ta.name "Action",
      to_char(tua.event_time,'MM/DD/RR HH24:MI:SS') "Time",
      NVL(tpg.name,'--') "PageName"
  from trk_person tp, trk_action ta, trk_user_action tua,
      trk_page tpg, learning_context lc
  where tp.id = tua.trk_person_id
    and ta.id = tua.trk_action_id
    and tua.trk_page_id = tpg.id (+)
    and tua.trk_learning_context_id = lc.id
    and lc.id = 1234567890
    and tpg.name like '%filename.doc%'
  order by tp.user_name,tua.event_time
/

Output

  • User aka tp.user_name – This is the student’s account.
  • Action aka ta.name – This is an artifact of the original script. You might drop it as meaningless from this report.
  • Time aka tua.event_time – Day and time the action took place.
  • PageName aka tpg.name – Confirmation of the file name. Keep if using like in a select on this.

Considerations

I use the learning context id (lc.id aka learning_context.id) because in my multi-institution environment, the same name of a section could be used in many places. This id ensures I data from multiple sections.

The tricky part is identifying the file name. HTML files generally will show up as the name of in the title tag (hope the instructor never updates it). Office documents generally will show as the file name. Here are a couple approaches to determining how to use tpg.name (aka trk_page.name).

  1. Look at the file in the user interface.
  2. Run the report without limiting results to any tpg.name. Identify out of the results the name you wish to search and use: tpg.name = ‘page name

Most tracked actions do have a page name. However, some actions do not. This SQL is designed to print a “–” in those cases.


Related posts

If Blackboard opens up the schema for Vista 8, then maybe I’ll feel more comfortable sharing the reporting SQL I use. Ron Santos has a good PowerPoint on SQL for reports at Simon Frasier University.


Related posts

George and I talked about this some last night.

Nature vs Nurture… I tend to think of both as bottlenecks for human development. The debate about which does more to me makes as much sense as debating which is better for a web application: Apache or MySQL? Both are involved and affect the end results. The debate should be about how to leverage the synergy of both, but that is another blog post.

We humans have 46 chromosomes. 23 from each parent which come in pairs. Males have an XY pair. Females have an XX pair. Brain Rules was the first I’ve read that ~1500 brain-related genes are on the X and ~100 on the Y (and losing ~5 every million years). So the X chromosome is quite important for determining brain development.

For boys, the one X they have comes from the mother. Girls inherit an X chromosome from both her mother or father. To set up the strong potential of great genes for boys, look to women who are really intelligent. That tells you there is a 50% shot for the boy to get a good X. If both of the woman’s parents are intellectuals, even better.

Be smart about it though… Don’t make an IQ score for the parents part of a prenuptual agreement.

My mother has occasionally said things I enjoy remind her of her father. That’s a biased sample. 
:)


Related posts

Earlier in the week I picked on a DBA at UGA for wanting to use truncate learning_context. Overheard at the office a developer used truncate and caused those DBAs to recover the data. Ugh.


Related posts

Clusters can making finding where a user was working a clusterf***. Users end up on a node, but they don’t know which node. Heck, we are ahead of the curve to get user name, date, and time. Usually checking all the nodes in the past few days can net you the sessions. Capturing the session ids in the web server logs usually leads to finding an error in the webct logs. Though not always. Digging through the web server logs to find where the user was doing something similar to the appropriate activity consumes days.

Blackboard Vista captures node information for where the action took place. Reports against the tracking data provide more concise, more easily understood, and more quickly compiled. They are fantastic for getting a clear understanding of what steps a user took.

Web server logs contain every hit which includes every page view (well, almost, the gap is another post). Tracking data represents at best 25% of the page views. This problem is perhaps the only reason I favor logs over tracking data. More cryptic data usually means a slower resolution time not faster.

Another issue with tracking is the scope. When profiling student behavior, it is great. The problem is only okay data can be located for instructors while designers and administrators are almost totally under the radar. With the new outer join, what we can get for these oblivious roles has been greatly expanded.

Certainly, I try not to rely too much on a single source of data. Even I sometimes forget to do so.


Related posts

Blackboard Vista tracks student activity. This tracking data is viewed as a critical feature of Vista. Our instructors depended on the information until we revoked their ability to run reports themselves due to performance issues. Campus administrators can still generate reports (though some still fail). We doubt the solution to this is Blackboard improving the queries to create the reports. We favor deleting tracking data (data preserved outside of Vista) to resolve the performance issues.

We developed SQL reports to look at the tracking data where the user in question was not a student. Yes, the data is limited, but in determining when and where a user was active, can help determine where to look in logs. When we hit the performance issues we started using these reports where the user interface reports failed to generate.

My understanding was the user interface and SQL reports on tracking were the same. Both looked at the same data. The user interface reports were just sexier wrapped in HTML and using icons. I compared a user interface report to a SQL report. Just prior to doing this, I was thinking, WebCT was stupid for not tracking when students look at the list of assessments. Turns out “Assessment list viewed” was tracked in the user interface all along but was missing in our sqlplus queries. WTF?

The data has to be there. The problem has to be our approach in sqlplus is inadvertently excluding the information from the reports. Because these reports must be accurate, I’ll crack this nut… Or become nuts myself.

CRACKED THE NUT: So, part of the data WebCT collected was the name of pages. There is a page name table which was inner joined to the user action table. So pages without a name were not reported. George suggested an outer join. I placed it on the page name table which now lets us see the formerly missing tracked actions. For the specific case where I found this, I now get all the missing actions.

Considering a Blackboard (it’s their problem now) feature request to ensure every page in the application has a title. I consider it developer laziness (someone else said worthlessness) that some pages might not have something so core and simple.

ANOTHER TRICK: Oracle’s NVL function displays a piece of text instead of a null value. Awesome for the above.


Related posts

Chancellor Eroll B. Davis Jr told the Georgia Board of Regents, “We grew essentially by a large university.” The USG gained 10,077 students (my alma mater has ~11,000) in a year. They calculate these fall term to fall term.

In the same fall term to fall term time period, in the same same university system, GeorgiaVIEW gained about 59,000 students (assumes 1/10th of 65,000 active user growth are instructors/designers). Its only 9x the system growth rate. It actually reflects a slowing in the growth rate for GeorgiaVIEW. Partly this is because we are fast approaching the number of potential users. Market penetration becomes more difficult when people are using it.

Fortunately, users will become more intelligent in their use over time. So, even though the number of users may plateau, because each user will use the system more, the amount of use will continue to increase.

Unfortunately, another DBA and I consider the number of users a more or less uninformative statistic. It looks good in news papers as its something the general public probably understands. Other numbers mean more for us:

  1. Hits – The count of items downloaded from the web servers. We often use hits as a measure of user activity. Unfortunately, we are only collecting this at the daily or monthly values.
  2. Who Is Online (Total / Active) – SQL pulls from the WIO table a count of all the rows (Total) and those whose time in the table is recent (Active). Both have issues… For example, users failing to logout and inflate the total. Active has weird spikes which suggests to me these tables are reaped every 1/2 hour or so.
  3. Storage – Amount of information stored by the users. For example, our storage growth is 2.23 times the previous year (slowing down from 2.25). The number of new users has largely slowed, but the amount of storage staying fairly consistent means to me the users are doing more with the system.

Amy’s presentation at BbWorld 2007 on capacity planning is a much more authoritative approach than this blog post.
:)


Related posts


Related posts


Related posts


Related posts

« Older entries