Skip to content

Commit

Permalink
Fixing_Congrat_Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
josealfredomatias493 committed Jun 27, 2024
1 parent 129dc76 commit 13dca46
Show file tree
Hide file tree
Showing 33 changed files with 483 additions and 57 deletions.
59 changes: 31 additions & 28 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@
"name": "Jose",
"points": 0,
"last_active": "2024-03-20 ; 12h:42m"
},
{
"name": "Pepe",
"points": 124,
"last_active": ""
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
QStackedWidget, QRadioButton, QButtonGroup, QSizePolicy, QCheckBox, QFrame, QGridLayout
from Main_Modulos_Intro_Pages import MainWindow as Dashboard
from command_line_UI import App
from congratulation_Feature import CongratulationWindow


class JsonLoader:
Expand Down Expand Up @@ -602,6 +603,7 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setText("No se ha seleccionado ninguna respuesta")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
elif Correcto:
# Incrementa el XP en 2 puntos cuando la respuesta es acertada en el primer intento y tiene 0 xp (0 XP significa primera página con pregunta)
if self.current_xp == 0 and not self.controlador:
Expand All @@ -627,16 +629,19 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['correct_color']}; font-size: {self.styles['font_size_answers']}px")
self.SubmitHideContinueShow(True, False)
CongratulationWindow.correct_response()
elif Incorrecto:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incorrecta. Por favor, inténtalo de nuevo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
else:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incompleta, vuelve a intentarlo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()

def open_python_console(self):
self.SubmitHideContinueShow(True, False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from command_line_UI import CMD_Practica as CMDP
from Main_Modulos_Intro_Pages import MainWindow as Dashboard
from command_line_UI import App

from congratulation_Feature import CongratulationWindow

class JsonLoader:
@staticmethod
Expand Down Expand Up @@ -592,6 +592,7 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setText("No se ha seleccionado ninguna respuesta")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
elif Correcto:
# Incrementa el XP en 2 puntos cuando la respuesta es acertada en el primer intento y tiene 0 xp (0 XP significa primera página con pregunta)
if self.current_xp == 0 and not self.controlador:
Expand All @@ -617,16 +618,19 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['correct_color']}; font-size: {self.styles['font_size_answers']}px")
self.SubmitHideContinueShow(True, False)
CongratulationWindow.correct_response()
elif Incorrecto:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incorrecta. Por favor, inténtalo de nuevo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
else:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incompleta, vuelve a intentarlo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()

def open_python_console(self):
self.SubmitHideContinueShow(True, False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
QStackedWidget, QRadioButton, QButtonGroup, QSizePolicy, QCheckBox, QFrame
from Main_Modulos_Intro_Pages import MainWindow as Dashboard
from command_line_UI import App

from congratulation_Feature import CongratulationWindow

class JsonLoader:
@staticmethod
Expand Down Expand Up @@ -577,6 +577,7 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setText("No se ha seleccionado ninguna respuesta")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
elif Correcto:
# Incrementa el XP en 2 puntos cuando la respuesta es acertada en el primer intento y tiene 0 xp (0 XP significa primera página con pregunta)
if self.current_xp == 0 and not self.controlador:
Expand All @@ -602,17 +603,19 @@ def SubmitAnswers(self, NoSeleciona, Correcto, Incorrecto):
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['correct_color']}; font-size: {self.styles['font_size_answers']}px")
self.SubmitHideContinueShow(True, False)
CongratulationWindow.correct_response()
elif Incorrecto:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incorrecta. Por favor, inténtalo de nuevo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")
CongratulationWindow.incorrect_response()
else:
self.controlador = True
current_widget.feedback_label.setText("Respuesta incompleta, vuelve a intentarlo.")
current_widget.feedback_label.setStyleSheet(
f"color: {self.styles['incorrect_color']}; font-size: {self.styles['font_size_answers']}px")

CongratulationWindow.incorrect_response()
def open_python_console(self):
self.SubmitHideContinueShow(True, False)
print("La consola no está disponible por el momento.")
Expand Down
Loading

0 comments on commit 13dca46

Please sign in to comment.