Skip to content

Commit b184580

Browse files
committed
fixed paths for the student in workstations
1 parent 9d7df4f commit b184580

File tree

5 files changed

+24
-162
lines changed

5 files changed

+24
-162
lines changed

Backend/.pydevproject

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
66
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
77
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
8-
<path>/Backend/src</path>
8+
<path>/Controlaula/src</path>
99
</pydev_pathproperty>
1010
</pydev_project>

Backend/src/ControlAula/StudentLoop.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,15 @@ def render_GET(self, request):
5454
else:
5555
requestedfile = os.path.join(self.PageDir,request.path[1:])
5656

57-
if pagename == "controlaula":
58-
requestedfile = os.path.join(Configs.APP_DIR,'controlaula.html')
57+
if '/controlaula/' in request.path:
58+
pagename = request.path[13:]
59+
if "-" in pagename:
60+
request.path = request.path[12:]
61+
62+
requestedfile = os.path.join(Configs.APP_DIR,'controlaula.html')
63+
else:
64+
requestedfile = os.path.join(Configs.APP_DIR,pagename)
65+
5966

6067
if not os.path.isfile(requestedfile):
6168
# Didn't find it? Return an error.

Backend/src/ControlAula/TeacherMainLoop.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def __init__ (self):
5757
# Return the page for a GET. This will handle requests
5858
# to read data.
5959
def render_GET(self, request):
60-
6160
pagename = request.path[1:].lower()
6261
session = request.getSession()
6362
if 'controlaula/' in pagename:
@@ -73,8 +72,8 @@ def render_GET(self, request):
7372
if pagename == '':
7473
request.path='/index.html'
7574
pagename='index.html'
76-
77-
if (request.host.host!='127.0.0.1' or self.teacher_login!=session.uid) and pagename=='index.html':
75+
#if (request.host.host!='127.0.0.1' or self.teacher_login!=session.uid) and pagename=='index.html':
76+
if (request.host.host!='127.0.0.1' or self.teacher_login!=session.uid) and (pagename[-4:] == 'html' or pagename[-1:] == '/'):
7877
request.path='/student/chat.html'
7978
pagename='student/chat.html'
8079

add-on/chrome/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "__MSG_name__",
3-
"version": "0.1",
3+
"version": "0.2",
44
"description": "__MSG_description__",
55
"background_page": "background.html",
66
"homepage_url": "http://controlaula.sourceforge.net",

0 commit comments

Comments
 (0)