Changeset 764:8fd245311db5
- Timestamp:
- 02/21/16 10:18:43 (9 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r763 r764 2291 2291 "and the check flight here." 2292 2292 2293 msgid "student_entry_exam_status" 2294 msgstr "Entry exam:" 2295 2296 msgid "student_entry_exam_passed" 2297 msgstr "<span color=\"darkgreen\"><b>Passed</b></span>" 2298 2299 msgid "student_entry_exam_not_passed" 2300 msgstr "<span color=\"orange\"><b>Not yet passed</b></span>" 2301 2293 2302 msgid "student_entry_exam" 2294 2303 msgstr "Take the _entry exam" … … 2297 2306 msgstr "" 2298 2307 "Click this button to go to MAVA's training website in your browser and take " 2299 "the theoretical entry exam. If this button is greyed out, " 2300 "it means that you have already passed the exam earlier. Note, that " 2301 "its status is updated only a few minutes after passing the exam." 2308 "the theoretical entry exam. The website might ask you for login: you can " 2309 "use your MAVA pilot ID (PXXX) and password. " 2310 "If this button is greyed out, it means that you have already passed " 2311 "the exam earlier. Note, that its status is updated only a few minutes " 2312 "after passing the exam." -
locale/hu/mlx.po
r762 r764 2307 2307 "és az ellenőrző repülést." 2308 2308 2309 msgid "student_entry_exam_status" 2310 msgstr "Elméleti vizsga:" 2311 2312 msgid "student_entry_exam_passed" 2313 msgstr "<span color=\"darkgreen\"><b>Sikeres</b></span>" 2314 2315 msgid "student_entry_exam_not_passed" 2316 msgstr "<span color=\"orange\"><b>Még nem tetted le</b></span>" 2317 2309 2318 msgid "student_entry_exam" 2310 2319 msgstr "_Elméleti vizsga" … … 2314 2323 "Erre a gombra kattintva a MAVA oktatási weboldalára kerülsz " 2315 2324 "böngésződben és kitöltheted az elméleti vizsga tesztjét. " 2325 "A weboldalon szükség lehet bejelentkezned: ebben az esetben " 2326 "használd a MAVA pilóta azonosítódat (PXXX) és jelszavadat. " 2316 2327 "Ha a gomb inaktív, a vizsgát korábban már sikeresen teljesítetted. " 2317 2328 "A gomb állapota csak néhány perccel a vizsga teljesítése után frissül." -
src/mlx/gui/flight.py
r762 r764 21 21 import threading 22 22 import re 23 import webbrowser 23 24 24 25 #----------------------------------------------------------------------------- … … 1378 1379 xscale = 0.5, yscale = 0.0) 1379 1380 1380 table = gtk.Table( 1, 1)1381 table = gtk.Table(2, 2) 1381 1382 table.set_row_spacings(4) 1382 1383 table.set_col_spacings(32) 1384 table.set_homogeneous(False) 1383 1385 alignment.add(table) 1384 1386 self.setMainWidget(alignment) 1385 1387 1386 1388 row = 0 1389 1390 labelAlignment = gtk.Alignment(xalign=0.0, yalign = 0.5, 1391 xscale=0.0, yscale = 0.0) 1392 label = gtk.Label(xstr("student_entry_exam_status")) 1393 labelAlignment.add(label) 1394 table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = 0) 1395 1396 alignment = gtk.Alignment(xalign=0.0, yalign = 0.5, 1397 xscale=1.0, yscale = 0.0) 1398 self._entryExamStatus = gtk.Label() 1399 self._entryExamStatus.set_use_markup(True) 1400 self._entryExamStatus.set_alignment(0.0, 0.5) 1401 alignment.add(self._entryExamStatus) 1402 table.attach(alignment, 1, 2, row, row + 1) 1403 1404 row += 1 1387 1405 1388 1406 buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0) … … 1393 1411 1394 1412 buttonAlignment.add(button) 1395 table.attach(buttonAlignment, 0, 1, 0, 1) 1413 table.attach(buttonAlignment, 0, 2, row, row + 1, 1414 ypadding = 4) 1396 1415 1397 1416 def activate(self): 1398 1417 """Activate the student page.""" 1399 1418 loginResult = self._wizard.loginResult 1400 self._entryExamButton.set_sensitive(not loginResult.entryExamPassed) 1419 self._entryExamLink = loginResult.entryExamLink 1420 1421 self._updateEntryExamStatus(loginResult.entryExamPassed) 1422 1401 1423 self._getEntryExamStatus() 1402 1424 1403 1425 def _entryExamClicked(self, button): 1404 1426 """Called when the entry exam button is clicked.""" 1427 webbrowser.open(self._entryExamLink) 1405 1428 1406 1429 def _getEntryExamStatus(self): … … 1418 1441 print "_handleEntryExamStatus", returned, result 1419 1442 if returned: 1420 self._entryExamButton.set_sensitive(not result.entryExamPassed) 1443 self._entryExamLink = result.entryExamLink 1444 self._updateEntryExamStatus(result.entryExamPassed) 1421 1445 self._getEntryExamStatus() 1446 1447 def _updateEntryExamStatus(self, passed): 1448 """Update the entry exam status display and button.""" 1449 self._entryExamStatus.set_text(xstr("student_entry_exam_passed") 1450 if passed else 1451 xstr("student_entry_exam_not_passed")) 1452 self._entryExamStatus.set_use_markup(True) 1453 self._entryExamButton.set_sensitive(not passed) 1422 1454 1423 1455 #----------------------------------------------------------------------------- -
src/mlx/rpc.py
r761 r764 261 261 value = self._performCall(lambda sessionID: 262 262 self._server.getEntryExamStatus(sessionID)) 263 return (value["entryExamPassed"], value["checkFlightStatus"]) 263 return (value["entryExamPassed"], value["entryExamLink"], 264 value["checkFlightStatus"]) 264 265 265 266 def getFleet(self): -
src/mlx/web.py
r761 r764 739 739 reply = self._client.getEntryExamStatus() 740 740 result.entryExamPassed = reply[0] 741 result.checkFlightStatus = reply[1] 741 result.entryExamLink = reply[1] 742 result.checkFlightStatus = reply[2] 742 743 743 744 return result … … 758 759 759 760 result.entryExamPassed = reply[0] 760 result.checkFlightStatus = reply[1] 761 result.entryExamLink = reply[1] 762 result.checkFlightStatus = reply[2] 761 763 762 764 return result
Note:
See TracChangeset
for help on using the changeset viewer.