Commit 2f080db6 authored by Jonathan Wiedemann's avatar Jonathan Wiedemann
Browse files

Cosmetic fix

parent 32c48a50
......@@ -69,13 +69,13 @@ def get_document(doc):
print('Check.get_document(doc=%s)' % doc)
if type(doc) == 'str':
doc = app.getDocument(doc)
#doc.recompute()
# doc.recompute()
if DEBUG:
print('doc.Name is %s, doc.Label is %s' % (doc.Name, doc.Label))
elif doc is None:
if document_presence() == 1:
doc = app.activeDocument()
#doc.recompute()
# doc.recompute()
if DEBUG:
print('doc.Name is %s, doc.Label is %s' % (doc.Name, doc.Label))
else:
......@@ -323,12 +323,19 @@ def fillet_presence(doc=None, label=None, radius=None):
'''fillet_presence(doc=None, label=None, radius=None) -> 0 or 1
check fillet presence
'''
if DEBUG:
print('Check.fillet_presence(doc=%s, label=%s, radius=%s)' % (
doc,
label,
radius))
r = []
doc = get_document(doc)
reference = None
if doc:
if label is not None:
reference = doc.getObject(label)
if DEBUG:
print(reference)
else:
if DEBUG:
print("TODO: make list of fillet")
......@@ -338,10 +345,11 @@ def fillet_presence(doc=None, label=None, radius=None):
r.append(1)
else:
r.append(0)
if reference.Radius == radius:
r.append(1)
else:
r.append(0)
if radius:
if reference.Radius == radius:
r.append(1)
else:
r.append(0)
return make_result(r)
......
......@@ -321,7 +321,7 @@ class Ui_FreeCADGraderResults(QtWidgets.QDialog):
def retranslateUi(self, FreeCADGraderResults):
FreeCADGraderResults.setWindowTitle(u"Envoyer les résultats")
self.label.setText(u"3. Copier/coller le code suivant dans l\'interface du MOOC")
self.label.setText(u"3. Copier/coller le code suivant dans l\'interface FUN-MOOC")
self.pushButton.setText(u"Copier")
def copy_to_clipboard(self):
......@@ -337,7 +337,7 @@ class MoocGraderCommand():
def GetResources(self):
return {'Pixmap': os.path.join(moocWB_icons_path, 'mooc-grader.svg'),
'MenuText': QtCore.QT_TRANSLATE_NOOP("Mooc", "Évaluer un exercice."),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Mooc", "Éxécute l'outil d'analyse et vérification d'un docment FreeCAD.")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Mooc", "Éxécute l'outil d'analyse et vérification d'un document FreeCAD.")}
def IsActive(self):
return True
......
......@@ -23,15 +23,16 @@
#
################################################
__title__="MOOC Workbench"
__title__ = "MOOC Workbench"
__author__ = "Jonathan Wiedemann"
__url__ = "http://www.freecadweb.org"
def checkMoocWBVersion(MOOC_VERSION):
'''Check version of workbench'''
print(u'Check workbench version...')
import urllib.request
webUrl = urllib.request.urlopen('http://framagit.org/freecad-france/mooc-workbench/raw/master/InitGui.py')
webUrl = urllib.request.urlopen('http://framagit.org/freecad-france/mooc-workbench/raw/master/InitGui.py')
for line in webUrl:
if 'MOOC_VERSION = ' in str(line, 'utf-8'):
mooc_version = str(line, 'utf-8').split(' = ')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment