Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367327 )

Change subject: Remove empty cell from settings table in Quiz
......................................................................

Remove empty cell from settings table in Quiz

Currently a empty cell is seen inside settings table which is caused by
<tr></tr> tags from mustache template.This patch removes the tags and alters
the template.

Bug: T171154
Change-Id: Idb35c7a6aa95ad7bf9d4e9a13d42d7088f33567e
---
M Quiz.class.php
M templates/Setting.mustache
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/27/367327/1

diff --git a/Quiz.class.php b/Quiz.class.php
index 0a43cfa..9122924 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -123,6 +123,7 @@
         * @return string
         */
        function parseQuiz( $input ) {
+               global $wgOut;
                // Ouput the style and the script to the header once for all.
                if ( $this->mQuizId == 0 ) {
                        global $wgOut;
@@ -147,6 +148,8 @@
                                'notSimple' => !$this->mDisplaySimple,
                                'corrected' => $this->mBeingCorrected,
                                'shuffle' => $this->mShuffle,
+                               'shuffleOrError' => ( $this->mShuffle && 
$this->numberQuestions > 1 ) ||
+                                       $this->mState === 'error',
                                'error' => $this->mState === 'error',
                                'wfMessage' => [
                                        'quiz_added' => wfMessage( 
'quiz_addedPoints', $this->mAddedPoints )->text(),
@@ -170,6 +173,7 @@
                                'shuffleDisplay' => $this->numberQuestions > 1
                        ]
                );
+               $wgOut->addHTML("set ".$settingsTable."<br>");
 
                $quiz_score = wfMessage( 'quiz_score' )->rawParams(
                        '<span class="score">' . $this->mScore . '</span>',
diff --git a/templates/Setting.mustache b/templates/Setting.mustache
index f6496d4..a85b8da 100644
--- a/templates/Setting.mustache
+++ b/templates/Setting.mustache
@@ -41,6 +41,7 @@
        </tr>
 {{/ isSettingOtherRow}}
 {{# notSimple}}
+       {{# shuffleOrError}}
        <tr>
                {{# shuffle}}
                        {{^ corrected}}
@@ -62,4 +63,5 @@
                        {{/ corrected}}
                {{/ error}}
        </tr>
+       {{/ shuffleOrError}}
 {{/ notSimple}}

-- 
To view, visit https://gerrit.wikimedia.org/r/367327
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb35c7a6aa95ad7bf9d4e9a13d42d7088f33567e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to