Title: Degree of Difficulty for Sensei
Author: Open-DSI
Published: <strong>27 september 2017</strong>
Last modified: 27 september 2017

---

Plugins zoeken

Deze plugin **is niet getest met de laatste 3 grotere versies van WordPress**. Mogelijk
wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen
ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

![](https://ps.w.org/degree-of-difficulty-for-sensei/assets/icon-256x256.png?rev
=1746054)

# Degree of Difficulty for Sensei

 Door [Open-DSI](https://profiles.wordpress.org/opendsi/)

[Download](https://downloads.wordpress.org/plugin/degree-of-difficulty-for-sensei.zip)

 * [Details](https://nl.wordpress.org/plugins/degree-of-difficulty-for-sensei/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/degree-of-difficulty-for-sensei/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/degree-of-difficulty-for-sensei/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/degree-of-difficulty-for-sensei/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/degree-of-difficulty-for-sensei/)

## Beschrijving

Courses will have a new tag to set their Degree of Difficulty. You can choose between
3 predefined options: Beginner, Intermediate and Advanced.
 You can add, edit or
remove your own degrees of difficulty by going to “Courses > Degrees of Difficulty”
from the menu.

Upload and display an image (or icons, pictograms) for your degree of difficulty(
thanks to John James Jacoby and his [WP Term Images](https://wordpress.org/plugins/wp-term-images/)
plugin!).

Degrees of Difficulty can be displayed by your theme using the `dds_get_sensei_course_degrees_of_difficulty()`
function.

## Schermafbeeldingen

[⌊Degree of Difficulty icons displayed next to the WooCommerce course product price.⌉⌊
Degree of Difficulty icons displayed next to the WooCommerce course product price
.⌉[

Degree of Difficulty icons displayed next to the WooCommerce course product price.

[⌊Degree of Difficulty tooltip displayed when hovering the icon.⌉⌊Degree of Difficulty
tooltip displayed when hovering the icon.⌉[

Degree of Difficulty tooltip displayed when hovering the icon.

[⌊Degrees of Difficulty administration screen.⌉⌊Degrees of Difficulty administration
screen.⌉[

Degrees of Difficulty administration screen.

[⌊Edit a Degree of Difficulty.⌉⌊Edit a Degree of Difficulty.⌉[

Edit a Degree of Difficulty.

[⌊Add a Degree of Difficulty to your Sensei course.⌉⌊Add a Degree of Difficulty 
to your Sensei course.⌉[

Add a Degree of Difficulty to your Sensei course.

## Installatie

Installing “Degree of Difficulty for Sensei” can be done either by searching for“
Degree of Difficulty for Sensei” via the “Plugins > Add New” screen in your WordPress
dashboard, or by using the following steps:

 1. Download the plugin via WordPress.org
 2. Upload the ZIP file through the ‘Plugins > Add New > Upload’ screen in your WordPress
    dashboard
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  Installation Instructions

Installing “Degree of Difficulty for Sensei” can be done either by searching for“
Degree of Difficulty for Sensei” via the “Plugins > Add New” screen in your WordPress
dashboard, or by using the following steps:

 1. Download the plugin via WordPress.org
 2. Upload the ZIP file through the ‘Plugins > Add New > Upload’ screen in your WordPress
    dashboard
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

  Does this plugin depend on any others?

Yes. It depends on the [Sensei](https://woocommerce.com/products/sensei/) LMS plugin.

  Does this create new database tables?

No. There are no new database tables with this plugin.

  Does this load additional JS or CSS files ?

Yes. It loads the `term-image.css` and `term-image.js` files on the admin screens
related to Degree of Difficulty.
 Those files are loaded by the WP Term Images plugin
which comes included.

  Can I add an icon to my degree of difficulty?

Yes. Click on the “Choose Image” button when adding or editing a Degree of Difficulty.

Sample icons are available in the `assets/images/` plugin folder.

  How do I display the degree of difficulty of a course?

The plugin comes with an helper function named `dds_get_sensei_course_degree_of_difficulty()`.

It accepts a Sensei course ID or a WooCommerce product ID as first argument.

Choose where you would like to display degrees of difficulty and make use of that
function in your theme’s `functions.php` file.
 Here is a complete example to display
the degree of difficulty next to the WooCommerce product price:

    ```
    /**
     * WooCommerce template:
     * Add Sensei course degree(s) of difficulty
     *
     * @uses dds_get_sensei_course_degrees_of_difficulty()
     */
    function mytheme_woocommerce_sensei_course_degrees_of_difficulty() {
        global $product;

        // Check product has a Sensei course.
        // Get Sensei course where WooCommerce product ID === course_woocommerce_product.
        $product_id = $product->get_id();

        if ( ! function_exists( 'dds_get_sensei_course_degrees_of_difficulty' ) ) {
            return;
        }

        $is_woocommerce_product = true;

        /**
         * Our course degrees of difficulty.
         *
         * @var array Array of arrays. Degree of difficulty array will provide id, name, slug & image_url.
         */
        $degrees_of_difficulty = dds_get_sensei_course_degrees_of_difficulty( $product_id, $is_woocommerce_product );

        if ( ! $degrees_of_difficulty ) {
            return;
        }

        foreach ( (array) $degrees_of_difficulty as $difficulty ) {

            $classes = 'mytheme-difficulty ' . $difficulty['slug'];

            $title = 'Degree of Difficulty: ' . $difficulty['name'];
            ?>
            <span class="mytheme-difficulty-wrapper">
                <span class="<?php esc_attr_e( $classes ); ?>" title="<?php esc_attr_e( $title ); ?>">
                    <?php if ( $difficulty['image_url'] ) : ?>
                        <img src="<?php esc_attr_e( $difficulty['image_url'] ); ?>" alt="<?php esc_attr_e( $title ); ?>" />
                    <?php else : ?>
                        <?php esc_html_e( $difficulty['name'] ); ?>
                    <?php endif; ?>
                </span>
            </span>
            <?php
        }
    }

    /**
     * Add Sensei course degree(s) of difficulty after product price.
     *
     * woocommerce_template_single_price hook has priority 10
     */
    add_action( 'woocommerce_single_product_summary', 'mytheme_woocommerce_sensei_course_degrees_of_difficulty', 15 );

    /**
     * Add Sensei course degree(s) of difficulty after product price.
     *
     * woocommerce_template_loop_price hook has priority 10
     */
    add_action( 'woocommerce_after_shop_loop_item_title', 'mytheme_woocommerce_sensei_course_degrees_of_difficulty', 15 );
    ```

  Is the plugin translated?

Yes. It is translated in French (fr_FR).
 You will find the translation files in
the `lang/` folder. New translations are welcome at https://translate.wordpress.
org/projects/wp-plugins/degree-of-difficulty-for-sensei

  Where can I get support?

https://wordpress.org/support/plugin/degree-of-difficulty-for-sensei/

## Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

## Bijdragers & ontwikkelaars

“Degree of Difficulty for Sensei” is open source software. De volgende personen 
hebben bijgedragen aan deze plugin.

Bijdragers

 *   [ Open-DSI ](https://profiles.wordpress.org/opendsi/)

“Degree of Difficulty for Sensei” is vertaald in 2 localen. Dank voor [de vertalers](https://translate.wordpress.org/projects/wp-plugins/degree-of-difficulty-for-sensei/contributors)
voor hun bijdragen.

[Vertaal “Degree of Difficulty for Sensei” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/degree-of-difficulty-for-sensei)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/degree-of-difficulty-for-sensei/),
haal de [SVN repository](https://plugins.svn.wordpress.org/degree-of-difficulty-for-sensei/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/degree-of-difficulty-for-sensei/)
via [RSS](https://plugins.trac.wordpress.org/log/degree-of-difficulty-for-sensei/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.1

 * 2017-10-09
 * Fix Add dds_ prefix to WP Term Images functions in case plugin already installed.
 * Fix Add DDS_ prefix to WP Term Images classes in case plugin already installed.
 * Dynamic slug Degree_of_Difficulty_for_Sensei()->slug in degree-of-difficulty-
   for-sensei-functions.php
 * Add 2 new icon sets in assets/images/

#### 1.0.0

 * 2017-09-25
 * Initial release

## Meta

 *  Versie **1.0.0**
 *  Laatst geüpdatet **9 jaar geleden**
 *  Actieve installaties **10+**
 *  WordPress versie ** 4.4 of nieuwer **
 *  Getest t/m **4.8.33**
 *  Talen
 * [English (US)](https://wordpress.org/plugins/degree-of-difficulty-for-sensei/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/degree-of-difficulty-for-sensei/)
   en [Spanish (Spain)](https://es.wordpress.org/plugins/degree-of-difficulty-for-sensei/).
 *  [Vertaal in je eigen taal](https://translate.wordpress.org/projects/wp-plugins/degree-of-difficulty-for-sensei)
 * Tags
 * [course](https://nl.wordpress.org/plugins/tags/course/)[difficulty](https://nl.wordpress.org/plugins/tags/difficulty/)
   [lms](https://nl.wordpress.org/plugins/tags/lms/)[sensei](https://nl.wordpress.org/plugins/tags/sensei/)
   [tags](https://nl.wordpress.org/plugins/tags/tags/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/degree-of-difficulty-for-sensei/advanced/)

## Waarderingen

Er zijn nog geen beoordelingen ingediend.

[Je beoordeling](https://wordpress.org/support/plugin/degree-of-difficulty-for-sensei/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/degree-of-difficulty-for-sensei/reviews/)

## Bijdragers

 *   [ Open-DSI ](https://profiles.wordpress.org/opendsi/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/degree-of-difficulty-for-sensei/)