Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - assignment fatal error for string value #556

Merged
merged 1 commit into from
Sep 14, 2023
Merged
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
2 changes: 1 addition & 1 deletion templates/single/assignment/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
}
}

$time_duration_in_sec = $time_duration_in_sec * $time_duration['value'];
$time_duration_in_sec = $time_duration_in_sec * (int) $time_duration['value'];
$remaining_time = $assignment_created_time + $time_duration_in_sec;
$now = time();
$remaining = $now - $remaining_time;
Expand All @@ -131,7 +131,7 @@
<div class="tutor-assignment-duration">
<span class="tutor-fs-6 tutor-color-muted"><?php esc_html_e( 'Duration:', 'tutor' ); ?></span>
<span class="tutor-fs-6 tutor-fw-medium tutor-color-black">
<?php echo esc_html( $time_duration['value'] ? $time_duration['value'] . ' ' . __( $time_duration['time'], 'tutor' ) : __( 'No limit', 'tutor' ) ); ?>

Check failure on line 134 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

The $text arg must be a single string literal, not &quot;$time_duration['time']&quot;.
</span>
</div>
<div class="tutor-assignmetn-deadline">
Expand Down Expand Up @@ -362,7 +362,7 @@

<?php $has_show_more = strlen( $s_content ) > 500 ? true : false; ?>

<?php if( $s_content ): ?>

Check failure on line 365 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Space after opening control structure is required

Check failure on line 365 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

No space before opening parenthesis is prohibited

Check failure on line 365 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Expected 1 space(s) after IF keyword; 0 found

Check failure on line 365 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Expected 1 space(s) after closing parenthesis; found 0

Check failure on line 365 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Space between opening control structure and T_COLON is required
<div class="tutor-assignment-description-details tutor-assignment-border-bottom tutor-pb-32 tutor-pb-sm-44">
<div id="content-section" class="tutor-pt-40 tutor-pt-sm-60<?php echo esc_attr( $has_show_more ? ' tutor-toggle-more-content tutor-toggle-more-collapsed' : '' ); ?>"<?php echo $has_show_more ? ' data-tutor-toggle-more-content data-toggle-height="300" style="height: 300px;"' : ''; ?>>
<div class="tutor-fs-6 tutor-fw-medium tutor-color-black">
Expand Down Expand Up @@ -574,7 +574,7 @@

<?php $has_show_more = strlen( $s_content ) > 500 ? true : false; ?>

<?php if( $s_content ): ?>

Check failure on line 577 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Space after opening control structure is required

Check failure on line 577 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

No space before opening parenthesis is prohibited

Check failure on line 577 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Expected 1 space(s) after IF keyword; 0 found

Check failure on line 577 in templates/single/assignment/content.php

View workflow job for this annotation

GitHub Actions / WPCS

Expected 1 space(s) after closing parenthesis; found 0
<div class="tutor-assignment-description-details tutor-assignment-border-bottom tutor-pb-32 tutor-pb-sm-44">
<div id="content-section" class="tutor-pt-40 tutor-pt-sm-60<?php echo $has_show_more ? ' tutor-toggle-more-content tutor-toggle-more-collapsed' : ''; ?>"<?php echo $has_show_more ? ' data-tutor-toggle-more-content data-toggle-height="300" style="height: 300px;"' : ''; ?>>
<div class="tutor-fs-6 tutor-fw-medium tutor-color-black">
Expand Down
Loading