Spaces:
Sleeping
Sleeping
Gualguanosky
commited on
Commit
路
08c979a
1
Parent(s):
60bac16
ARCHIVOS VARIOS
Browse files- .github/.keep +0 -0
- .gitignore +129 -0
- 11.pdf +0 -0
- LICENSE +201 -0
- MANUALTECNICO.md +0 -0
- controller/EvalController.py +20 -0
- controller/__init__.py +0 -0
- main.py +10 -0
- model/Criterio.py +11 -0
- model/EvalAnteproy.py +37 -0
- model/__init__.py +0 -0
- proyecto2POO.jpg +0 -0
- puj_logo_azul_copia1_0.png +0 -0
- requirements.txt +7 -0
- run.py +5 -0
- secrets.toml +1 -0
- test/EjemploTest.py +12 -0
- view/CalificarActa.py +47 -0
- view/CrearActa.py +189 -0
- view/CrearCriterio.py +58 -0
- view/ImprimirActa.py +139 -0
- view/Inicio.py +8 -0
- view/ListarCriterios.py +25 -0
- view/MainView.py +75 -0
- view/logo.png +0 -0
.github/.keep
ADDED
File without changes
|
.gitignore
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
.idea/
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
pip-wheel-metadata/
|
24 |
+
share/python-wheels/
|
25 |
+
*.egg-info/
|
26 |
+
.installed.cfg
|
27 |
+
*.egg
|
28 |
+
MANIFEST
|
29 |
+
|
30 |
+
# PyInstaller
|
31 |
+
# Usually these files are written by a python script from a template
|
32 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
33 |
+
*.manifest
|
34 |
+
*.spec
|
35 |
+
|
36 |
+
# Installer logs
|
37 |
+
pip-log.txt
|
38 |
+
pip-delete-this-directory.txt
|
39 |
+
|
40 |
+
# Unit test / coverage reports
|
41 |
+
htmlcov/
|
42 |
+
.tox/
|
43 |
+
.nox/
|
44 |
+
.coverage
|
45 |
+
.coverage.*
|
46 |
+
.cache
|
47 |
+
nosetests.xml
|
48 |
+
coverage.xml
|
49 |
+
*.cover
|
50 |
+
*.py,cover
|
51 |
+
.hypothesis/
|
52 |
+
.pytest_cache/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
target/
|
76 |
+
|
77 |
+
# Jupyter Notebook
|
78 |
+
.ipynb_checkpoints
|
79 |
+
|
80 |
+
# IPython
|
81 |
+
profile_default/
|
82 |
+
ipython_config.py
|
83 |
+
|
84 |
+
# pyenv
|
85 |
+
.python-version
|
86 |
+
|
87 |
+
# pipenv
|
88 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
89 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
90 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
91 |
+
# install all needed dependencies.
|
92 |
+
#Pipfile.lock
|
93 |
+
|
94 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
95 |
+
__pypackages__/
|
96 |
+
|
97 |
+
# Celery stuff
|
98 |
+
celerybeat-schedule
|
99 |
+
celerybeat.pid
|
100 |
+
|
101 |
+
# SageMath parsed files
|
102 |
+
*.sage.py
|
103 |
+
|
104 |
+
# Environments
|
105 |
+
.env
|
106 |
+
.venv
|
107 |
+
env/
|
108 |
+
venv/
|
109 |
+
ENV/
|
110 |
+
env.bak/
|
111 |
+
venv.bak/
|
112 |
+
|
113 |
+
# Spyder project settings
|
114 |
+
.spyderproject
|
115 |
+
.spyproject
|
116 |
+
|
117 |
+
# Rope project settings
|
118 |
+
.ropeproject
|
119 |
+
|
120 |
+
# mkdocs documentation
|
121 |
+
/site
|
122 |
+
|
123 |
+
# mypy
|
124 |
+
.mypy_cache/
|
125 |
+
.dmypy.json
|
126 |
+
dmypy.json
|
127 |
+
|
128 |
+
# Pyre type checker
|
129 |
+
.pyre/
|
11.pdf
ADDED
Binary file (171 kB). View file
|
|
LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Apache License
|
2 |
+
Version 2.0, January 2004
|
3 |
+
http://www.apache.org/licenses/
|
4 |
+
|
5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
+
|
7 |
+
1. Definitions.
|
8 |
+
|
9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
+
|
12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
+
the copyright owner that is granting the License.
|
14 |
+
|
15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
+
other entities that control, are controlled by, or are under common
|
17 |
+
control with that entity. For the purposes of this definition,
|
18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
19 |
+
direction or management of such entity, whether by contract or
|
20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
+
|
23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
+
exercising permissions granted by this License.
|
25 |
+
|
26 |
+
"Source" form shall mean the preferred form for making modifications,
|
27 |
+
including but not limited to software source code, documentation
|
28 |
+
source, and configuration files.
|
29 |
+
|
30 |
+
"Object" form shall mean any form resulting from mechanical
|
31 |
+
transformation or translation of a Source form, including but
|
32 |
+
not limited to compiled object code, generated documentation,
|
33 |
+
and conversions to other media types.
|
34 |
+
|
35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
36 |
+
Object form, made available under the License, as indicated by a
|
37 |
+
copyright notice that is included in or attached to the work
|
38 |
+
(an example is provided in the Appendix below).
|
39 |
+
|
40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
+
form, that is based on (or derived from) the Work and for which the
|
42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
44 |
+
of this License, Derivative Works shall not include works that remain
|
45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
+
the Work and Derivative Works thereof.
|
47 |
+
|
48 |
+
"Contribution" shall mean any work of authorship, including
|
49 |
+
the original version of the Work and any modifications or additions
|
50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
+
means any form of electronic, verbal, or written communication sent
|
55 |
+
to the Licensor or its representatives, including but not limited to
|
56 |
+
communication on electronic mailing lists, source code control systems,
|
57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
59 |
+
excluding communication that is conspicuously marked or otherwise
|
60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
+
|
62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
64 |
+
subsequently incorporated within the Work.
|
65 |
+
|
66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
71 |
+
Work and such Derivative Works in Source or Object form.
|
72 |
+
|
73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
+
(except as stated in this section) patent license to make, have made,
|
77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
+
where such license applies only to those patent claims licensable
|
79 |
+
by such Contributor that are necessarily infringed by their
|
80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
82 |
+
institute patent litigation against any entity (including a
|
83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
+
or a Contribution incorporated within the Work constitutes direct
|
85 |
+
or contributory patent infringement, then any patent licenses
|
86 |
+
granted to You under this License for that Work shall terminate
|
87 |
+
as of the date such litigation is filed.
|
88 |
+
|
89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
+
Work or Derivative Works thereof in any medium, with or without
|
91 |
+
modifications, and in Source or Object form, provided that You
|
92 |
+
meet the following conditions:
|
93 |
+
|
94 |
+
(a) You must give any other recipients of the Work or
|
95 |
+
Derivative Works a copy of this License; and
|
96 |
+
|
97 |
+
(b) You must cause any modified files to carry prominent notices
|
98 |
+
stating that You changed the files; and
|
99 |
+
|
100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
101 |
+
that You distribute, all copyright, patent, trademark, and
|
102 |
+
attribution notices from the Source form of the Work,
|
103 |
+
excluding those notices that do not pertain to any part of
|
104 |
+
the Derivative Works; and
|
105 |
+
|
106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
+
distribution, then any Derivative Works that You distribute must
|
108 |
+
include a readable copy of the attribution notices contained
|
109 |
+
within such NOTICE file, excluding those notices that do not
|
110 |
+
pertain to any part of the Derivative Works, in at least one
|
111 |
+
of the following places: within a NOTICE text file distributed
|
112 |
+
as part of the Derivative Works; within the Source form or
|
113 |
+
documentation, if provided along with the Derivative Works; or,
|
114 |
+
within a display generated by the Derivative Works, if and
|
115 |
+
wherever such third-party notices normally appear. The contents
|
116 |
+
of the NOTICE file are for informational purposes only and
|
117 |
+
do not modify the License. You may add Your own attribution
|
118 |
+
notices within Derivative Works that You distribute, alongside
|
119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
120 |
+
that such additional attribution notices cannot be construed
|
121 |
+
as modifying the License.
|
122 |
+
|
123 |
+
You may add Your own copyright statement to Your modifications and
|
124 |
+
may provide additional or different license terms and conditions
|
125 |
+
for use, reproduction, or distribution of Your modifications, or
|
126 |
+
for any such Derivative Works as a whole, provided Your use,
|
127 |
+
reproduction, and distribution of the Work otherwise complies with
|
128 |
+
the conditions stated in this License.
|
129 |
+
|
130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
132 |
+
by You to the Licensor shall be under the terms and conditions of
|
133 |
+
this License, without any additional terms or conditions.
|
134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
+
the terms of any separate license agreement you may have executed
|
136 |
+
with Licensor regarding such Contributions.
|
137 |
+
|
138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
140 |
+
except as required for reasonable and customary use in describing the
|
141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
+
|
143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
+
agreed to in writing, Licensor provides the Work (and each
|
145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
+
implied, including, without limitation, any warranties or conditions
|
148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
+
appropriateness of using or redistributing the Work and assume any
|
151 |
+
risks associated with Your exercise of permissions under this License.
|
152 |
+
|
153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
+
whether in tort (including negligence), contract, or otherwise,
|
155 |
+
unless required by applicable law (such as deliberate and grossly
|
156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
+
liable to You for damages, including any direct, indirect, special,
|
158 |
+
incidental, or consequential damages of any character arising as a
|
159 |
+
result of this License or out of the use or inability to use the
|
160 |
+
Work (including but not limited to damages for loss of goodwill,
|
161 |
+
work stoppage, computer failure or malfunction, or any and all
|
162 |
+
other commercial damages or losses), even if such Contributor
|
163 |
+
has been advised of the possibility of such damages.
|
164 |
+
|
165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
+
or other liability obligations and/or rights consistent with this
|
169 |
+
License. However, in accepting such obligations, You may act only
|
170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
+
of any other Contributor, and only if You agree to indemnify,
|
172 |
+
defend, and hold each Contributor harmless for any liability
|
173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
174 |
+
of your accepting any such warranty or additional liability.
|
175 |
+
|
176 |
+
END OF TERMS AND CONDITIONS
|
177 |
+
|
178 |
+
APPENDIX: How to apply the Apache License to your work.
|
179 |
+
|
180 |
+
To apply the Apache License to your work, attach the following
|
181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
+
replaced with your own identifying information. (Don't include
|
183 |
+
the brackets!) The text should be enclosed in the appropriate
|
184 |
+
comment syntax for the file format. We also recommend that a
|
185 |
+
file or class name and description of purpose be included on the
|
186 |
+
same "printed page" as the copyright notice for easier
|
187 |
+
identification within third-party archives.
|
188 |
+
|
189 |
+
Copyright [yyyy] [name of copyright owner]
|
190 |
+
|
191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
+
you may not use this file except in compliance with the License.
|
193 |
+
You may obtain a copy of the License at
|
194 |
+
|
195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
+
|
197 |
+
Unless required by applicable law or agreed to in writing, software
|
198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
+
See the License for the specific language governing permissions and
|
201 |
+
limitations under the License.
|
MANUALTECNICO.md
ADDED
File without changes
|
controller/EvalController.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
class EvaluadorController:
|
2 |
+
def __init__(self) -> None:
|
3 |
+
super().__init__()
|
4 |
+
# FIXME convertirlo en diccionario cuya llave sea el id del estudiante y el valor una lista de las evaluaciones que se han hecho para el mismo estudiante
|
5 |
+
self.evaluaciones = []
|
6 |
+
self.nombres = {}
|
7 |
+
self.criterio_persona = {}
|
8 |
+
self.calificaciones = {}
|
9 |
+
self.crt_aux = {}
|
10 |
+
self.criterios = {"Actuales": {"Desarrollo y profundidad en el tratamiento del tema": 20,
|
11 |
+
"Desaf铆o acad茅mico y cient铆fico del tema": 15,
|
12 |
+
"Cumplimiento de los objetivos propuestos": 10,
|
13 |
+
"Creatividad e innovaci贸n de las soluciones y desarrollos propuestos": 10,
|
14 |
+
"Validez de los resultados y conclusiones": 20,
|
15 |
+
"Manejo y procesamiento de la informaci贸n y bibliograf铆a": 10,
|
16 |
+
"Calidad y presentaci贸n del documento escrito": 7.5,
|
17 |
+
"Presentaci贸n oral": 7.5}}
|
18 |
+
#a
|
19 |
+
def agregar_evaluacion(self, evaluacion_obj):
|
20 |
+
self.evaluaciones.append(evaluacion_obj)
|
controller/__init__.py
ADDED
File without changes
|
main.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
Punto de entrada del programa
|
3 |
+
"""
|
4 |
+
from view.MainView import MainView
|
5 |
+
|
6 |
+
|
7 |
+
if __name__ == "__main__":
|
8 |
+
gui = MainView()
|
9 |
+
gui.controlar_menu()
|
10 |
+
|
model/Criterio.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
|
4 |
+
class Criterio:
|
5 |
+
|
6 |
+
def __int__(self, descripcion, categoria):
|
7 |
+
self._descripcion = descripcion
|
8 |
+
self._categoria = categoria
|
9 |
+
|
10 |
+
def __str__(self) -> str:
|
11 |
+
return json.dump(self.__dict__)
|
model/EvalAnteproy.py
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
|
4 |
+
class EvaluacionAnteproyecto:
|
5 |
+
|
6 |
+
def __init__(self) -> None:
|
7 |
+
super().__init__()
|
8 |
+
self.criterios = {"planteamiento": [], "objetivos": [], "justificacion": [], "generales": [], "titulo": []}
|
9 |
+
self.observaciones = ""
|
10 |
+
self.nota = 0.0
|
11 |
+
|
12 |
+
# Datos de toda evaluacion
|
13 |
+
self.fecha_evaluacion = ""
|
14 |
+
self.nombre_estudiante = ""
|
15 |
+
self.id_estudiante = ""
|
16 |
+
self.tema_proyecto = ""
|
17 |
+
self.version_doc = " " # Identifica la version en la que va la evaluaci贸n
|
18 |
+
|
19 |
+
# Llamado al m茅todo que inicializa la informaci贸n precargada
|
20 |
+
self._inicializar_criterios()
|
21 |
+
|
22 |
+
def _inicializar_criterios(self):
|
23 |
+
# Criterios relacionados con el planteamiento
|
24 |
+
# FIXME mover esta data para un json y hacer un m茅todo que cargue la data
|
25 |
+
|
26 |
+
categoria = "Contexto"
|
27 |
+
lista = []
|
28 |
+
# lista.append(Criterio(categoria, "Introduce gradualmente al lector en el escenario donde se presenta el problema y describe caracter铆sticas espec铆ficas que sean interesantes para entender la problem谩tica (ejm geogr谩ficas, culturales, econ贸micas)"))
|
29 |
+
# lista.append(Criterio(categoria, "Presenta los involucrados en el proyecto (stakeholders) y la informaci贸n relevante para entender los stakeholders. Por ejemplo sus condiciones econ贸micas, caracter铆sticas culturales, 茅tnicas, su forma de trabajo, etc ."))
|
30 |
+
# lista.append(Criterio(categoria, "La informaci贸n presentada en el contexto es relevante para el problema"))
|
31 |
+
# lista.append(Criterio(categoria, "Soporta el contexto con estudios, cifras, datos sectoriales de referencias bibliogr谩ficas de fuentes confiables. Ejm. estudios sectoriales, revistas o publicaciones acad茅micas, medios de difusi贸n nacional o internacional. NO: blogs, youtube, y fuentes no acad茅micas"))
|
32 |
+
self.criterios["planteamiento"] = lista
|
33 |
+
|
34 |
+
def __str__(self) -> str:
|
35 |
+
return json.dumps(self.__dict__)
|
36 |
+
|
37 |
+
# TODO completar con el resto de criterios
|
model/__init__.py
ADDED
File without changes
|
proyecto2POO.jpg
ADDED
![]() |
puj_logo_azul_copia1_0.png
ADDED
![]() |
requirements.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
锘縪penpyxl
|
2 |
+
streamlit>=1.8.1
|
3 |
+
streamlit-option-menu>=0.3.2
|
4 |
+
pydataxm == 0.2.6
|
5 |
+
|
6 |
+
fpdf~=1.7.2
|
7 |
+
gsheetsdb==0.1.13.1
|
run.py
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from streamlit import bootstrap
|
2 |
+
|
3 |
+
real_script = 'view/MainView.py'
|
4 |
+
|
5 |
+
bootstrap.run(real_script, f'run.py {real_script}', [], {})
|
secrets.toml
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
public_gsheets_url = "https://docs.google.com/spreadsheets/d/1ZfRATRYeowv__6ZL16hiiHUreFUhwQigkHosozE9hIo/edit?usp=sharing"
|
test/EjemploTest.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import unittest
|
2 |
+
|
3 |
+
|
4 |
+
class ExampleTest(unittest.TestCase):
|
5 |
+
def test_something(self):
|
6 |
+
self.assertEqual(True, True) # add assertion here
|
7 |
+
|
8 |
+
def test_something_fail(self):
|
9 |
+
self.assertEqual(True, False) # add assertion here
|
10 |
+
|
11 |
+
if __name__ == '__main__':
|
12 |
+
unittest.main()
|
view/CalificarActa.py
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
def search(index, d):
|
3 |
+
i = 0
|
4 |
+
for key in d:
|
5 |
+
if i == index:
|
6 |
+
return key
|
7 |
+
i+=1
|
8 |
+
|
9 |
+
def calificar_acta(st, controller):
|
10 |
+
ids = []
|
11 |
+
ver = 0
|
12 |
+
criterios = controller.criterios
|
13 |
+
st.title("CALIFICACI脫N DE ACTAS ")
|
14 |
+
st.subheader("Selecciona el ID del estudiante a calificar")
|
15 |
+
for calificacion in controller.evaluaciones:
|
16 |
+
ids.append(calificacion.id_estudiante)
|
17 |
+
seleccion = st.selectbox("Seleccione:", ids)
|
18 |
+
if (seleccion != None):
|
19 |
+
d_calificaciones = {}
|
20 |
+
st.text("Est谩s calificando a "+str(controller.nombres.get(seleccion)))
|
21 |
+
st.subheader("Seleccione bloque criterios a calificar")
|
22 |
+
seleccion_2 = st.selectbox("Selecci贸n:", criterios.keys())
|
23 |
+
if (seleccion_2 != None):
|
24 |
+
crt_actual = criterios.get(seleccion_2)
|
25 |
+
st.subheader("Seleccione el criterio a calificar")
|
26 |
+
seleccion_3 = st.selectbox("Selecci贸n:", crt_actual.keys())
|
27 |
+
if (seleccion_3 != None):
|
28 |
+
st.text(seleccion_3)
|
29 |
+
nota_crt1 = st.number_input("Calificaci贸n jurado 1", min_value=0.0, max_value=5.0, step=0.1)
|
30 |
+
observacion1 = st.text_input("Observaci贸n jurado 1:")
|
31 |
+
nota_crt2 = st.number_input("Calificaci贸n jurado 2", min_value=0.0, max_value=5.0, step=0.1)
|
32 |
+
observacion2 = st.text_input("Observaci贸n jurado 2:")
|
33 |
+
observaciong = st.text_input("Observaci贸n general:")
|
34 |
+
guardar = st.button("Guardar")
|
35 |
+
if guardar:
|
36 |
+
p = controller.criterio_persona[seleccion]
|
37 |
+
st.text(p)
|
38 |
+
if (controller.criterio_persona[seleccion] != seleccion_2):
|
39 |
+
controller.calificaciones[seleccion].clear()
|
40 |
+
controller.criterio_persona[seleccion] = seleccion_2
|
41 |
+
st.text("Se ha calificado a " + str(controller.nombres.get(seleccion)) + " exitosamente")
|
42 |
+
tupla = (nota_crt1, observacion1, nota_crt2, observacion2, observaciong)
|
43 |
+
d_calificaciones[seleccion_3] = tupla
|
44 |
+
controller.calificaciones[seleccion].setdefault(seleccion_3, tupla)
|
45 |
+
t = controller.calificaciones[seleccion]
|
46 |
+
st.text(t)
|
47 |
+
ver = 1
|
view/CrearActa.py
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
""" Este archivo contine las funcionalidades de la vista relacionado con la evaluacion de los anteproyectos"""
|
4 |
+
from fpdf import FPDF
|
5 |
+
|
6 |
+
from model.EvalAnteproy import EvaluacionAnteproyecto
|
7 |
+
from view.ImprimirActa import calificacion_general
|
8 |
+
|
9 |
+
|
10 |
+
def instrucciones():
|
11 |
+
return """
|
12 |
+
Por favor rellenar todos los espacios en este apartado para poder crear el acta. \n\n\n\n\n
|
13 |
+
"""
|
14 |
+
|
15 |
+
def agregar_evaluacion(st, controller):
|
16 |
+
# Objecto que modelar谩 el formulario
|
17 |
+
evaluacion_obj = EvaluacionAnteproyecto()
|
18 |
+
evaluacion_obj.nombre = st.text_input("Autor")
|
19 |
+
evaluacion_obj.id_estudiante = st.text_input("ID Estudiante")
|
20 |
+
evaluacion_obj.tema_proyecto = st.text_input("Tema del proyecto")
|
21 |
+
evaluacion_obj.periodo = st.text_input("Periodo")
|
22 |
+
evaluacion_obj.director = st.text_input("Director")
|
23 |
+
codirector= st.radio("驴Existe Co-Director para el proyecto?", ('S铆','No'))
|
24 |
+
if codirector == 'S铆':
|
25 |
+
evaluacion_obj.co_director = st.text_input("Co-Director")
|
26 |
+
else:
|
27 |
+
evaluacion_obj.co_director = 'NA'
|
28 |
+
evaluacion_obj.enfasis = st.text_input("脡nfasis")
|
29 |
+
evaluacion_obj.modalidad = st.radio("Escoja la modalidad", ('Investigaci贸n', 'Aplicado'))
|
30 |
+
evaluacion_obj.jurado1 = st.text_input("Jurado 1")
|
31 |
+
evaluacion_obj.jurado2 = st.text_input("Jurado 2")
|
32 |
+
# TODO
|
33 |
+
# Agregar campo para leer el tema y la versi贸n de la evaluaci贸n del proyecto
|
34 |
+
enviado_btn = st.button("Guardar")
|
35 |
+
# Cuando se oprime el boton se agrega a la lista
|
36 |
+
if enviado_btn:
|
37 |
+
controller.agregar_evaluacion(evaluacion_obj)
|
38 |
+
st.write("Evaluacion agregada exitosamente")
|
39 |
+
controller.nombres[evaluacion_obj.id_estudiante] = evaluacion_obj.nombre
|
40 |
+
controller.calificaciones[evaluacion_obj.id_estudiante] = {}
|
41 |
+
controller.criterio_persona[evaluacion_obj.id_estudiante] = 'Actuales'
|
42 |
+
# Retorna el controlador pq solo las colecciones se pasan en python por referencia,
|
43 |
+
# entonces de esta manera se actualiza el controlador en la vista principal
|
44 |
+
return controller
|
45 |
+
|
46 |
+
|
47 |
+
def search(clave, d):
|
48 |
+
i = 0
|
49 |
+
for key in d:
|
50 |
+
if key == clave:
|
51 |
+
return i
|
52 |
+
i+=1
|
53 |
+
|
54 |
+
|
55 |
+
def listar_evaluacion(st, controller):
|
56 |
+
ids = []
|
57 |
+
nombres = controller.nombres
|
58 |
+
criterios = controller.criterios
|
59 |
+
notas = controller.calificaciones
|
60 |
+
st.title("LISTA DE ACTAS ")
|
61 |
+
st.subheader("Selecciona el ID del estudiante a listar")
|
62 |
+
for calificacion in controller.evaluaciones:
|
63 |
+
ids.append(calificacion.id_estudiante)
|
64 |
+
seleccion = st.selectbox("Seleccione:", ids)
|
65 |
+
|
66 |
+
"""Itera los elementos de evaluacion agregados y los muestra"""
|
67 |
+
i = 1
|
68 |
+
e = 0
|
69 |
+
index = search(seleccion, nombres)
|
70 |
+
|
71 |
+
contador = 0
|
72 |
+
for evaluacion in controller.evaluaciones:
|
73 |
+
if (contador == index):
|
74 |
+
st.title("ACTA N脷MERO "+str(i))
|
75 |
+
notas = notas[evaluacion.id_estudiante]
|
76 |
+
criterios_p = controller.criterio_persona[evaluacion.id_estudiante]
|
77 |
+
dat = criterios[criterios_p]
|
78 |
+
st.subheader("Nombre")
|
79 |
+
st.write(evaluacion.nombre)
|
80 |
+
# with col1:
|
81 |
+
st.subheader("ID Estudiante")
|
82 |
+
st.write(evaluacion.id_estudiante)
|
83 |
+
#with col1:
|
84 |
+
st.subheader("Tema del proyecto")
|
85 |
+
st.write(evaluacion.tema_proyecto)
|
86 |
+
#with col1:
|
87 |
+
st.subheader("Periodo")
|
88 |
+
st.write(evaluacion.periodo)
|
89 |
+
#with col1:
|
90 |
+
st.subheader("Director")
|
91 |
+
st.write(evaluacion.director)
|
92 |
+
#with col1:
|
93 |
+
st.subheader("Co-Director")
|
94 |
+
st.write(evaluacion.co_director)
|
95 |
+
#with col1:
|
96 |
+
st.subheader("脡nfasis")
|
97 |
+
st.write(evaluacion.enfasis)
|
98 |
+
#with col1:
|
99 |
+
st.subheader("Modalidad")
|
100 |
+
st.write(evaluacion.modalidad)
|
101 |
+
#with col1:
|
102 |
+
st.subheader("Jurado 1")
|
103 |
+
st.write(evaluacion.jurado1)
|
104 |
+
#with col1:
|
105 |
+
st.subheader("Jurado 2")
|
106 |
+
st.write(evaluacion.jurado2)
|
107 |
+
for key in dat:
|
108 |
+
st.subheader(key)
|
109 |
+
dat2 = notas.get(key)
|
110 |
+
if (dat2 == None):
|
111 |
+
dat2 = 'Por favor Ingresar el valor de la calificaci贸n.'
|
112 |
+
st.subheader(dat2)
|
113 |
+
else:
|
114 |
+
st.subheader((dat2[0] + dat2[2])/2)
|
115 |
+
st.subheader("Calificaci贸n general")
|
116 |
+
st.text(calificacion_general(evaluacion.id_estudiante, st, controller))
|
117 |
+
|
118 |
+
#st.write(criterios.nota_crt1)
|
119 |
+
i += 1
|
120 |
+
e += 1
|
121 |
+
contador += 1
|
122 |
+
|
123 |
+
"""
|
124 |
+
|
125 |
+
def exp_acta(st, controller):
|
126 |
+
from datetime import datetime
|
127 |
+
numact = 1
|
128 |
+
st.title('Generar PDF')
|
129 |
+
pdf = FPDF()
|
130 |
+
pdf.add_page()
|
131 |
+
dia = datetime.today().strftime('%Y-%m-%d')
|
132 |
+
a帽o = datetime.today().strftime('%Y')
|
133 |
+
pdf.set_font('Arial', "B", size=17)
|
134 |
+
pdf.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png',15 , 10, 40)
|
135 |
+
pdf.cell(200, 10, txt='Facultad de Ingenier铆a', ln=1, align='C')
|
136 |
+
pdf.cell(200, 10, txt='Maestr铆a en Ingenier铆a', ln=2, align='C')
|
137 |
+
pdf.set_font('Arial', "B", size=13)
|
138 |
+
pdf.cell(150, 10, txt='ACTA: '+"11"+'-'+a帽o, ln=0, align='L')
|
139 |
+
pdf.cell(16, 10, txt='Fecha: ', ln=0, align='L')
|
140 |
+
pdf.set_font('Arial', size=13)
|
141 |
+
pdf.cell(0, 10, txt=dia, ln=1, align='L')
|
142 |
+
pdf.set_font('Arial', "B", size=13)
|
143 |
+
pdf.cell(200, 10, txt='ACTA DE EVALUACI脫N DE TRABAJO DE GRADO', ln=1, align='C')
|
144 |
+
pdf.set_font('Arial', size=13)
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
for posicion in controller.evaluaciones:
|
149 |
+
pdf.cell(63, 10, txt='Trabajo de grado denominado: ', ln=0, align='L')
|
150 |
+
pdf.cell(80, 10, txt=str(posicion.tema_proyecto), ln=1, align='L')
|
151 |
+
pdf.cell(40, 10, txt='Autor: ', ln=0, align='L')
|
152 |
+
pdf.cell(100, 10, txt=str(posicion.nombre), ln=0, align='L')
|
153 |
+
pdf.cell(50, 10, txt='ID: '+str(posicion.id_estudiante), ln=1, align='L')
|
154 |
+
pdf.cell(40, 10, txt='Periodo: ', ln=0, align='L')
|
155 |
+
pdf.cell(100, 10, txt=str(posicion.periodo), ln=1, align='L')
|
156 |
+
pdf.cell(40, 10, txt='Director: ', ln=0, align='L')
|
157 |
+
pdf.cell(100, 10, txt=str(posicion.director), ln=1, align='L')
|
158 |
+
pdf.cell(40, 10, txt='Co-Director: ', ln=0, align='L')
|
159 |
+
pdf.cell(100, 10, txt=str(posicion.co_director), ln=1, align='L')
|
160 |
+
pdf.cell(40, 10, txt='脡nfasis en: ', ln=0, align='L')
|
161 |
+
pdf.cell(100, 10, txt=str(posicion.enfasis), ln=1, align='L')
|
162 |
+
pdf.cell(40, 10, txt='Modalidad: ', ln=0, align='L')
|
163 |
+
pdf.cell(100, 10, txt=str(posicion.modalidad), ln=1, align='L')
|
164 |
+
pdf.cell(40, 10, txt='Jurado 1: ', ln=0, align='L')
|
165 |
+
pdf.cell(100, 10, txt=str(posicion.jurado1), ln=1, align='L')
|
166 |
+
pdf.cell(40, 10, txt='Jurado 2: ', ln=0, align='L')
|
167 |
+
pdf.cell(100, 10, txt=str(posicion.jurado2), ln=1, align='L')
|
168 |
+
|
169 |
+
pdf.add_page()
|
170 |
+
dia = datetime.today().strftime('%Y-%m-%d')
|
171 |
+
a帽o = datetime.today().strftime('%Y')
|
172 |
+
pdf.set_font('Arial', size=13)
|
173 |
+
pdf.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png',15 , 10, 40)
|
174 |
+
pdf.cell(200, 10, txt='Facultad de Ingenier铆a', ln=1, align='C')
|
175 |
+
pdf.cell(200, 10, txt='Maestr铆a en Ingenier铆a', ln=1, align='C')
|
176 |
+
pdf.cell(100, 10, txt='ACTA: '+"11"+'-'+a帽o, ln=0, align='L')
|
177 |
+
pdf.cell(100, 10, txt='Fecha: '+dia, ln=1, align='L')
|
178 |
+
pdf.cell(200, 10, txt='ACTA DE EVALUACI脫N DE TRABAJO DE GRADO', ln=1, align='C')
|
179 |
+
|
180 |
+
enviar_calificacion = st.button('Generar PDF')
|
181 |
+
numacta = st.text_input('Nombre del acta', '')
|
182 |
+
if enviar_calificacion:
|
183 |
+
pdf.output(numacta+'.pdf')
|
184 |
+
st.write('ACTA GENERADA')
|
185 |
+
st.write('El nombre del acta es:', numacta + '.pdf')
|
186 |
+
while numact < 10000:
|
187 |
+
numact += 1
|
188 |
+
"""
|
189 |
+
# Main call
|
view/CrearCriterio.py
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def Nuevo_Criterio(st,controller):
|
2 |
+
con = 0
|
3 |
+
aux3 = {}
|
4 |
+
st.subheader("Nombre del bloque de criterios")
|
5 |
+
n_bloque = st.text_input("Nombre del bloque de criterios")
|
6 |
+
st.subheader("Criterio y valor porcentual")
|
7 |
+
criterio = st.text_input("Criterio")
|
8 |
+
porcentaje = st.number_input("Valor porcentual", min_value=0, max_value=100)
|
9 |
+
sig = st.button("Siguiente")
|
10 |
+
if sig:
|
11 |
+
aux = controller.crt_aux
|
12 |
+
n_igual = False
|
13 |
+
for key in aux:
|
14 |
+
con += aux.get(key)
|
15 |
+
if(key == criterio):
|
16 |
+
n_igual = True
|
17 |
+
if n_igual:
|
18 |
+
st.text("No se puede a帽adir el criterio, ya que existe uno con el mismo nombre")
|
19 |
+
elif ((con+porcentaje) > 100):
|
20 |
+
st.text("No se puede a帽adir, ya que supera el 100%")
|
21 |
+
con = 0
|
22 |
+
else:
|
23 |
+
controller.crt_aux[criterio] = porcentaje
|
24 |
+
st.text("Criterio a帽adido a "+n_bloque)
|
25 |
+
con = 0
|
26 |
+
|
27 |
+
guardar = st.button("Guardar")
|
28 |
+
|
29 |
+
if guardar:
|
30 |
+
aux = controller.crt_aux
|
31 |
+
aux2 = controller.criterios
|
32 |
+
n_igual = False
|
33 |
+
for key in aux:
|
34 |
+
con += aux.get(key)
|
35 |
+
for key in aux2:
|
36 |
+
if (n_bloque == key):
|
37 |
+
n_igual = True
|
38 |
+
if n_igual:
|
39 |
+
st.text("No se puede a帽adir el bloque, ya que existe uno con el mismo nombre")
|
40 |
+
elif ((con) < 100):
|
41 |
+
st.text("No se puede a帽adir, ya que no llega a el 100%")
|
42 |
+
con = 0
|
43 |
+
else:
|
44 |
+
aux3 = controller.crt_aux.copy()
|
45 |
+
controller.criterios[n_bloque] = aux3
|
46 |
+
st.text("Bloque " + n_bloque+ "ha sido a帽adido correctamente")
|
47 |
+
controller.crt_aux.clear()
|
48 |
+
|
49 |
+
vaciar = st.button("Vaciar")
|
50 |
+
|
51 |
+
if vaciar:
|
52 |
+
controller.crt_aux.clear()
|
53 |
+
st.text("Bloque " + n_bloque + " sido vaciado correctamente")
|
54 |
+
|
55 |
+
st.subheader("El bloque "+n_bloque+" quedar铆a de la siguiente manera")
|
56 |
+
aux = controller.crt_aux
|
57 |
+
for key in aux:
|
58 |
+
st.text(key+" - "+str(aux.get(key))+"%")
|
view/ImprimirActa.py
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fpdf import FPDF
|
2 |
+
|
3 |
+
def search(clave, d):
|
4 |
+
i = 0
|
5 |
+
for key in d:
|
6 |
+
if key == clave:
|
7 |
+
return i
|
8 |
+
i+=1
|
9 |
+
|
10 |
+
def calificacion_general(id, st, controller):
|
11 |
+
acum = 0
|
12 |
+
criterio = controller.criterio_persona[id]
|
13 |
+
criterio = controller.criterios[criterio]
|
14 |
+
notas = controller.calificaciones[id]
|
15 |
+
for key_c in criterio:
|
16 |
+
for key_n in notas:
|
17 |
+
if(key_c == key_n):
|
18 |
+
tupla = notas.get(key_n)
|
19 |
+
nota_t = ((tupla[0] + tupla[2])/2)
|
20 |
+
porcentaje = (criterio.get(key_c)/100)
|
21 |
+
acum += nota_t*porcentaje
|
22 |
+
return acum
|
23 |
+
|
24 |
+
def imp_acta(st, controller):
|
25 |
+
from datetime import datetime
|
26 |
+
st.title('Generar PDF')
|
27 |
+
acum = 0
|
28 |
+
numact = 1
|
29 |
+
ids = []
|
30 |
+
nombres = controller.nombres
|
31 |
+
st.subheader("Selecciona el ID del estudiante a Imprimir")
|
32 |
+
for calificacion in controller.evaluaciones:
|
33 |
+
ids.append(calificacion.id_estudiante)
|
34 |
+
seleccion = st.selectbox("Seleccione:", ids)
|
35 |
+
class PDF(FPDF):
|
36 |
+
def header(self):
|
37 |
+
from datetime import datetime
|
38 |
+
a帽o = datetime.today().strftime('%Y')
|
39 |
+
dia = datetime.today().strftime('%Y-%m-%d')
|
40 |
+
pdf.set_font('Arial', "B", size=17)
|
41 |
+
pdf.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png', 15,
|
42 |
+
10, 40)
|
43 |
+
pdf.cell(200, 10, txt='Facultad de Ingenier铆a', ln=1, align='C')
|
44 |
+
pdf.cell(200, 10, txt='Maestr铆a en Ingenier铆a', ln=2, align='C')
|
45 |
+
pdf.set_font('Arial', "B", size=13)
|
46 |
+
pdf.cell(150, 10, txt='ACTA: ' + str(numact) + '-' + a帽o, ln=0, align='L')
|
47 |
+
pdf.cell(16, 10, txt='Fecha: ', ln=0, align='L')
|
48 |
+
pdf.cell(0, 10, txt=dia, ln=1, align='L')
|
49 |
+
pdf = PDF()
|
50 |
+
pdf.add_page()
|
51 |
+
pdf.alias_nb_pages()
|
52 |
+
pdf.set_font('Arial', size=13)
|
53 |
+
pdf.set_font('Arial', "B", size=13)
|
54 |
+
pdf.cell(200, 10, txt='ACTA DE EVALUACI脫N DE TRABAJO DE GRADO', ln=1, align='C')
|
55 |
+
pdf.set_font('Arial', size=13)
|
56 |
+
index = search(seleccion, nombres)
|
57 |
+
contador = 0
|
58 |
+
for posicion in controller.evaluaciones:
|
59 |
+
if(contador == index):
|
60 |
+
pdf.cell(63, 10, txt='Trabajo de grado denominado: "', ln=0, align='L')
|
61 |
+
pdf.cell(80, 10, txt=' "'+str(posicion.tema_proyecto)+'"', ln=1, align='L')
|
62 |
+
pdf.cell(40, 10, txt='Autor: ', ln=0, align='L')
|
63 |
+
pdf.cell(100, 10, txt=str(posicion.nombre), ln=0, align='L')
|
64 |
+
pdf.cell(50, 10, txt='ID: '+str(posicion.id_estudiante), ln=1, align='L')
|
65 |
+
pdf.cell(40, 10, txt='Periodo: ', ln=0, align='L')
|
66 |
+
pdf.cell(100, 10, txt=str(posicion.periodo), ln=1, align='L')
|
67 |
+
pdf.cell(40, 10, txt='Director: ', ln=0, align='L')
|
68 |
+
pdf.cell(100, 10, txt=str(posicion.director), ln=1, align='L')
|
69 |
+
pdf.cell(40, 10, txt='Co-Director: ', ln=0, align='L')
|
70 |
+
pdf.cell(100, 10, txt=str(posicion.co_director), ln=1, align='L')
|
71 |
+
pdf.cell(40, 10, txt='脡nfasis en: ', ln=0, align='L')
|
72 |
+
pdf.cell(100, 10, txt=str(posicion.enfasis), ln=1, align='L')
|
73 |
+
pdf.cell(40, 10, txt='Modalidad: ', ln=0, align='L')
|
74 |
+
pdf.cell(100, 10, txt=str(posicion.modalidad), ln=1, align='L')
|
75 |
+
pdf.cell(40, 10, txt='Jurado 1: ', ln=0, align='L')
|
76 |
+
pdf.cell(100, 10, txt=str(posicion.jurado1), ln=1, align='L')
|
77 |
+
pdf.cell(40, 10, txt='Jurado 2: ', ln=0, align='L')
|
78 |
+
pdf.cell(100, 10, txt=str(posicion.jurado2), ln=1, align='L')
|
79 |
+
pdf.set_font('Arial', size=11)
|
80 |
+
pdf.cell(40, 10, txt='En atenci贸n al desarrollo de este Trabajo de Grado y al documento y sustentaci贸n que present贸 el(la) autor(a),', ln=1, align='L')
|
81 |
+
pdf.cell(40, 10, txt='los Jurados damos las siguientes calificaciones parciales y observaciones (los criterios a evaluar y sus', ln=1, align='L')
|
82 |
+
pdf.cell(40, 10, txt='ponderaciones se estipulan en el art铆culo 7.1 de las Directrices para Trabajo de Grado de Maestr铆a):', ln=1, align='L')
|
83 |
+
|
84 |
+
criterio = controller.criterio_persona[posicion.id_estudiante]
|
85 |
+
criterio = controller.criterios[criterio]
|
86 |
+
notas = controller.calificaciones[posicion.id_estudiante]
|
87 |
+
numeral = 1
|
88 |
+
for key_c in criterio:
|
89 |
+
veri = False
|
90 |
+
pdf.set_font('Arial', "B", size=12)
|
91 |
+
pdf.cell(100, 10, txt=str(str(numeral)+'. '+key_c), ln=1, align='L')
|
92 |
+
numeral += 1
|
93 |
+
pond = criterio.get(key_c)
|
94 |
+
for key_n in notas:
|
95 |
+
pdf.set_font('Arial', size=13)
|
96 |
+
if (key_c == key_n):
|
97 |
+
tupla = notas.get(key_n)
|
98 |
+
nota_t = ((tupla[0] + tupla[2]) / 2)
|
99 |
+
jur1 = tupla[1]
|
100 |
+
jur2 = tupla[3]
|
101 |
+
obser = tupla[4]
|
102 |
+
veri = True
|
103 |
+
pdf.set_font('Arial', size=11)
|
104 |
+
pdf.cell(150, 10, txt=str('Calificaci贸n parcial: '+ str(nota_t)), ln=0, align='L')
|
105 |
+
pdf.cell(100, 10, txt=str('Ponderacion: ' + str(pond)+'%'), ln=1, align='L')
|
106 |
+
pdf.cell(100, 10, txt=str('Observaciones: ' + obser), ln=1, align='L')
|
107 |
+
pdf.cell(200, 10,txt="_________________________________________________________________________________________",ln=1, align='L')
|
108 |
+
pdf.cell(200, 10,txt="_________________________________________________________________________________________",ln=1, align='L')
|
109 |
+
|
110 |
+
|
111 |
+
pdf.set_font('Arial', size=11)
|
112 |
+
if (veri == False):
|
113 |
+
pdf.set_font('Arial', size=11)
|
114 |
+
pdf.cell(150, 10, txt=str('Calificaci贸n parcial: Pendiente' ), ln=0, align='L')
|
115 |
+
pdf.cell(100, 10, txt=str('Ponderacion: ' + str(pond)+'%'), ln=1, align='L')
|
116 |
+
pdf.cell(100, 10, txt=str('Observaciones: Pendiente' ), ln=1, align='L')
|
117 |
+
pdf.cell(200, 10,txt="_________________________________________________________________________________________",ln=1, align='L')
|
118 |
+
pdf.cell(200, 10,txt="_________________________________________________________________________________________",ln=1, align='L')
|
119 |
+
contador += 1
|
120 |
+
"""
|
121 |
+
pdf.add_page()
|
122 |
+
dia = datetime.today().strftime('%Y-%m-%d')
|
123 |
+
a帽o = datetime.today().strftime('%Y')
|
124 |
+
pdf.set_font('Arial', size=13)
|
125 |
+
pdf.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png',15 , 10, 40)
|
126 |
+
pdf.cell(200, 10, txt='Facultad de Ingenier铆a', ln=1, align='C')
|
127 |
+
pdf.cell(200, 10, txt='Maestr铆a en Ingenier铆a', ln=1, align='C')
|
128 |
+
pdf.cell(100, 10, txt='ACTA: '+"11"+'-'+a帽o, ln=0, align='L')
|
129 |
+
pdf.cell(100, 10, txt='Fecha: '+dia, ln=1, align='L')
|
130 |
+
pdf.cell(200, 10, txt='ACTA DE EVALUACI脫N DE TRABAJO DE GRADO', ln=1, align='C')
|
131 |
+
"""
|
132 |
+
numacta = st.text_input('Nombre del acta', '')
|
133 |
+
enviar_calificacion = st.button('Generar PDF')
|
134 |
+
if enviar_calificacion:
|
135 |
+
pdf.output(numacta+'.pdf')
|
136 |
+
st.write('ACTA GENERADA')
|
137 |
+
st.write('El nombre del acta es:', numacta + '.pdf')
|
138 |
+
while numact < 10000:
|
139 |
+
numact += 1
|
view/Inicio.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
def consultar_instrucciones():
|
4 |
+
return """
|
5 |
+
#### 隆Hola bienvenidos!
|
6 |
+
Este es el sistema de gestion de notas aqui puedes veriricar todas tus notas sin tener que ir a otro lugar. \n
|
7 |
+
|
8 |
+
"""
|
view/ListarCriterios.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
def search(clave, d):
|
3 |
+
i = 0
|
4 |
+
for key in d:
|
5 |
+
if key == clave:
|
6 |
+
return i
|
7 |
+
i+=1
|
8 |
+
|
9 |
+
|
10 |
+
def Listar_Criterios(st,controller):
|
11 |
+
l = []
|
12 |
+
st.title("LISTA DE CRITERIOS ")
|
13 |
+
st.subheader("Selecciona el nombre del bloque de criterios a listar")
|
14 |
+
for key in controller.criterios:
|
15 |
+
l.append(key)
|
16 |
+
seleccion = st.selectbox("Seleccione:", l)
|
17 |
+
index = search(seleccion, l)
|
18 |
+
contador = 0
|
19 |
+
for key in controller.criterios:
|
20 |
+
if (contador == index):
|
21 |
+
st.title("Bloque "+key)
|
22 |
+
aux = controller.criterios.get(key)
|
23 |
+
for key2 in aux:
|
24 |
+
st.subheader(key2+ " - "+str(aux.get(key2))+" %")
|
25 |
+
contador += 1
|
view/MainView.py
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from streamlit_option_menu import option_menu
|
3 |
+
import controller
|
4 |
+
from controller.EvalController import EvaluadorController
|
5 |
+
from view.Inicio import consultar_instrucciones
|
6 |
+
from view.CrearActa import listar_evaluacion, agregar_evaluacion
|
7 |
+
from view.CrearActa import instrucciones
|
8 |
+
from view.CalificarActa import *
|
9 |
+
from CalificarActa import calificar_acta
|
10 |
+
from ImprimirActa import imp_acta
|
11 |
+
from CrearCriterio import Nuevo_Criterio
|
12 |
+
from ListarCriterios import Listar_Criterios
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
class MainView:
|
17 |
+
def __init__(self) -> None:
|
18 |
+
super().__init__()
|
19 |
+
|
20 |
+
# Estretagia para manejar el "estado" del controllador y del modelo entre cada cambio de ventana
|
21 |
+
if 'main_view' not in st.session_state:
|
22 |
+
self.menu_actual = "About"
|
23 |
+
|
24 |
+
# Conexi贸n con el controlador
|
25 |
+
self.controller = EvaluadorController()
|
26 |
+
|
27 |
+
st.session_state['main_view'] = self
|
28 |
+
else:
|
29 |
+
|
30 |
+
# Al exisir en la sesi贸n entonces se actualizan los valores
|
31 |
+
self.menu_actual = st.session_state.main_view.menu_actual
|
32 |
+
self.controller = st.session_state.main_view.controller
|
33 |
+
|
34 |
+
self._dibujar_layout()
|
35 |
+
|
36 |
+
def _dibujar_layout(self):
|
37 |
+
# Set page title, icon, layout wide (more used space in central area) and sidebar initial state
|
38 |
+
st.set_page_config(page_title="Sistema de gestion de notas", page_icon='', layout="wide",
|
39 |
+
initial_sidebar_state="expanded")
|
40 |
+
# Defines the number of available columns del area principal
|
41 |
+
self.col1, self.col2, self.col3, self.col4 = st.columns([1, 1, 1, 1])
|
42 |
+
|
43 |
+
# Define lo que abr谩 en la barra de menu
|
44 |
+
with st.sidebar:
|
45 |
+
st.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png', '',
|
46 |
+
300, )
|
47 |
+
self.menu_actual = option_menu("Menu", ["Inicio", 'Imprimir Acta', 'Crear Acta', 'Listar Actas', 'Calificar Actas','Crear Criterios','Listar Criterios'],
|
48 |
+
icons=['house', 'bi bi-printer', 'bi bi-file-earmark-plus-fill','archive','bi bi-clipboard-check','bi bi-node-plus','archive'], menu_icon="bi bi-list", default_index=0, orientation="horizontal")
|
49 |
+
|
50 |
+
def controlar_menu(self):
|
51 |
+
st.image('https://www2.javerianacali.edu.co/sites/ujc/files/field/image/puj_logo_azul_copia1_0.png', '', 300, )
|
52 |
+
"""TODO poner aqui su codigo de interaccion"""
|
53 |
+
if self.menu_actual == "Inicio":
|
54 |
+
texto = consultar_instrucciones()
|
55 |
+
st.write(texto)
|
56 |
+
elif self.menu_actual == "Imprimir Acta":
|
57 |
+
imp_acta(st, self.controller)
|
58 |
+
elif self.menu_actual == "Crear Acta":
|
59 |
+
texto1 = instrucciones()
|
60 |
+
st.write(texto1)
|
61 |
+
agregar_evaluacion(st, self.controller)
|
62 |
+
elif self.menu_actual == "Listar Actas":
|
63 |
+
listar_evaluacion(st, self.controller)
|
64 |
+
#exp_acta(st, self.controller)
|
65 |
+
elif self.menu_actual == "Calificar Actas":
|
66 |
+
calificar_acta(st, self.controller)
|
67 |
+
elif self.menu_actual == "Crear Criterios":
|
68 |
+
Nuevo_Criterio(st,self.controller)
|
69 |
+
elif self.menu_actual == "Listar Criterios":
|
70 |
+
Listar_Criterios(st,self.controller)
|
71 |
+
|
72 |
+
# Main call
|
73 |
+
if __name__ == "__main__":
|
74 |
+
main = MainView()
|
75 |
+
main.controlar_menu()
|
view/logo.png
ADDED
![]() |