From ef95803e78e936e324b4141bf52ccd6d8fa34549 Mon Sep 17 00:00:00 2001 From: tkupek Date: Sat, 5 Mar 2016 12:22:46 +0100 Subject: [PATCH] added user link to statistic backend and copy to clipboard --- db.sqlite3 | Bin 107520 -> 107520 bytes tkupek_elearning/elearning/models.py | 2 +- .../elearning/templates/setting_null.html | 4 ++-- .../elearning/templates/statistic.html | 22 +++++++++++++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 3203e0478df6903fd530affa8c2436e35c826b71..9c08e693dafc36e105c9780b380d8a3faadc83ef 100644 GIT binary patch delta 375 zcmYk0ze@sP7{~8<-u!hUW?@kVN=r+g?|XOeaUM8`twBXn1c5?F5+r0tL@q9_p&V3y zLb%lt1wsujHq{bMZApJZwDoo_E#Kk!e)vA0)-c!_20JORy9*_-Zz>luaQ9ojg0R<# zIyJ&^;D#JKh%fkz11~YLj#B{wAag%;KQ-^|BnN{1azm%KR~a_P5c&}M5Nh7fS*#!v ziS$UB5PbC}AC3^-U9kymk-6X+2}rwXSMICxDrH8NYFWxNj9JXIG^Xg(V0ptW_g50) zN-f>6R9&Gg&l&T2{hjT_xHOW;9XTK-3F8M|V*`trfKRxEHf+GOG!lQFV#_=t#b+S~ zP&A#(ZW3m;REtu@U{p8r1zoghSQ4$a+E6l^_OYX4saCD;+k2UM_0U#i{O>1Bn8mp; f5d(~Af8&w4@%UpBQc-4URN;9h?C;x2XrBK9Xc$-c delta 235 zcmZoT!PansZGtpo+(a2?#<-0M)3_LoCV%Ie!N|UO0(VIUvk}wP$?PSmn*~`inKoZ7 z(`N*V{G7~Q0TStD+WfPM*OrTgfq4~kC^HMw#mxdc3YjJ=u;{4?GhhH$3=!kWf-L%M z{>-clv9gmncN<9>7@FxC80#9CDi|7A85>v`8S7bE7#NvbP7dAeB50yuXkukzVr6Ke zXK7|`ZfUxC)$XVW86L(~2Ij5IS% E0QTuOb^rhX diff --git a/tkupek_elearning/elearning/models.py b/tkupek_elearning/elearning/models.py index 155c696..43c2eab 100644 --- a/tkupek_elearning/elearning/models.py +++ b/tkupek_elearning/elearning/models.py @@ -48,7 +48,7 @@ class Option(models.Model): class User(models.Model): - token = models.CharField(max_length=40, null=True, default=gen_token) + token = models.CharField(max_length=40, null=True, default=gen_token, unique=True) name = models.CharField(max_length=100, null=False) last_seen = models.DateTimeField(null=True, blank=True) diff --git a/tkupek_elearning/elearning/templates/setting_null.html b/tkupek_elearning/elearning/templates/setting_null.html index 6afe8ec..f6305f1 100644 --- a/tkupek_elearning/elearning/templates/setting_null.html +++ b/tkupek_elearning/elearning/templates/setting_null.html @@ -25,8 +25,8 @@

Settings are not set. Please configure the service first!

diff --git a/tkupek_elearning/elearning/templates/statistic.html b/tkupek_elearning/elearning/templates/statistic.html index 0f884ae..d96ef05 100644 --- a/tkupek_elearning/elearning/templates/statistic.html +++ b/tkupek_elearning/elearning/templates/statistic.html @@ -16,6 +16,17 @@ + + + + + @@ -33,12 +44,15 @@ name questions answered last seen + url (click to copy) {% for user in users %} {{ user.name }} {{ user.questions_answered }} {{ user.last_seen }} + + {% endfor %} @@ -69,7 +83,13 @@ {{ settings.footer }} - +