final check of CR queries start-work-070517
authorwneuper
Thu, 08 Nov 2007 20:01:10 +0100
branchstart-work-070517
changeset 246ea6a48957597
parent 245 dabdaff6e091
child 247 1a09cd704a03
final check of CR queries
admin/protocols/070914-CR-WN.txt
admin/protocols/071108-CR-WN.txt
src/sql/queries.sql
     1.1 --- a/admin/protocols/070914-CR-WN.txt	Thu Nov 08 18:54:18 2007 +0100
     1.2 +++ b/admin/protocols/070914-CR-WN.txt	Thu Nov 08 20:01:10 2007 +0100
     1.3 @@ -79,15 +79,15 @@
     1.4  
     1.5   #5# how difficult are the examples ?
     1.6  
     1.7 -ID  | Example | Success | Failure
     1.8 -----+---------+---------+----------
     1.9 -[1] | [2]     | [3]     | [4]      
    1.10 +ID  | Example | Calculated | Success
    1.11 +----+---------+------------+----------
    1.12 +[1] | [2]     | [3]        | [4]      
    1.13  
    1.14  [1] Argument of LO_OPEN_WORKSHEET, eg. exp_IsacCore_Tests_1b.xml
    1.15  [2] FormulaTo of LO_OPEN_WORKSHEET, eg. solve (x + 1 = 2, x)
    1.16 -[3] int-number of Success for this particular example
    1.17 -[4] int-number of Non-Success for this particular example.
    1.18 -Sorted by Success.
    1.19 +[3] int-number counting how oftern this exp has been started
    1.20 +[4] int-number of Success for this particular example in % of [3]
    1.21 +Sorted by Success (the percentage).
    1.22  
    1.23   #6# who are the most frequent users of isac ?
    1.24  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/admin/protocols/071108-CR-WN.txt	Thu Nov 08 20:01:10 2007 +0100
     2.3 @@ -0,0 +1,185 @@
     2.4 +protocol of the ISAC-meeting 
     2.5 +############################################################################
     2.6 +date of meeting: 30.11.07 
     2.7 +author:		 WN	   
     2.8 +date of writing: 30.11.07 12:00
     2.9 +attendees:	 mail
    2.10 +agenda:          check the queries
    2.11 +############################################################################
    2.12 +
    2.13 +fields and values are commented only if there is something to be checked.
    2.14 +comments give the right value and relate to line-numbers of output #1, #2, ...
    2.15 +~6 is an estimated value (meaning approximately 6)
    2.16 +! marks an apparent error in the query
    2.17 +? marks wrong values to be checked for the origin, the data logged and/or the query
    2.18 +
    2.19 +
    2.20 +[1] who has used isac ?
    2.21 +mysql> select UserName, Argument as UserUrl, Time as Begin,
    2.22 +    -> unix_timestamp((select Time from UserLogger where step='UI_STOP_SESSION' and session=ul1.session)) - unix_timestamp(ul1.time) as Duration,
    2.23 +    -> (select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and session=ul1.session) as Examples
    2.24 +    -> from UserLogger ul1
    2.25 +    -> where step='LO_START_SESSION';
    2.26 +   +----------+---------------+---------------------+----------+----------+
    2.27 +   | UserName | UserUrl       | Begin               | Duration | Examples |
    2.28 +   +----------+---------------+---------------------+----------+----------+
    2.29 +   | x        | TODO user-url | 2007-10-30 11:35:12 |      138 |        3 |
    2.30 + #2| htl      | TODO user-url | 2007-10-30 11:37:39 |       52 |        1 |
    2.31 + #3| x        | TODO user-url | 2007-10-30 11:38:53 |      334 |        1 |
    2.32 +   | krempler | TODO user-url | 2007-10-30 11:39:37 |      101 |        2 |
    2.33 +   | x        | TODO user-url | 2007-10-30 11:41:26 |      151 |        2 |
    2.34 +   +----------+---------------+---------------------+----------+----------+
    2.35 +5 rows in set (0.07 sec)
    2.36 +
    2.37 +comments:
    2.38 +?#2: 3 examples
    2.39 +?#3: 3 examples
    2.40 +
    2.41 +
    2.42 +[2] which examples has a user calculated (over all sessions) ?
    2.43 +mysql> select session, Argument as ID, FormulaTo as Example, Time as Begin,
    2.44 +    -> unix_timestamp((select Time from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1)) - unix_timestamp(ul1.time) as Duration,
    2.45 +    -> (select Success from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1) as Success,
    2.46 +    -> (select count(*) from UserLogger where step like 'UI_SOLVE%' and session=ul1.session limit 1) as Calc_Steps,
    2.47 +    -> (select count(*) from UserLogger where step not like 'UI_SOLVE%' and session=ul1.session limit 1) as Other_Steps
    2.48 +    -> from UserLogger ul1
    2.49 +    -> where UserName='x' and Step='LO_OPEN_WORKSHEET';
    2.50 +   +---------+--------------------------------------+------------------------------------------------------------------+---------------------+----------+---------+------------+-------------+
    2.51 +   | session | ID                                   | Example                                                          | Begin               | Duration | Success | Calc_Steps | Other_Steps |
    2.52 +   +---------+--------------------------------------+------------------------------------------------------------------+---------------------+----------+---------+------------+-------------+
    2.53 + #1| 2       | exp_IsacCore_Tests_1a.xml            | solve (1 + -1 * 2 + x = 0, x)                                    | 2007-10-30 11:35:22 |        2 |       0 |        5 |          11 |
    2.54 + #2| 2       | exp_IsacCore_Tests_1b.xml            | solve (x + 1 = 2, x)                                             | 2007-10-30 11:35:28 |       -4 |       0 |        5 |          11 |
    2.55 + #3| 2       | exp_IsacCore_Tests_1c.xml            | solve (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x, x) | 2007-10-30 11:37:21 |     -117 |       0 |        5 |          11 |
    2.56 + #4| 4       | NULL                                 | solve (1 + -1 * 2 + x = 0, x)                                    | 2007-10-30 11:39:04 |        2 |       0 |        2 |           7 |
    2.57 + #5| 6       | exp_IsacCore_CalcDiff_Stein-359a.xml | Differentiate (P = 3 * z ^ 2 - 4 * z, z)                         | 2007-10-30 11:41:49 |       70 |       1 |        3 |           8 |
    2.58 + #6| 6       | exp_IsacCore_CalcDiff_Stein-359b.xml | Differentiate (s = pi * z ^ 3 + 6 / z, z)                        | 2007-10-30 11:43:05 |       -6 |       1 |        3 |           8 |
    2.59 +   +---------+--------------------------------------+------------------------------------------------------------------+---------------------+----------+---------+------------+-------------+
    2.60 +6 rows in set (0.04 sec)
    2.61 +
    2.62 +comments:
    2.63 +!# ID in #4 indicates the queries problems handling a user with more than 1 session open (x has 3 examples started by ComPod in session 4 which is closed _after_ session 6 by x)
    2.64 +!# Duration
    2.65 +?# Success 1 in #2, #3
    2.66 +?# Calc_Steps 0 in #1, ~6 in #2, 1 in #3
    2.67 +?# Other _Steps ???
    2.68 +
    2.69 +[3] what did a user do during a certain session ?
    2.70 +mysql> select Dialog, Step, Time, Worksheet, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
    2.71 +    -> from UserLogger
    2.72 +    -> where Session=2
    2.73 +    -> order by Time;
    2.74 +   +-----------+---------------------------------------+---------------------+-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------+---------------------------+--------------+---------+
    2.75 +   | Dialog    | Step                                  | Time                | Worksheet | Position  | FormulaFrom   | FormulaTo                                                        | Argument                  | Substitution | Success |
    2.76 +   +-----------+---------------------------------------+---------------------+-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------+---------------------------+--------------+---------+
    2.77 + #1| NULL      | LO_START_SESSION                      | 2007-10-30 11:35:12 | NULL      | NULL      | NULL   | NULL                                                             | TODO user-url             | NULL         |       0 |
    2.78 + #2| exp       | LO_OPEN_WORKSHEET                     | 2007-10-30 11:35:22 | 2_0       | ([],Pbl)  | solve (1 + -1 * 2 + x = 0, x)   | solve (1 + -1 * 2 + x = 0, x)                                    | exp_IsacCore_Tests_1a.xml | NULL         |       1 |
    2.79 + #3| worksheet | LO_STOP_EXAMPLE                       | 2007-10-30 11:35:24 | 2_0       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       0 |
    2.80 + #4| worksheet | UI_CLOSE_WORKSHEET                    | 2007-10-30 11:35:24 | 2_0       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       0 |
    2.81 + #5| exp       | LO_OPEN_WORKSHEET                     | 2007-10-30 11:35:28 | 2_1       | ([],Pbl)  | solve (x + 1 = 2, x)   | solve (x + 1 = 2, x)                                             | exp_IsacCore_Tests_1b.xml | NULL         |       1 |
    2.82 + #6| worksheet | UI_SOLVE_CALCULATE_1                  | 2007-10-30 11:35:37 | 2_1       | ([],Met)  | solve (x + 1 = 2, x)   | x + 1 = 2                                                        | NULL                      | NULL         |       1 |
    2.83 + #7| worksheet | UI_SOLVE_CALCULATE_1                  | 2007-10-30 11:35:39 | 2_1       | ([1],Frm) | x + 1 = 2   | x + 1 + -1 * 2 = 0                                               | NULL                      | NULL         |       1 |
    2.84 + #8| worksheet | UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE | 2007-10-30 11:36:54 | 2_1       | ([1],Res) | x + 1 + -1 * 2 = 0   | x - 1 = 0                                                        | x - 1 = 0                 | NULL         |       1 |
    2.85 + #9| worksheet | UI_SOLVE_CALCULATE_ALL                | 2007-10-30 11:37:08 | 2_1       | ([2],Res) | x - 1 = 0   | [x = 1]                                                          | NULL                      | NULL         |       1 |
    2.86 +#10| worksheet | LO_STOP_EXAMPLE                       | 2007-10-30 11:37:08 | 2_1       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       1 |
    2.87 +#11| worksheet | UI_CLOSE_WORKSHEET                    | 2007-10-30 11:37:14 | 2_1       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       0 |
    2.88 +#12| exp       | LO_OPEN_WORKSHEET                     | 2007-10-30 11:37:21 | 2_2       | ([],Pbl)  | solve (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x,x) | solve (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x, x) | exp_IsacCore_Tests_1c.xml | NULL         |       1 |
    2.89 +#13| worksheet | UI_SOLVE_CALCULATE_ALL                | 2007-10-30 11:37:23 | 2_2       | ([],Pbl)  | solve (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x,x) | [x = 6 / 5]                                                      | NULL                      | NULL         |       1 |
    2.90 +#14| worksheet | LO_STOP_EXAMPLE                       | 2007-10-30 11:37:23 | 2_2       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       1 |
    2.91 +#15| worksheet | UI_CLOSE_WORKSHEET                    | 2007-10-30 11:37:28 | 2_2       | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       0 |
    2.92 +#16| NULL      | UI_STOP_SESSION                       | 2007-10-30 11:37:30 | NULL      | NULL      | NULL   | NULL                                                             | NULL                      | NULL         |       0 |
    2.93 +   +-----------+---------------------------------------+---------------------+-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------+---------------------------+--------------+---------+
    2.94 +16 rows in set (0.00 sec)
    2.95 +
    2.96 +comments:
    2.97 +?#8 2 wrong inputs before this step are not logged
    2.98 +
    2.99 +
   2.100 +[4] what did a user do during a certain example ?
   2.101 +mysql> select Dialog, Step, Time, Worksheet, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
   2.102 +    -> from UserLogger
   2.103 +    -> where Worksheet='2_1'
   2.104 +    -> order by Time;
   2.105 +  +-----------+---------------------------------------+---------------------+-----------+----------------------+----------------------+---------------------------+--------------+---------+
   2.106 +  | Dialog    | Step                                  | Time                | Position  | FormulaFrom          | FormulaTo            | Argument          | Substitution | Success |
   2.107 +  +-----------+---------------------------------------+---------------------+-----------+----------------------+----------------------+---------------------------+--------------+---------+
   2.108 +  | exp       | LO_OPEN_WORKSHEET                     | 2007-10-30 11:35:28 | ([],Pbl)  | solve (x + 1 = 2, x) | solve (x + 1 = 2, x) | exp_IsacCore_Tests_1b.xml | NULL         |       1 |
   2.109 +  | worksheet | UI_SOLVE_CALCULATE_1                  | 2007-10-30 11:35:37 | ([],Met)  | solve (x + 1 = 2, x) | x + 1 = 2            | NULL          | NULL         |       1 |
   2.110 +  | worksheet | UI_SOLVE_CALCULATE_1                  | 2007-10-30 11:35:39 | ([1],Frm) | x + 1 = 2            | x + 1 + -1 * 2 = 0   | NULL          | NULL         |       1 |
   2.111 +#4| worksheet | UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE | 2007-10-30 11:36:54 | ([1],Res) | x + 1 + -1 * 2 = 0   | x - 1 = 0            | x - 1 = 0          | NULL         |       1 |
   2.112 +  | worksheet | UI_SOLVE_CALCULATE_ALL                | 2007-10-30 11:37:08 | ([2],Res) | x - 1 = 0            | [x = 1]              | NULL          | NULL         |       1 |
   2.113 +  | worksheet | LO_STOP_EXAMPLE                       | 2007-10-30 11:37:08 | NULL      | NULL                 | NULL                 | NULL          | NULL         |       1 |
   2.114 +  | worksheet | UI_CLOSE_WORKSHEET                    | 2007-10-30 11:37:14 | NULL      | NULL                 | NULL                 | NULL          | NULL         |       0 |
   2.115 +  +-----------+---------------------------------------+---------------------+-----------+----------------------+----------------------+---------------------------+--------------+---------+
   2.116 +7 rows in set (0.02 sec)
   2.117 +
   2.118 +comments:
   2.119 +?#4 2 error-input before this step have not been recorded by UserLogger
   2.120 +
   2.121 +
   2.122 +[5] how difficult are the examples ?
   2.123 +mysql> select Argument as ID, FormulaTo as Example, Success, Success-1 as Failure
   2.124 +    -> from UserLogger
   2.125 +    -> where Step='LO_OPEN_WORKSHEET'
   2.126 +    -> order by Success, Failure;
   2.127 +  +--------------------------------------+------------------------------------------------------------------+---------+---------+
   2.128 +  | ID                                   | Example                                                          | Success | Failure |
   2.129 +  +--------------------------------------+------------------------------------------------------------------+---------+---------+
   2.130 +#1| exp_IsacCore_Tests_1a.xml            | solve (1 + -1 * 2 + x = 0, x)                                    |       1 |       0 |
   2.131 +#2| exp_IsacCore_Tests_1b.xml            | solve (x + 1 = 2, x)                                             |       1 |       0 |
   2.132 +#3| exp_IsacCore_Tests_1c.xml            | solve (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x, x) |       1 |       0 |
   2.133 +#4| NULL                                 | solve (1 + -1 * 2 + x = 0, x)                                    |       1 |       0 |
   2.134 +#5| NULL                                 | solve (1 + -1 * 2 + x = 0, x)                                    |       1 |       0 |
   2.135 +#6| exp_IsacCore_CalcDiff_Stein-359a.xml | Differentiate (P = 3 * z ^ 2 - 4 * z, z)                         |       1 |       0 |
   2.136 +#7| exp_IsacCore_CalcDiff_Stein-359b.xml | Differentiate (s = pi * z ^ 3 + 6 / z, z)                        |       1 |       0 |
   2.137 +#8| exp_IsacCore_CalcDiff_Stein-359a.xml | Differentiate (P = 3 * z ^ 2 - 4 * z, z)                         |       1 |       0 |
   2.138 +#9| exp_IsacCore_CalcDiff_Stein-359b.xml | Differentiate (s = pi * z ^ 3 + 6 / z, z)                        |       1 |       0 |
   2.139 +  +--------------------------------------+------------------------------------------------------------------+---------+---------+
   2.140 +9 rows in set (0.04 sec)
   2.141 +
   2.142 +comments:
   2.143 +correct would be:
   2.144 +   ---------+---------+
   2.145 +    Success | Failure |
   2.146 +   ---------+---------+
   2.147 +!#1       0 |       3 |
   2.148 +!#2       3 |       0 |
   2.149 +!#3       3 |       0 |
   2.150 +?#4 wrong entry steming from overlapping session (??, and exp's handled by ComPod)
   2.151 +?#5 wrong entry steming from overlapping session (??, and exp's handled by ComPod)
   2.152 +!#6       2 |       0 |
   2.153 +!#7       2 |       0 |
   2.154 +!#8 each example should be listed once
   2.155 +!#9 each example should be listed once
   2.156 +
   2.157 +
   2.158 +[6] who are the most frequent users of isac ?
   2.159 +mysql> select UserName,
   2.160 +    -> (select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and username=ul1.username limit 1) as Examples,
   2.161 +    -> (select count(*) from UserLogger where step='LO_STOP_EXAMPLE' and username=ul1.username limit 1) as Success,
   2.162 +    -> (select count(*) from UserLogger where step like 'UI_SOLVE%' and username=ul1.username limit 1) as Calc_Steps,
   2.163 +    -> (select count(*) from UserLogger where step not like 'UI_SOLVE%' and username=ul1.username limit 1) as Other_Steps
   2.164 +    -> from UserLogger ul1
   2.165 +    -> where Step='LO_START_SESSION'
   2.166 +    -> group by UserName
   2.167 +    -> order by Examples, UserName;
   2.168 ++----------+----------+---------+------------+-------------+
   2.169 +| UserName | Examples | Success | Calc_Steps | Other_Steps |
   2.170 ++----------+----------+---------+------------+-------------+
   2.171 +| htl      |        1 |       3 |          2 |           7 |
   2.172 +| krempler |        2 |       2 |          2 |           8 |
   2.173 +| x        |        6 |       8 |         10 |          26 |
   2.174 ++----------+----------+---------+------------+-------------+
   2.175 +3 rows in set (0.00 sec)
   2.176 +
   2.177 +comments:
   2.178 +!# The output should be:
   2.179 ++----------+----------+----------+---------+------------+-------------+
   2.180 +| UserName | Sessions | Examples | Success | Calc_Steps | Other_Steps |
   2.181 ++----------+----------+----------+---------+------------+-------------+
   2.182 +| x        |        3 |        8 |       5 |         10 |          26 |
   2.183 +| htl      |        1 |        3 |       2 |          2 |           7 |
   2.184 +| krempler |        1 |        2 |       2 |          2 |           8 |
   2.185 ++----------+----------+----------+---------+------------+-------------+
   2.186 +?# In 071030-CR-WN.data I see that closing session 4 after session 6
   2.187 +   does _not_ LO_STOP_EXAMPLE for Worksheet 4_1 and 4_2 
   2.188 +   (while is should do that).
   2.189 \ No newline at end of file
     3.1 --- a/src/sql/queries.sql	Thu Nov 08 18:54:18 2007 +0100
     3.2 +++ b/src/sql/queries.sql	Thu Nov 08 20:01:10 2007 +0100
     3.3 @@ -51,7 +51,7 @@
     3.4  
     3.5  select Dialog, Step, Time, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
     3.6  from UserLogger
     3.7 -where Worksheet='1_0'
     3.8 +where Worksheet='2_1'
     3.9  order by Time;
    3.10  
    3.11  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~