learndash_format_course_points( mixed $points, int $decimals = 2 )
Formats course points to the specified decimal value.
Description #
Parameters #
- $points
-
(mixed) (Required) Course points.
- $decimals
-
(int) (Optional) The decimal values to round the course points.
Default value: 2
Return #
(float) Course points.
Source #
Changelog #
Version | Description |
---|---|
4.14.0 | $decimal parameter changed from 1 to 2 by default. |
2.1.0 | Introduced. |
Related #
Namespace #
@package #
Uses #
Uses | Description |
---|---|
src/Core/Utilities/Cast.php: Cast::to_string () |
Casts a value to a string if possible or returns an empty string. |
src/Core/Utilities/Cast.php: Cast::to_float () |
Casts a value to a float if possible or returns an empty string. |
src/Core/Utilities/Cast.php: Cast::to_int () |
Casts a value to a int if possible or returns an empty string. |
includes/ld-misc-functions.php: learndash_course_points_format_round |
Filters course points format round decimal value. |
Used By #
Used By | Description |
---|---|
includes/lib/wp-pro-quiz/wp-pro-quiz.php: learndash_question_free_get_answer_data () |
Returns the question data for a free text question type. |
includes/lib/wp-pro-quiz/wp-pro-quiz.php: learndash_question_cloze_fetch_data () |
Formats the quiz cloze type answers into an array to be used when comparing responses. |
includes/rest-api/v2/class-ld-rest-essays-controller.php: LD_REST_Essays_Controller_V2::get_rest_settings_field_value () |
Get REST Setting Field value. |
includes/rest-api/v2/class-ld-rest-essays-controller.php: LD_REST_Essays_Controller_V2::update_rest_settings_field_value () |
Update REST Settings Field value. |
includes/admin/classes-posts-listings/class-learndash-admin-essays-listing.php: Learndash_Admin_Essays_Listing::essay_bulk_actions_approve () |
Handles the approval of the essay in bulk. |
includes/admin/classes-posts-listings/class-learndash-admin-essays-listing.php: Learndash_Admin_Essays_Listing::show_column_approval_status () |
Show the Essay Approval Status. |
includes/admin/classes-posts-listings/class-learndash-admin-questions-listing.php: Learndash_Admin_Questions_Listing::show_column_question_points () |
Show Question Points column value. |
includes/admin/classes-posts-edits/class-learndash-admin-essay-edit.php: Learndash_Admin_Essay_Edit::essay_grading_meta_box () |
Prints the essay grading metabox content. |
includes/admin/classes-posts-edits/class-learndash-admin-essay-edit.php: Learndash_Admin_Essay_Edit::save_essay_status_metabox_data () |
Updates the user’s essay and quiz data on post save. |
themes/ld30/includes/helpers.php: learndash_get_essay_details () |
Gets the essay details. |
includes/settings/settings-functions.php: learndash_update_setting () |
Updates the LearnDash setting for a post. |
includes/class-ld-semper-fi-module.php: Semper_Fi_Module::save_post_data () |
Update postmeta for metabox. |
includes/class-ld-semper-fi-module.php: Semper_Fi_Module::get_option_html () |
Outputs a setting item for settings pages and metaboxes. |
includes/ld-users.php: learndash_get_user_course_points () |
Gets the course points for a user. |
includes/quiz/ld-quiz-pro.php: LD_QuizPro::wp_pro_quiz_completed () |
This function runs when a quiz is completed, and does the action ‘wp_pro_quiz_completed_quiz’ |
includes/quiz/ld-quiz-pro.php: LD_QuizPro::checkAnswers () |
Check answers for submitted quiz |
includes/quiz/ld-quiz-essays.php: learndash_update_quiz_statistics () |
Updates the quiz statistics for the given quiz attempt. |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::script () |
Outputs the question script. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_Question.php: WpProQuiz_Model_Question::setPoints () |
Sets the points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticHistory.php: WpProQuiz_Model_StatisticHistory::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticHistory.php: WpProQuiz_Model_StatisticHistory::setGPoints () |
Sets global points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticOverview.php: WpProQuiz_Model_StatisticOverview::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticOverview.php: WpProQuiz_Model_StatisticOverview::setGPoints () |
Sets global points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_AnswerTypes.php: WpProQuiz_Model_AnswerTypes::setPoints () |
Sets the points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_QuizMapper.php: WpProQuiz_Model_QuizMapper::sumQuestionPointsFromArray () |
It sums the points of all passed questions. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticFormOverview.php: WpProQuiz_Model_StatisticFormOverview::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticUser.php: WpProQuiz_Model_StatisticUser::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_StatisticUser.php: WpProQuiz_Model_StatisticUser::setGPoints () |
Sets global points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_QuestionMapper.php: WpProQuiz_Model_QuestionMapper::fetchCategoryPoints () |
Fetches points grouped by category. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_Toplist.php: WpProQuiz_Model_Toplist::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/model/WpProQuiz_Model_Statistic.php: WpProQuiz_Model_Statistic::setPoints () |
Sets points. |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Admin.php: WpProQuiz_Controller_Admin::completedQuiz () |
Called when a user completes a quiz. |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Question.php: WpProQuiz_Controller_Question::clearPost () |
Calculates and validates the points for a question based on the post data. |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Statistics.php: WpProQuiz_Controller_Statistics::ajaxLoadStatisticUser () |
Loads the user statistics for the quiz. |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Statistics.php: WpProQuiz_Controller_Statistics::makeDataList () |
Makes the data list. |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Toplist.php: WpProQuiz_Controller_Toplist::handleAddInToplist () |
Handles adding in a top list. |
includes/course/ld-course-functions.php: learndash_get_course_points () |
Gets the course points for a given course ID. |
includes/course/ld-course-functions.php: learndash_get_course_points_access () |
Gets the course points access for a given course ID. |
includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::save_user_profile () |
Save WP User Profile hook. |
includes/admin/classes-builders/class-learndash-admin-quiz-builder-metabox.php: Learndash_Admin_Metabox_Quiz_Builder::build_selector_rows_json () |
Show selector rows. |
includes/admin/classes-builders/class-learndash-admin-quiz-builder-metabox.php: Learndash_Admin_Metabox_Quiz_Builder::build_selector_row_single () |
Show selector single row. |
includes/admin/classes-builders/class-learndash-admin-quiz-builder-metabox.php: Learndash_Admin_Metabox_Quiz_Builder::process_quiz_questions () |
Build course steps HTML. |