Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex <acj3840@rit.edu>2010-07-23 18:29:00 (GMT)
committer Alex <acj3840@rit.edu>2010-07-23 18:29:00 (GMT)
commit0302212ba4e20d0d8ff21117e4215556941f3e59 (patch)
treec4dacebe5b46bb016f60c206a63a1e1d1e146005
parente229d96de23b187d2a538372d90ad38ffae15400 (diff)
added just enough changes to make the screens transition now.
currently in the teacher screen, the send question button works and the next question button works
-rw-r--r--NEWS4
-rw-r--r--popquiz.py21
2 files changed, 17 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 11c85d5..e5012bb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+7-23-2010
+fixed the screen changing, now whenever something needs to update the screen, just call the update method in PopQuiz class
+screens now transition for the teacher
+
7-20-2010 (8 days till hydro thunder hurricane hits xbla!)
added another screen for teacher
shows students and details will display details about selected student when we have real details to show
diff --git a/popquiz.py b/popquiz.py
index f5bb74e..7b99ffd 100644
--- a/popquiz.py
+++ b/popquiz.py
@@ -35,6 +35,12 @@ SELECTEDSTUDENT = "Student0"
POPQUIZ = ""
class PopQuiz(activity.Activity):
+
+ @staticmethod
+ def update_canvas():
+ global POPQUIZ
+ POPQUIZ.set_canvas(POPQUIZ.view.vboxholdsall)
+
def __init__(self, handle):
global POPQUIZ
activity.Activity.__init__(self, handle)
@@ -76,31 +82,30 @@ class PopQuiz(activity.Activity):
toolbar_box.toolbar.insert(StopButton(self), -1)
toolbar_box.show_all()
-
POPQUIZ = self
def _shared_cb(self, activity):
- logger.debug('Popquiz was shared')
+ logging.debug('Popquiz was shared')
self._setup()
def _setup(self):
- logger.debug('setting up sharing')
+ logging.debug('setting up sharing')
#### set up actual connection here#####
self.shared_activity.connect('buddy-joined', self._buddy_joined_cb)
self.shared_activity.connect('buddy-left', self._buddy_left_cb)
def _joined_cb(self, activity):
- logger.debug('joined a shared activity')
+ logging.debug('joined a shared activity')
#joining an activity means you're a student
self.view = Student()
self.set_canvas(self.view.viewboxholdsall)
def _buddy_joined_cb(self, activity, buddy):
- logger.debug('buddy joined activity')
+ logging.debug('buddy joined activity')
###store the buddy here###
def _buddy_left_cb(self, activity, buddy):
- logger.debug('buddy left activity')
+ logging.debug('buddy left activity')
###remove buddy from storage###
class Student():
@@ -260,7 +265,6 @@ class Teacher():
def students_answered(self):
global STUDENTS
- global POPQUIZ
vboxholdsall = gtk.VBox()
vboxholdsall.show()
@@ -301,7 +305,7 @@ class Teacher():
hboxbuttons.pack_start(nextquestionbutton, True, True, 10)
vboxholdsall.pack_start(hboxbuttons, False, True, 10)
self.vboxholdsall = vboxholdsall
- POPQUIZ.set_canvas(self.vboxholdsall)
+ PopQuiz.update_canvas()
def student_selected(self, clist, row, column, event, data=None):
global STUDENTS
@@ -317,6 +321,7 @@ class Teacher():
def next_question(self, data):
self.question_screen()
+ PopQuiz.update_canvas()
def countdown(self):