Title: Visibility Control for WPCourseware
Author: Pankaj Agrawal
Published: <strong>26 oktober 2023</strong>
Last modified: 11 september 2025

---

Sök tillägg

![](https://ps.w.org/visibility-control-for-wpcourseware/assets/banner-772x250.png?
rev=2984507)

Det här tillägget **har inte testats med någon av de 3 senaste huvudversionerna 
av WordPress**. Det kanske inte längre underhålls och kan ha kompatibilitetsproblem
när det används tillsammans med nyare versioner av WordPress.

![](https://ps.w.org/visibility-control-for-wpcourseware/assets/icon-256x256.png?
rev=2984507)

# Visibility Control for WPCourseware

 Av [Pankaj Agrawal](https://profiles.wordpress.org/liveaspankaj/)

[Ladda ner](https://downloads.wordpress.org/plugin/visibility-control-for-wpcourseware.zip)

 * [Detaljer](https://sv.wordpress.org/plugins/visibility-control-for-wpcourseware/#description)
 * [Recensioner](https://sv.wordpress.org/plugins/visibility-control-for-wpcourseware/#reviews)
 *  [Installation](https://sv.wordpress.org/plugins/visibility-control-for-wpcourseware/#installation)
 * [Utveckling](https://sv.wordpress.org/plugins/visibility-control-for-wpcourseware/#developers)

 [Support](https://wordpress.org/support/plugin/visibility-control-for-wpcourseware/)

## Beskrivning

Visibility Control for WP Courseware helps you hide messages and content for specific
criterion anywhere on your WordPress page.

You can show/hide HTML elements, menus, and other details based on:
 1. User’s access
to a particular **WP Courseware Course**, 2. User’s course completion status of 
a particular **WP Courseware Course**, Or 3. User is **Logged In** or **Logged Out**.
4. User’s role.

You simply need to add a CSS class to your element div or span. As explained here:

**Example:**

Login/Logout Status:

 * To show the element/menu item to a logged-in user, add this CSS class: **visible_to_logged_in**
   OR **hidden_to_logged_out**
 * To hide the element/menu item from a logged-in user, add this CSS class: **visible_to_logged_out**
   OR **hidden_to_logged_in**

For user’s role:
 * To show the element/menu item to a user will role administrator,
add this CSS class: **visible_to_role_administrator** OR **hidden_to_role_administrator***
Note: To show an element to multiple specific roles only, you need add the element
multiple times, one for each role. To hide an element/menu from specific multiple
roles only you can add the element once add multiple classes to the same element.

If Course ID is 123

 * To show the element/menu item to user with access to above Course, add this CSS
   class: **visible_to_course_123**
 * To hide the element/menu item from user with access to above Course, add this
   CSS class: **hidden_to_course_123**
 * To show the element/menu item to a logged-in user, add this CSS class: **visible_to_logged_in**
   OR **hidden_to_logged_out**
 * To hide the element/menu item from a logged-in user, add this CSS class: **visible_to_logged_out**
   OR **hidden_to_logged_in**

For a course completion status, if Course ID is 123:

 * To show the element/menu item to user who completed above course, add this CSS
   class: **visible_to_course_complete_123**
 * To hide the element/menu item from user who completed above course, add this 
   CSS class: **hidden_to_course_complete_123**
 * To show the element/menu item to user who has not completed above course, add
   this CSS class: **visible_to_course_incomplete_123**
 * To hide the element/menu item from user who has not completed above course, add
   this CSS class: **hidden_to_course_incomplete_123**

**Mechanism of Functioning**

 * **Multiple CSS Classes:** If multiple visibility control classes are added, ALL
   of them must meet the criterion to keep the element visible. If any one of them
   hides the element, it will be hidden. For example: visible_to_course_123 visible_to_course_124
   will show the element only to those who have access to both courses.
 * Hidden data/elements reaches the browser. Though user’s do not see it.
 * CSS is added to the page for all CSS elements that needs to be hidden based on
   above rules.
 * After page is loaded. These elements are removed from page using jQuery (if available),
   so it won’t be available on Inspect.
 * Elements rendered after the page load are hidden but not removed from DOM/page.

**Future Development**

Depending on the interest in this feature, we will decide on adding a shortcode 
and/or a Gutenberg Block to achieve this feature.

**Other Visibility Control Plugins:**
 – [Visibility Control for LearnDash LMS](https://www.nextsoftwaresolutions.com/learndash-visibility-control/)–
[Visibility Control for LearnPress LMS](https://www.nextsoftwaresolutions.com/visibility-control-for-learnpress/)–
[Visibility Control for LifterLMS](https://www.nextsoftwaresolutions.com/visibility-controlfor-lifterlms/)–
[Visibility Control for TutorLMS](https://www.nextsoftwaresolutions.com/visibility-control-for-tutorlms/)–
[Visibility Control for MasterStudyLMS](https://www.nextsoftwaresolutions.com/visibility-control-for-masterstudy/)–
[Visibility Control for Sensei LMS](https://www.nextsoftwaresolutions.com/visibility-control-for-sensei/)–
[Visibility Control for WooCommerce](https://www.nextsoftwaresolutions.com/woocommerce-visibility-control/)

**Related Plugins for WPCourseware LMS:**
 – [Experience API for WPCourseware LMS](https://www.nextsoftwaresolutions.com/experience-api-for-wp-courseware/)

## Skärmdumpar

[⌊Show/hide message using CSS in HTML anywhere.⌉⌊Show/hide message using CSS in 
HTML anywhere.⌉[

Show/hide message using CSS in HTML anywhere.

[⌊Show menu only to Loggout user⌉⌊Show menu only to Loggout user⌉[

Show menu only to Loggout user

[⌊Show menu only to Logged In user (or Course/Group access)⌉⌊Show menu only to Logged
In user (or Course/Group access)⌉[

Show menu only to Logged In user (or Course/Group access)

[⌊Show a message if user has access to course (using HTML anywhere)⌉⌊Show a message
if user has access to course (using HTML anywhere)⌉[

Show a message if user has access to course (using HTML anywhere)

[⌊Show a message if user doesn't have access to course (using Additional CSS class)⌉⌊
Show a message if user doesn't have access to course (using Additional CSS class
)⌉[

Show a message if user doesn’t have access to course (using Additional CSS class)

## Installation

This section describes how to install the plugin and get it working.

e.g.

 1. Upload the plugin files to the `/wp-content/plugins/visibility-control-for-wpcourseware`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ’Plugins’ screen in WordPress
 3. Add the CSS classes to your HTML elements or Menu Items as described in the Details
    section.

## Vanliga frågor

### What is WPCourseware LMS?

WPCourseware LMS is a popular WordPress based Learning Management System (LMS) plugin.
It includes many advanced features including, quizzing engine, course management,
reports, certificates and payment methods.

You can also add [GrassBlade xAPI Companion plugin](https://www.nextsoftwaresolutions.com/grassblade-xapi-companion/)
and [GrassBlade LRS](https://www.nextsoftwaresolutions.com/grassblade-lrs-experience-api/)
to start using Experience API (xAPI) based contents with WPCourseware LMS.

### What is GrassBlade xAPI Companion plugin?

[GrassBlade xAPI Companion](https://www.nextsoftwaresolutions.com/grassblade-xapi-companion/)
is a paid WordPress plugin that enables support for Experience API (xAPI) based 
content on WordPress.

It also provides best in industry Advanced Video Tracking feature, that works with
YouTube, Vimeo and self-hosted MP4 videos. Tracking of MP3 audios is also supported.

It can be used independently without any LMS. However, to add advanced features,
it also has integrations with several LMSes.

### What is GrassBlade Cloud LRS?

[GrassBlade Cloud LRS](https://www.nextsoftwaresolutions.com/grassblade-lrs-experience-api/)
is a cloud-based Learning Record Store (LRS). An LRS is a required component in 
any xAPI-based ecosystem. It works as a data store of all eLearning data, as well
as a reporting and analysis platform. There is an installable version which can 
be installed on any PHP/MySQL based server.

## Recensioner

Detta tillägg har inga recensioner.

## Bidragsgivare och utvecklare

”Visibility Control for WPCourseware” är programvara med öppen källkod. Följande
personer har bidragit till detta tillägg.

Bidragande personer

 *   [ Pankaj Agrawal ](https://profiles.wordpress.org/liveaspankaj/)

[Översätt ”Visibility Control for WPCourseware” till ditt språk.](https://translate.wordpress.org/projects/wp-plugins/visibility-control-for-wpcourseware)

### Intresserad av programutveckling?

[Läs programkoden](https://plugins.trac.wordpress.org/browser/visibility-control-for-wpcourseware/),
kika på [SVN-filförvaret](https://plugins.svn.wordpress.org/visibility-control-for-wpcourseware/)
eller prenumerera på [utvecklarloggen](https://plugins.trac.wordpress.org/log/visibility-control-for-wpcourseware/)
via [RSS](https://plugins.trac.wordpress.org/log/visibility-control-for-wpcourseware/?limit=100&mode=stop_on_copy&format=rss).

## Ändringslogg

#### 1.0

Initial Commit

## Meta

 *  Version **1.0**
 *  Senast uppdaterat **1 år sedan**
 *  Aktiva installationer **Färre än 10**
 *  WordPress-version ** 4.0 eller senare **
 *  Testat upp till **6.8.12**
 *  PHP-version ** 5.6 eller senare **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/visibility-control-for-wpcourseware/)
 * Etiketter
 * [elearning](https://sv.wordpress.org/plugins/tags/elearning/)[hide](https://sv.wordpress.org/plugins/tags/hide/)
   [hide content](https://sv.wordpress.org/plugins/tags/hide-content/)[lms](https://sv.wordpress.org/plugins/tags/lms/)
   [wp courseware](https://sv.wordpress.org/plugins/tags/wp-courseware/)
 *  [Avancerad vy](https://sv.wordpress.org/plugins/visibility-control-for-wpcourseware/advanced/)

## Betyg

Än så länge har inga recensioner skickats in.

[Your review](https://wordpress.org/support/plugin/visibility-control-for-wpcourseware/reviews/#new-post)

[Visa alla recensioner](https://wordpress.org/support/plugin/visibility-control-for-wpcourseware/reviews/)

## Bidragande personer

 *   [ Pankaj Agrawal ](https://profiles.wordpress.org/liveaspankaj/)

## Support

Har du något att säga? Behöver du hjälp?

 [Visa supportforum](https://wordpress.org/support/plugin/visibility-control-for-wpcourseware/)