Warning with formula matrix when some entries are blank.

Abierto
#1,134 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
15/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
perl
Área
backend

Línea de trabajo

The warning comes from lib/Value/AnswerChecker.pm around line 1882, where a method call on an unblessed reference fails for a blank matrix entry. Start by reproducing the sample problem with a Formula matrix where one cell is left blank, then trace how AnswerChecker.pm handles the matrix answer on the second submit. Done means the warning no longer appears on repeated check or show-answer clicks, with blank entries in one or both cells.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

MathObject issue

Here is a test problem.

DOCUMENT();
loadMacros(qw(PGstandard.pl PGML.pl));

Context('Matrix');
$M = Matrix([[Formula('x')], [Formula('y')]]);

BEGIN_PGML
[``[$M]=``] [_]*{$M}
END_PGML
ENDDOCUMENT();

If you enter in 'x' for the top row and keep the bottom row blank in the problem editor, and click on check answer or show correct answer twice in a row, a warning will appear.

Can't call method "type" on unblessed reference at [PG]/lib/Value/AnswerChecker.pm line 1882 

Unsure why two submits are needed and the warning won't appear after the first. Also if you make both answer boxes blank, you need to click two submits before the warning goes away.

Lenguaje dominante
Perl
Estrellas
48
Forks
78
Merge medio
5 d 13 h
PR fusionados (30 d)
9

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openwebwork/pg

Todos los issues de openwebwork/pg

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.