Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const displayBundle = isTutorProActive && isAddonEnabled(Addons.COURSE_BUNDLE);
const isSubscriptionActive = isTutorProActive && isAddonEnabled(Addons.SUBSCRIPTION);

const discountTypeOptions = [
{ label: __('Percent', 'tutor'), value: 'percentage' },
{ label: __('Amount', 'tutor'), value: 'flat' },
{ label: __('Percentage', 'tutor'), value: 'percentage' },
{ label: __('Fixed Amount', 'tutor'), value: 'flat' },
];

const appliesToOptions = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const questionTypes = {
icon: 'quizOrdering',
},
draw_image: {
label: __('Mark in the Image', 'tutor'),
label: __('Mark in the image', 'tutor'),
icon: 'quizMarkInTheImage',
},
scale: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const interactiveQuestionTypeOptions: QuestionTypeOption[] = [
isPro: true,
},
{
label: __('Mark in the Image', 'tutor'),
label: __('Mark in the image', 'tutor'),
value: 'draw_image',
icon: 'quizMarkInTheImage',
isPro: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => {
render={(controllerProps) => (
<FormCheckbox
{...controllerProps}
label={__('Limit attempts allowed', 'tutor')}
label={__('Limit allowed attempts', 'tutor')}
helpText={__('Set the number of attempts allowed for this quiz. 0 means unlimited.', 'tutor')}
/>
)}
Expand Down Expand Up @@ -278,7 +278,7 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => {
render={(controllerProps) => (
<FormCheckbox
{...controllerProps}
label={__('Limit questions to answer', 'tutor')}
label={__('Set maximum questions per quiz', 'tutor')}
helpText={__(
'Set the number of quiz questions randomly from your question pool. If the set number exceeds available questions, all questions will be included',
'tutor',
Expand Down Expand Up @@ -337,7 +337,7 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => {
name="quiz_option.enable_time_limit"
control={form.control}
render={(controllerProps) => (
<FormCheckbox {...controllerProps} label={__('Set Time Limit', 'tutor')} />
<FormCheckbox {...controllerProps} label={__('Set time limit', 'tutor')} />
)}
/>
<Show when={form.watch('quiz_option.enable_time_limit')}>
Expand Down Expand Up @@ -392,7 +392,7 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => {
name="quiz_option.hide_quiz_time_display"
control={form.control}
render={(controllerProps) => (
<FormSwitch {...controllerProps} label={__('Hide quiz timer from students', 'tutor')} />
<FormSwitch {...controllerProps} label={__('Hide countdown timer', 'tutor')} />
)}
/>
</Show>
Expand Down Expand Up @@ -594,7 +594,7 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => {
control={form.control}
name="quiz_option.hide_previous_button"
render={(controllerProps) => (
<FormSwitch {...controllerProps} label={__('Hide previous button from students', 'tutor')} />
<FormSwitch {...controllerProps} label={__('Hide "Previous" button', 'tutor')} />
)}
/>
</Show>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ALL_QUESTION_TYPE_OPTIONS: QuestionTypeOption[] = [
isPro: true,
},
{
label: __('Mark in the Image', 'tutor'),
label: __('Mark in the image', 'tutor'),
value: 'draw_image',
icon: 'quizMarkInTheImage',
isPro: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const DrawImagePreview = ({ answers }: { answers: QuizQuestionOption[] }) => {
return (
<div className="tutor-quiz-question-options">
<p className="tutor-fs-7 tutor-color-secondary">
{__('No background image configured for this Mark in the Image question.', 'tutor')}
{__('No background image configured for this Mark in the image question.', 'tutor')}
</p>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ScalePreview = ({ answers }: { answers: QuizQuestionOption[] }) => {
<SVGIcon name="handSwipeRight" width={20} height={20} />
</div>
<span className="tutor-scale-instruction-text">
{__('Move the scale left or right to set value', 'tutor')}
{__('Move the scale left or right to set the correct value', 'tutor')}
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ const FormCoordinates = ({ field, activeQuestionIndex = 0, axisRangeControllerPr
<div css={styles.wrapper}>
<div css={styles.card}>
<div css={styles.answerHeader}>
<span css={styles.answerHeaderTitle}>{__('Coordinations', __TUTOR_TEXT_DOMAIN__)}</span>
<span css={styles.answerHeaderTitle}>{__('Coordinates', __TUTOR_TEXT_DOMAIN__)}</span>
</div>
<div css={styles.list}>
{coordinates.map((pt, idx) => {
Expand Down Expand Up @@ -677,7 +677,7 @@ const FormCoordinates = ({ field, activeQuestionIndex = 0, axisRangeControllerPr
}}
disabled={coordinates.length >= MAX_COORDINATES}
>
{__('Add Coordination', __TUTOR_TEXT_DOMAIN__)}
{__('Add Coordinates', __TUTOR_TEXT_DOMAIN__)}
</Button>
<div css={styles.canvasWrap} ref={gridWrapRef}>
<canvas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ const FormDrawImage = ({ field, precisionControllerProps, activeQuestionIndex =
<Show when={!option?.image_url}>
<p css={styles.placeholder}>
{__(
'Upload an image to define the area students must draw on. Then mark the correct zone in the next section.',
'First, upload your base image above. Then, proceed to the next step to draw the correct target zone.',
__TUTOR_TEXT_DOMAIN__,
)}
</p>
Expand Down
2 changes: 1 addition & 1 deletion classes/Quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ public static function render_quiz_actions( $quiz_id ) {
<?php
ConfirmationModal::make()
->id( $retry_modal_id )
->title( __( 'Retry This Quiz Attempt?', 'tutor' ) )
->title( __( 'Retake Quiz?', 'tutor' ) )
->icon( tutor_utils()->get_themed_svg( 'images/illustrations/quiz-retry.svg' ), 80, 80, ConfirmationModal::ICON_TYPE_HTML )
->message( __( 'Retrying this quiz will reset your current attempt. Your answers and score from this attempt will be lost.', 'tutor' ) )
->confirm_handler( 'retryMutation?.mutate({...payload?.data})' )
Expand Down
20 changes: 10 additions & 10 deletions classes/QuizBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function save_question_answers( $question_id, $question_type, $question_a
}

// Save sort order.
$answer_order++;
++$answer_order;
$wpdb->update(
$answers_table,
array( 'answer_order' => $answer_order ),
Expand Down Expand Up @@ -250,16 +250,16 @@ public function save_questions( $quiz_id, $questions ) {
$question_order = 0;
foreach ( $questions as $question ) {
$data_status = isset( $question[ self::TRACKING_KEY ] ) ? $question[ self::TRACKING_KEY ] : self::FLAG_NO_CHANGE;
$question_order++;
++$question_order;
if ( isset( $question['is_cb_question'], $question['cb_action'] ) && 'link' === $question['cb_action'] ) {
$question['question_order'] = $question_order;
do_action( 'tutor_content_bank_question_linked_to_quiz', $quiz_id, (object) $question );
continue;
}

$question_type = Input::sanitize( $question['question_type'] );
$question_type = Input::sanitize( $question['question_type'] );
if ( 'draw_image' === $question_type && tutor_utils()->is_legacy_learning_mode() ) {
throw new \Exception( esc_html__( 'Mark in the Image questions are not available when Legacy learning mode is enabled.', 'tutor' ) );
throw new \Exception( esc_html__( 'Mark in the image questions are not available when Legacy learning mode is enabled.', 'tutor' ) );
}
if ( 'pin_image' === $question_type && tutor_utils()->is_legacy_learning_mode() ) {
throw new \Exception( esc_html__( 'Pin questions are not available when Legacy learning mode is enabled.', 'tutor' ) );
Expand Down Expand Up @@ -386,11 +386,11 @@ public function validate_payload( $payload ) {
*/
public function handle_delete( $deleted_question_ids = array(), $deleted_answer_ids = array(), $deleted_temp_mask_values = array() ) {
global $wpdb;
$deleted_question_ids = array_filter( $deleted_question_ids, 'is_numeric' );
$deleted_answer_ids = array_filter( $deleted_answer_ids, 'is_numeric' );
$deleted_question_ids = array_filter( $deleted_question_ids, 'is_numeric' );
$deleted_answer_ids = array_filter( $deleted_answer_ids, 'is_numeric' );
$deleted_temp_mask_values = is_array( $deleted_temp_mask_values ) ? array_values( array_filter( array_map( 'strval', $deleted_temp_mask_values ) ) ) : array();
$question_file_paths = array();
$mask_question_ids = array();
$question_file_paths = array();
$mask_question_ids = array();

if ( count( $deleted_question_ids ) ) {
$mask_question_ids = $this->get_deletable_mask_question_ids( $deleted_question_ids );
Expand Down Expand Up @@ -731,8 +731,8 @@ public function save_quiz( $topic_id, $payload ) {
}

// Delete questions and answers.
$deleted_question_ids = Input::post( 'deleted_question_ids', array(), Input::TYPE_ARRAY );
$deleted_answer_ids = Input::post( 'deleted_answer_ids', array(), Input::TYPE_ARRAY );
$deleted_question_ids = Input::post( 'deleted_question_ids', array(), Input::TYPE_ARRAY );
$deleted_answer_ids = Input::post( 'deleted_answer_ids', array(), Input::TYPE_ARRAY );
$deleted_temp_mask_values = Input::post( 'deleted_temp_mask_values', array(), Input::TYPE_ARRAY );
$this->handle_delete( $deleted_question_ids, $deleted_answer_ids, $deleted_temp_mask_values );

Expand Down
2 changes: 1 addition & 1 deletion classes/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -5055,7 +5055,7 @@ public function get_question_types( $type = null ) {
'is_pro' => true,
),
'draw_image' => array(
'name' => __( 'Mark in the Image', 'tutor' ),
'name' => __( 'Mark in the image', 'tutor' ),
'icon' => '<span class="tooltip-btn"><i class="tutor-quiz-type-icon tutor-quiz-type-draw-image tutor-icon-image"></i></span>',
'is_pro' => true,
),
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/account/settings/preferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<?php SvgIcon::make()->name( Icon::PLAY_LINE )->size( 20 )->render(); ?>
</div>
<div class="tutor-preferences-setting-title">
<?php esc_html_e( 'Auto-play next lecture', 'tutor' ); ?>
<?php esc_html_e( 'Auto-play next lesson', 'tutor' ); ?>
</div>
</div>
<div class="tutor-preferences-setting-action">
Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/account/settings/withdraw.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
if ( empty( $withdrawal_methods ) ) {
?>
<section class="tutor-flex tutor-flex-column tutor-gap-4">
<h5 class="tutor-h5 tutor-md-hidden tutor-my-none"><?php echo esc_html__( 'Withdraw Method', 'tutor' ); ?></h5>
<h5 class="tutor-h5 tutor-md-hidden tutor-my-none"><?php echo esc_html__( 'Withdrawal Method', 'tutor' ); ?></h5>
<?php
EmptyState::make()
->title( __( "There's no Withdrawal method selected yet! To select a Withdraw method, please contact the Site Admin.", 'tutor' ) )
Expand Down Expand Up @@ -100,7 +100,7 @@
?>

<section class="tutor-flex tutor-flex-column tutor-gap-4">
<h5 class="tutor-h5 tutor-md-hidden tutor-my-none"><?php echo esc_html__( 'Withdraw Method', 'tutor' ); ?></h5>
<h5 class="tutor-h5 tutor-md-hidden tutor-my-none"><?php echo esc_html__( 'Withdrawal Method', 'tutor' ); ?></h5>

<form
id="<?php echo esc_attr( $form_id ); ?>"
Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/account/withdrawals.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$method_icons = WithdrawModel::get_method_icons();
$status_message = array(
WithdrawModel::STATUS_REJECTED => __( 'Please contact the site administrator for more information.', 'tutor' ),
WithdrawModel::STATUS_PENDING => __( 'Withdrawal request is pending for approval, please hold tight.', 'tutor' ),
WithdrawModel::STATUS_PENDING => __( 'Withdrawal request is pending approval, please hold tight.', 'tutor' ),
);

$currency_config = tutor_utils()->get_monetization_currency_config();
Expand Down Expand Up @@ -165,7 +165,7 @@

$pref_link_text = sprintf(
/* translators: %s: Withdraw preference settings link. */
__( 'You can change your %s.', 'tutor' ),
__( 'You can update your %s.', 'tutor' ),
'<a href="' . esc_url( $withdrawal_pref_link ) . '" class="tutor-text-brand">' . esc_html__( 'Withdraw Preference', 'tutor' ) . '</a>'
);

Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/announcements.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ function ( $course ) {
InputField::make()
->type( InputType::TEXTAREA )
->name( 'tutor_announcement_summary' )
->label( __( 'Summary', 'tutor' ) )
->placeholder( __( 'Summary...', 'tutor' ) )
->label( __( 'Description', 'tutor' ) )
->placeholder( __( 'Write a short announcement description.', 'tutor' ) )
->attr( 'rows', '5' )
->attr( 'x-bind', "register('tutor_announcement_summary', { required: 'Summary is required' })" )
->render();
Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/announcements/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
</div>
<div class="tutor-form-group">
<label for="tutor_announcement_course">
<?php esc_html_e( 'Summary', 'tutor' ); ?>
<?php esc_html_e( 'Description', 'tutor' ); ?>
</label>
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php esc_html_e( 'Summary...', 'tutor' ); ?>" required></textarea>
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php esc_html_e( 'Write a short announcement description.', 'tutor' ); ?>" required></textarea>
</div>

<?php do_action( 'tutor_announcement_editor/after' ); ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/components/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class="tutor-popover tutor-dashboard-header-user-popover"
echo wp_kses_post(
sprintf(
/* translators: %s: application date */
__( 'Your Application is pending as of <span class="tutor-font-medium">%s</span>', 'tutor' ),
__( 'Your application is pending as of <span class="tutor-font-medium">%s</span>', 'tutor' ),
esc_html( $applied_on ),
)
);
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/discussions/qna-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class="tutor-btn tutor-btn-ghost tutor-btn-x-small tutor-btn-icon tutor-text-sub
class="tutor-tooltip"
x-text="isSolved
? '<?php esc_html_e( 'Solved', 'tutor' ); ?>'
: '<?php esc_html_e( 'Unresolved Yet', 'tutor' ); ?>'"
: '<?php esc_html_e( 'Unresolved', 'tutor' ); ?>'"
>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/dashboard/instructor/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,14 @@
),
array(
'id' => 'overview_chart',
'label' => esc_html__( 'Earning Over Time', 'tutor' ),
'label' => esc_html__( 'Earnings Over Time', 'tutor' ),
'is_active' => $saved_visibility['overview_chart'] ?? true,
'order' => $saved_order['overview_chart'] ?? 1,
'data' => ! empty( $overview_chart_data ),
),
array(
'id' => 'course_completion_and_leader',
'label' => esc_html__( 'Course Completion and Leader', 'tutor' ),
'label' => esc_html__( 'Course Completion Rate', 'tutor' ),
'is_active' => $saved_visibility['course_completion_and_leader'] ?? true,
'order' => $saved_order['course_completion_and_leader'] ?? 2,
'data' => ! empty( $course_completion_data ),
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/my-quiz-attempts.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<?php
ConfirmationModal::make()
->id( 'tutor-retry-modal' )
->title( __( 'Retry This Quiz Attempt?', 'tutor' ) )
->title( __( 'Retake Quiz?', 'tutor' ) )
->icon( tutor_utils()->get_themed_svg( 'images/illustrations/quiz-retry.svg' ), 80, 80, ConfirmationModal::ICON_TYPE_HTML )
->message( __( 'Retrying this quiz will reset your current attempt. Your answers and score from this attempt will be lost.', 'tutor' ) )
->confirm_handler( 'retryMutation?.mutate({...payload?.data})' )
Expand Down
2 changes: 1 addition & 1 deletion templates/learning-area/quiz/attempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class="tutor-quiz-footer-feedback-text"
array(
'modal_id' => $submitted_modal_id,
'title' => __( 'Quiz Submitted', 'tutor' ),
'message' => __( 'Your responses have been successfully recorded.', 'tutor' ),
'message' => __( 'Your answers are locked in. Ready to check your score?', 'tutor' ),
'icon_html' => tutor_utils()->get_themed_svg( 'images/illustrations/quiz-submitted.svg' ),
'show_attempts' => false,
'action_url' => $attempt_details_url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class="tutor-font-semibold tutor-text-brand"
<?php
ConfirmationModal::make()
->id( $retry_modal_id )
->title( __( 'Retry This Quiz Attempt?', 'tutor' ) )
->title( __( 'Retake Quiz?', 'tutor' ) )
->icon( tutor_utils()->get_themed_svg( 'images/illustrations/quiz-retry.svg' ), 80, 80, ConfirmationModal::ICON_TYPE_HTML )
->message( __( 'Retrying this quiz will reset your current attempt. Your answers and score from this attempt will be lost.', 'tutor' ) )
->confirm_handler( 'retryMutation?.mutate({...payload?.data})' )
Expand Down
2 changes: 1 addition & 1 deletion tutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Tutor LMS
* Plugin URI: https://tutorlms.com
* Description: Tutor is a complete solution for creating a Learning Management System in WordPress way. It can help you to create small to large scale online education site very conveniently. Power features like report, certificate, course preview, private file sharing make Tutor a robust plugin for any educational institutes.
* Description: Tutor LMS (Free) build and manage professional online courses with unlimited lessons, a flexible quiz engine, and a complete student learning experience. No coding needed.
* Author: Themeum
* Version: 4.0.0-rc.1
* Author URI: https://themeum.com
Expand Down
4 changes: 2 additions & 2 deletions views/fragments/announcement-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ function tutor_announcement_modal( $id, $title, $courses, $announcement = null )

<div class="tutor-mb-32">
<label class="tutor-form-label" for="tutor_announcement_course">
<?php esc_html_e( 'Summary', 'tutor' ); ?>
<?php esc_html_e( 'Description', 'tutor' ); ?>
</label>
<textarea style="resize: unset;" class="tutor-form-control" rows="6" type="text" name="tutor_announcement_summary" placeholder="<?php esc_html_e( 'Summary...', 'tutor' ); ?>" required><?php echo esc_textarea( $summary ); ?></textarea>
<textarea style="resize: unset;" class="tutor-form-control" rows="6" type="text" name="tutor_announcement_summary" placeholder="<?php esc_html_e( 'Write a short announcement description.', 'tutor' ); ?>" required><?php echo esc_textarea( $summary ); ?></textarea>
</div>

<?php do_action( 'tutor_announcement_editor/after' ); ?>
Expand Down
Loading
Loading