Skip to content

Commit c7fe16b

Browse files
v2.0.1
Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
1 parent ce0437d commit c7fe16b

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
#### 2.0.1 - 07 November 2022
4+
- ![Bug Fix](https://smftricks.com/assets/changelog/bug--minus.png) Fixed stats issue when there are no quizzes/questions created.
5+
36
#### 2.0 - 31 October 2022
47
- ![New Feature](https://smftricks.com/assets/changelog/tag--plus.png) Compatible with SMF 2.1.x
58
- ![Improvement](https://smftricks.com/assets/changelog/tag--pencil.png) Now using hooks.

Themes/default/Quiz/Quiz.template.php

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,8 +1462,27 @@ function template_quiz_details()
14621462
<div class="blockcontent windowbg" style="margin-top:2px; ">
14631463
<div style="padding:4px;">
14641464
<div class="windowbg">
1465-
<table border="0" width="100%" class="windowbg">
1466-
';
1465+
<table border="0" width="100%" class="windowbg">';
1466+
1467+
// Quiz context?
1468+
if (!isset($context['SMFQuiz']['quiz']) || empty($context['SMFQuiz']['quiz']))
1469+
{
1470+
echo '
1471+
<tr>
1472+
<td align="center">' , $txt['SMFQuiz_Categories_Page']['NoQuizesInCategory'] , '</td>
1473+
</tr>
1474+
</table>
1475+
</div>
1476+
</div>
1477+
</div>
1478+
</div>
1479+
</td>
1480+
</tr>
1481+
</table>';
1482+
1483+
return;
1484+
}
1485+
14671486
foreach ($context['SMFQuiz']['quiz'] as $quizRow)
14681487
{
14691488
echo ' <tr>

package-info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
44
<id>SMF_Modding:SMFQuiz</id>
55
<name>SMF Quiz</name>
6-
<version>2.0</version>
6+
<version>2.0.1</version>
77
<type>modification</type>
88

99
<!-- Install -->

0 commit comments

Comments
 (0)