gocodebox / gocodebox/lifterlms

Deprecated warning with incomplete quiz attempts

Open
#2,747 0 comments 0 reactions 1 assignee Assigned to @brianhogg View on GitHub
Dominant language
PHP
Stars
212
Forks
140
Avg merge
2d 14h
Merged PRs (30d)
19

Description

### Reproduction Steps

1. Turn on debugging display on the site
2. Start taking a quiz in a course
3. Refresh the page to exit the quiz before completed

### Expected Behavior

No warning is displayed

### Actual Behavior

Warning is displayed in the attempts dropdown:

Captura de pantalla 2024-08-22 a las 10 56 36 a  m

and when you select that attempt in the dropdown:

Captura de pantalla 2024-08-22 a las 10 58 33 a  m

### Error Messages / Logs

```
PHP Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in .../wp-content/plugins/lifterlms/templates/quiz/results.php on line 75

PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in .../wp-content/plugins/lifterlms/includes/models/model.llms.quiz.attempt.php on line 344
```

This issue has be recreated:
+ [ ] Locally
+ [ ] On a staging site
+ [ ] On a production website
+ [ ] With only LifterLMS and a default theme

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.