chore: version inicial del codigo fuente del LMS Estafeta
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
require_once __DIR__.'/auth_guard.php';
|
||||
error_reporting(0);
|
||||
require_once "../config.php";
|
||||
|
||||
$idevaluacion = $_POST['idevaluacion'];
|
||||
$catsuperior = $_POST['catsuperior'];
|
||||
$titulo = $_POST['titulo'];
|
||||
$desc = $_POST['desc'];
|
||||
$instrucciones = $_POST['inst'];
|
||||
$orden = $_POST['orden'];
|
||||
$tipointentos = $_POST['tipointentos'];
|
||||
if ($tipointentos == 'Limitado') {
|
||||
$intentos = $_POST['intentos'];
|
||||
}else{
|
||||
$intentos = 0;
|
||||
}
|
||||
|
||||
$tipotiempo = $_POST['tipotiempo'];
|
||||
if ($tipotiempo == 'Limitado') {
|
||||
$tiempo = $_POST['tiempo'];
|
||||
}else{
|
||||
$tiempo = 0;
|
||||
}
|
||||
$tipopreguntas = $_POST['tipopreguntas'];
|
||||
$calificacion = $_POST['calificacion'];
|
||||
$retro = $_POST['retro'];
|
||||
$habilitado = $_POST['habilitado'];
|
||||
if( $_POST['urlimgevaluacion'] == "" ){
|
||||
$urlimgevaluacion = $CFG->wwwroot.'img/icons/211-gift.png';
|
||||
}else{
|
||||
$urlimgevaluacion = $_POST['urlimgevaluacion'];
|
||||
}
|
||||
|
||||
global $link;
|
||||
dbConnect();
|
||||
|
||||
|
||||
$sql = "UPDATE evaluaciones SET categoria=$catsuperior ,titulo='$titulo', descripcion='$desc', instrucciones = '$instrucciones', orden=$orden, tipointentos='$tipointentos', intentos=$intentos, tipotiempo='$tipotiempo', tiempo=$tiempo, calificacion=$calificacion, tipopreguntas='$tipopreguntas', retroalimentacion='$retro', habilitado=$habilitado,imagen='$urlimgevaluacion' WHERE idevaluacion=$idevaluacion";
|
||||
|
||||
|
||||
if($result = mysqli_multi_query($link, $sql)){
|
||||
$return->code = "200";
|
||||
$return->idevaluacion = $idevaluacion;
|
||||
$return->msg = "Exito!";
|
||||
}else{
|
||||
$return->code = "400";
|
||||
$return->msg = "Consulta fallo! SQL: ".$sql."<br><br> Error: ".mysqli_error($link);
|
||||
}
|
||||
|
||||
|
||||
echo json_encode($return, JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
?>
|
||||
Reference in New Issue
Block a user