Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
ef357565
"app/vscode:/vscode.git/clone" did not exist on "427d659a7cc7d82861a78b81b6751195ba5e2672"
Commit
ef357565
authored
Jan 27, 2023
by
Lucas Henrique
Browse files
Adiciona campo para customização da pontuação total na avaliação por barema
parent
27cc6adc
Changes
2
Show whitespace changes
Inline
Side-by-side
resources/views/evento/criarEvento.blade.php
View file @
ef357565
...
...
@@ -455,6 +455,11 @@
</
div
>
<
div
class
=
"row justify-content-center"
style
=
"margin-top:10px; display: none"
id
=
"displayCampos"
>
<
div
class
=
"row align-items-end mb-4"
>
<
label
class
=
"col-sm-3"
for
=
"pontuacao"
>
Valor
total
da
pontuação
por
Barema
:<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
input
type
=
"number"
name
=
"pontuacao"
min
=
"1"
class
=
"col-sm-1 form-control"
id
=
"pontuacao"
value
=
"
{
{old('pontuacao')}
}
"
/>
</
div
>
<
label
>
Campos
do
Barema
:</
label
>
<
table
class
=
"table table-bordered col-sm-12"
id
=
"dynamicAddRemove"
>
<
tr
>
<
th
>
Nome
<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
th
>
...
...
@@ -507,7 +512,7 @@
@
endif
<
div
class
=
"col-sm-12 alert alert-danger"
style
=
"display: none"
id
=
"nota_maxima_invalida"
>
A
soma
das
notas
máximas
não
pode
ser
maior
que
10
.
A
soma
das
notas
máximas
deve
ser
igual
a
pontuação
total
definida
.
</
div
>
<
input
type
=
"checkbox"
id
=
"checkB[0]"
checked
name
=
"campos[]"
value
=
"0"
hidden
>
...
...
@@ -683,7 +688,21 @@
});
$
(
'#pontuacao'
)
.
on
(
'input'
,
function
()
{
validateNotas
();
})
$
(
"#dynamicAddRemove"
)
.
on
(
'input'
,
'.nota_maxima'
,
function
()
{
validateNotas
();
});
function
validateNotas
()
{
pontuacao
=
$
(
"#pontuacao"
)
.
val
();
if
(
pontuacao
==
""
)
{
alert
(
"Escolha o valor total da pontuação antes de adicionar as notas máximas!"
)
$
(
'.nota_maxima'
)
.
val
(
""
);
}
else
{
somaNotas
=
0
;
$
(
".nota_maxima"
)
.
each
(
function
()
{
...
...
@@ -696,14 +715,15 @@
$
(
'#somaNotas'
)
.
val
(
somaNotas
);
if
(
somaNotas
>
10
)
{
if
(
somaNotas
!=
pontuacao
)
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
'1px solid red'
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
""
;
}
else
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
''
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
"none"
;
}
});
}
}
// Tipo de avaliação
...
...
resources/views/evento/editarEvento.blade.php
View file @
ef357565
...
...
@@ -477,6 +477,11 @@
</
div
>
<
div
class
=
"row justify-content-center"
style
=
"margin-top:10px; display: none"
id
=
"displayCampos"
>
<
div
class
=
"row align-items-end mb-4"
>
<
label
class
=
"col-sm-3"
for
=
"pontuacao"
>
Valor
total
da
pontuação
por
Barema
:<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
input
type
=
"number"
name
=
"pontuacao"
min
=
"1"
class
=
"col-sm-1 form-control"
id
=
"pontuacao"
value
=
"
{
{old('pontuacao')?old('pontuacao'):$pontuacao}
}
"
/>
</
div
>
<
label
>
Campos
do
Barema
:</
label
>
<
table
class
=
"table table-bordered col-sm-12"
id
=
"dynamicAddRemove"
>
<
tr
>
<
th
>
Nome
<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
th
>
...
...
@@ -611,7 +616,7 @@
@
endif
<
div
class
=
"col-sm-12 alert alert-danger"
style
=
"display: none"
id
=
"nota_maxima_invalida"
>
A
soma
das
notas
máximas
não
pode
ser
maior
que
10
.
A
soma
das
notas
máximas
deve
ser
igual
a
pontuação
total
definida
.
</
div
>
<
input
type
=
"checkbox"
id
=
"checkB[0]"
checked
name
=
"campos[]"
value
=
"0"
hidden
>
...
...
@@ -834,7 +839,21 @@
displayPrioridades
(
selectId
,
newOption
);
});
$
(
'#pontuacao'
)
.
on
(
'input'
,
function
()
{
validateNotas
();
})
$
(
"#dynamicAddRemove"
)
.
on
(
'input'
,
'.nota_maxima'
,
function
()
{
validateNotas
();
});
function
validateNotas
()
{
pontuacao
=
$
(
"#pontuacao"
)
.
val
();
if
(
pontuacao
==
""
)
{
alert
(
"Escolha o valor total da pontuação antes de adicionar as notas máximas!"
)
$
(
'.nota_maxima'
)
.
val
(
""
);
}
else
{
somaNotas
=
0
;
$
(
".nota_maxima"
)
.
each
(
function
()
{
...
...
@@ -847,14 +866,15 @@
$
(
'#somaNotas'
)
.
val
(
somaNotas
);
if
(
somaNotas
>
10
)
{
if
(
somaNotas
!=
pontuacao
)
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
'1px solid red'
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
""
;
}
else
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
''
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
"none"
;
}
});
}
}
// Tipo de avaliação
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment