Commit 3f718decafbe51e5fb60ad99d8a9261203320fdf
1 parent
43073816
Exists in
dev
minor fix
fix favicon completely remove counter cookie
Showing
7 changed files
with
11 additions
and
22 deletions
Show diff stats
aprendizations/learnapp.py
| ... | ... | @@ -52,7 +52,6 @@ class LearnApp(): |
| 52 | 52 | 'number': ..., |
| 53 | 53 | 'name': ..., |
| 54 | 54 | 'state': StudentState(), |
| 55 | - # 'counter': ... | |
| 56 | 55 | }, ... |
| 57 | 56 | } |
| 58 | 57 | ''' |
| ... | ... | @@ -174,10 +173,8 @@ class LearnApp(): |
| 174 | 173 | if pw_ok: |
| 175 | 174 | if uid in self.online: |
| 176 | 175 | logger.warning('User "%s" already logged in', uid) |
| 177 | - counter = self.online[uid]['counter'] # FIXME | |
| 178 | 176 | else: |
| 179 | 177 | logger.info('User "%s" logged in', uid) |
| 180 | - counter = 0 | |
| 181 | 178 | |
| 182 | 179 | # get topics for this student and set its current state |
| 183 | 180 | query = select(StudentTopic).where(StudentTopic.student_id == uid) |
| ... | ... | @@ -195,7 +192,6 @@ class LearnApp(): |
| 195 | 192 | 'state': StudentState(uid=uid, state=state, |
| 196 | 193 | courses=self.courses, deps=self.deps, |
| 197 | 194 | factory=self.factory), |
| 198 | - 'counter': counter + 1, # count simultaneous logins FIXME | |
| 199 | 195 | } |
| 200 | 196 | |
| 201 | 197 | else: |
| ... | ... | @@ -494,10 +490,6 @@ class LearnApp(): |
| 494 | 490 | |
| 495 | 491 | return factory |
| 496 | 492 | |
| 497 | - # def get_login_counter(self, uid: str) -> int: | |
| 498 | - # '''login counter''' | |
| 499 | - # return int(self.online[uid]['counter']) | |
| 500 | - | |
| 501 | 493 | def get_student_name(self, uid: str) -> str: |
| 502 | 494 | '''Get the username''' |
| 503 | 495 | return self.online[uid].get('name', '') | ... | ... |
aprendizations/serve.py
| ... | ... | @@ -18,7 +18,7 @@ import uuid |
| 18 | 18 | import tornado.httpserver |
| 19 | 19 | import tornado.ioloop |
| 20 | 20 | import tornado.web |
| 21 | -from tornado.escape import to_unicode, utf8 | |
| 21 | +from tornado.escape import to_unicode | |
| 22 | 22 | |
| 23 | 23 | # this project |
| 24 | 24 | from aprendizations.renderer_markdown import md_to_html |
| ... | ... | @@ -122,7 +122,6 @@ class CoursesHandler(BaseHandler): |
| 122 | 122 | '''Render available courses''' |
| 123 | 123 | uid = self.current_user |
| 124 | 124 | self.render('courses.html', |
| 125 | - appname=APP_NAME, | |
| 126 | 125 | uid=uid, |
| 127 | 126 | name=self.app.get_student_name(uid), |
| 128 | 127 | courses=self.app.get_courses(), |
| ... | ... | @@ -150,7 +149,6 @@ class CourseHandler2(BaseHandler): |
| 150 | 149 | self.redirect('/courses') |
| 151 | 150 | |
| 152 | 151 | self.render('maintopics-table2.html', |
| 153 | - appname=APP_NAME, | |
| 154 | 152 | uid=uid, |
| 155 | 153 | name=self.app.get_student_name(uid), |
| 156 | 154 | state=self.app.get_student_state(uid), |
| ... | ... | @@ -213,7 +211,6 @@ class TopicHandler(BaseHandler): |
| 213 | 211 | self.redirect('/topics') |
| 214 | 212 | |
| 215 | 213 | self.render('topic.html', |
| 216 | - appname=APP_NAME, | |
| 217 | 214 | uid=uid, |
| 218 | 215 | name=self.app.get_student_name(uid), |
| 219 | 216 | course_id=self.app.get_current_course_id(uid), |
| ... | ... | @@ -407,7 +404,6 @@ class RankingsHandler(BaseHandler): |
| 407 | 404 | course_id = self.get_query_argument('course', default=current_course) |
| 408 | 405 | rankings = self.app.get_rankings(uid, course_id) |
| 409 | 406 | self.render('rankings.html', |
| 410 | - appname=APP_NAME, | |
| 411 | 407 | uid=uid, |
| 412 | 408 | name=self.app.get_student_name(uid), |
| 413 | 409 | rankings=rankings, | ... | ... |
aprendizations/templates/courses.html
aprendizations/templates/login.html
| ... | ... | @@ -3,7 +3,8 @@ |
| 3 | 3 | <head> |
| 4 | 4 | <meta charset="utf-8" /> |
| 5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 | - <meta name="author" content="Miguel Barão"> | |
| 6 | + <meta name="author" content="Miguel Barão" /> | |
| 7 | + <link rel="icon" href="favicon.ico"> | |
| 7 | 8 | |
| 8 | 9 | {% include include-libs.html %} |
| 9 | 10 | ... | ... |
aprendizations/templates/maintopics-table.html
| ... | ... | @@ -5,8 +5,8 @@ |
| 5 | 5 | <head> |
| 6 | 6 | <meta charset="utf-8" /> |
| 7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 8 | - <meta name="author" content="Miguel Barão"> | |
| 9 | - <link rel="icon" href="/static/favicon.ico"> | |
| 8 | + <meta name="author" content="Miguel Barão" /> | |
| 9 | + <link rel="icon" href="favicon.ico"> | |
| 10 | 10 | |
| 11 | 11 | {% include include-libs.html %} |
| 12 | 12 | ... | ... |
aprendizations/templates/rankings.html
| ... | ... | @@ -5,15 +5,15 @@ |
| 5 | 5 | <head> |
| 6 | 6 | <meta charset="utf-8" /> |
| 7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 8 | - <meta name="author" content="Miguel Barão"> | |
| 9 | - <link rel="icon" href="/static/favicon.ico"> | |
| 8 | + <meta name="author" content="Miguel Barão" /> | |
| 9 | + <link rel="icon" href="favicon.ico"> | |
| 10 | 10 | |
| 11 | 11 | {% include include-libs.html %} |
| 12 | 12 | |
| 13 | 13 | <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}"> |
| 14 | 14 | <script defer src="{{static_url('js/maintopics.js')}}"></script> |
| 15 | 15 | |
| 16 | - <title>{{appname}}</title> | |
| 16 | + <title>aprendizations</title> | |
| 17 | 17 | </head> |
| 18 | 18 | <!-- ===================================================================== --> |
| 19 | 19 | <body> | ... | ... |
aprendizations/templates/topic.html
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <meta charset="utf-8" /> |
| 5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 | 6 | <meta name="author" content="Miguel Barão" /> |
| 7 | - <link rel="icon" href="/static/favicon.ico"> | |
| 7 | + <link rel="icon" href="favicon.ico"> | |
| 8 | 8 | |
| 9 | 9 | {% include include-libs.html %} |
| 10 | 10 | |
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <link rel="stylesheet" href="{{static_url('css/topic.css')}}" /> |
| 14 | 14 | <script defer src="{{static_url('js/topic.js')}}"></script> |
| 15 | 15 | |
| 16 | - <title>{{appname}}</title> | |
| 16 | + <title>aprendizations</title> | |
| 17 | 17 | </head> |
| 18 | 18 | <!-- ===================================================================== --> |
| 19 | 19 | <body> | ... | ... |