Skip to content

Commit

Permalink
bugfix update 0.4.03
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsguides committed Jul 28, 2023
1 parent acca497 commit d456910
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,5 @@ COM_YAQUIZ_SUPPORT_THIS_PROJECT="Support This Project - Feed Kevin"

COM_YAQUIZ_SHOW_ATTEMPTS_LEFT_LABEL="Display Attempts Remaining"
COM_YAQUIZ_SHOW_ATTEMPTS_LEFT_DESC="If enabled, the number of attempts remaining will be displayed to the user on the first page of all quizzes."
COM_YAQUIZ_RESET_ALL_STATS_AND_RECORDS="Reset Statistics and Remove All Records"
COM_YAQUIZ_RESET_ALL_STATS_AND_RECORDS_DESC="This will reset all quiz statistics and records. This includes all quiz attempts, quiz results, and quiz statistics. This is irreversible."
COM_YAQUIZ_RESET_ALL_STATS_AND_RECORDS="Reset All Stats, Saved Grades, and Attempt Count"
COM_YAQUIZ_RESET_ALL_STATS_AND_RECORDS_DESC="This will reset all quiz statistics. This includes all quiz attempts, quiz results, and quiz statistics. This is irreversible."
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ public function getForm($data = [], $loadData = true)
$data->question_type = $params->question_type;
$data->randomize_mchoice = $params->randomize_mchoice;
$data->points = $params->points;
$data->case_sensitive = $params->case_sensitive;
if($data->question_type == 'fill_blank'){
$data->case_sensitive = $params->case_sensitive;
}

$data->modified_by = $app->getIdentity()->id;

//if question type is not multiple_choice
Expand Down
6 changes: 6 additions & 0 deletions administrator/components/com_yaquiz/src/Model/YaquizModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,12 @@ public function resetAllStatsAndRecords($quiz_id){
$query->where('quiz_id = ' . $quiz_id);
$db->setQuery($query);
$db->execute();
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->delete('#__com_yaquiz_user_quiz_map');
$query->where('quiz_id = ' . $quiz_id);
$db->setQuery($query);
$db->execute();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use KevinsGuides\Component\Yaquiz\Administrator\Model\YaquizModel;
$model = new YaquizModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

$quiz_id = 0;
$result_id = 0;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_yaquiz/yaquiz.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<author>KevinsGuides</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://kevinsguides.com</authorUrl>
<version>0.4.02</version>
<version>0.4.03</version>
<description>COM_YAQUIZ_XML_DESCRIPTION</description>
<namespace path="src/">KevinsGuides\Component\Yaquiz</namespace>
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
Expand Down
4 changes: 3 additions & 1 deletion components/com_yaquiz/language/sv-SE/com_yaquiz.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@ COM_YAQ_UNAVAILABLE="Inte tillgänglig"
COM_YAQ_TF_CORRECT_ANS_WAS_TRUE="Rätt svar var 'Sant'."
COM_YAQ_TF_CORRECT_ANS_WAS_FALSE="Rätt svar var 'Falskt'."
COM_YAQ_S_WAS_THE_CORRECT_ANS="Det rätta svaret var \"%s\"."
COM_YAQ_FILLBLANK_ANYCORRECT="Svaret var rätt om det innehöll några av följande:”
COM_YAQ_FILLBLANK_ANYCORRECT="Svaret var rätt om det innehöll några av följande:"
COM_YAG_1ATTEMPT_LEFT="Du har ett försök kvar"
COM_MAX_ATTEMPTS_REAHCED="Du har förbrukat alla dina försök på denna quiz"

0 comments on commit d456910

Please sign in to comment.