Skip to content

Commit

Permalink
actally fix #110
Browse files Browse the repository at this point in the history
  • Loading branch information
Lobz committed May 16, 2024
1 parent a4e8d1c commit e860c45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/R/corretor.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ corretoR <- function (id.exerc, texto) {
if(!no.results(precondi)) eval(parse(text=precondi), envir=corrEnv);

# Executa o texto da resposta
# Evita que o codigo retorne matrizes
texto <- paste0(texto,";TRUE;");
getError <- try(eval(
c(parse(text=texto),"TRUE"), # Evita que o codigo retorne matrizes
envir=corrEnv
));
# try pega erros de sintaxe
getError <- try(eval(parse(text=texto), envir=corrEnv));
if (class(getError) == "try-error") return (NULL);

# Executa os testes cadastrados, sequencialmente
Expand Down

0 comments on commit e860c45

Please sign in to comment.