[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove (i) from correction for case insensitive textfields

2017-06-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358068 )

Change subject: Remove (i) from correction for case insensitive textfields
..


Remove (i) from correction for case insensitive textfields

Case insensitive textfields use parameter (i) inside answer format.
The (i) parameter is currently shown in correction which is undesirable.
This change removes the parameter by using substring function.
Change can be confirmed by checking correction of textfield using (i)
parameter.

Bug:T166926
Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
---
M Question.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mvolz: Looks good to me, approved



diff --git a/Question.php b/Question.php
index 9244048..8b19494 100644
--- a/Question.php
+++ b/Question.php
@@ -432,6 +432,8 @@
}
}
if ( $this->mBeingCorrected ) {
+   $strlen = preg_match( '` \(i\)$`', 
$possibility ) ? mb_strlen( $possibility ) - 4 : mb_strlen( $possibility );
+   $possibility = substr( $possibility, 0, 
$strlen );
$poss .= $possibility . '';
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 
Gerrit-Reviewer: Mvolz 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove (i) from correction for case insensitive textfields

2017-06-09 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358068 )

Change subject: Remove (i) from correction for case insensitive textfields
..

Remove (i) from correction for case insensitive textfields

Case insensitive textfields use parameter (i) inside answer format.
The (i) parameter is currently shown in correction which is undesirable.
This change removes the parameter by using substring function.
Change can be confirmed by checking correction of textfield using (i)
parameter.

Bug:T166926
Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
---
M Question.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/Question.php b/Question.php
index 952e853..3fe1700 100644
--- a/Question.php
+++ b/Question.php
@@ -432,6 +432,8 @@
}
}
if ( $this->mBeingCorrected ) {
+   $strlen = preg_match( '` \(i\)$`', 
$possibility ) ? mb_strlen( $possibility ) - 4 : mb_strlen( $possibility );
+   $possibility = substr( $possibility, 0, 
$strlen );
$poss .= $possibility . '';
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove (i) from correction for case insensitive textfields

2017-06-04 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/357117 )

Change subject: Remove (i) from correction for case insensitive textfields
..

Remove (i) from correction for case insensitive textfields

Bug:T166926
Change-Id: I329d68f16acc86bc3c247290fe8812a59590da4d
---
M Question.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/Question.php b/Question.php
index 5410f87..c155e93 100644
--- a/Question.php
+++ b/Question.php
@@ -428,6 +428,7 @@
}
}
if ( $this->mBeingCorrected ) {
+   $possibility = $this->mCaseSensitive ? 
substr( $possibility, 0, $strlen ) : $possibility;
$a_inputBeg .= $possibility . '';
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I329d68f16acc86bc3c247290fe8812a59590da4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits