config.activity_edit.item_search.filter.restricted - Initialization - Author API

Author API Initialization

restricted

Configuration options for filters which are applied by default to the search criteria for the Item lookup results.

You would want to use this to restrict what Items authors can see.

Values

Attribute path config.activity_edit.item_search.filter.restricted

Type object

Properties

  • created_by array[string]

    Only display Items created by specified users (authors). This will be based on their user.id.

    You would want to use this so that authors can see their most relevant Items, for example.

    Default: []

    var initializationOptions = {
                    "config": {
                        "activity_edit": {
                            "item_search": {
                                "filter": {
                                    "restricted": {
                                        "created_by": [
                                            "my_user_id_1",
                                            "my_user_id_2",
                                            "my_user_id_3",
                                            "my_user_id_4",
                                            // ...
                                        ]
                                    }
                                }
                            }
                        }
                    }
                };
                
  • current_user boolean

    Only show Items created by the current user (author). This is based on their Learnosity user.id.

    You would want to use this to restrict the search results to the current author only.

    Default: false

    var initializationOptions = {
                    "config": {
                        "activity_edit": {
                            "item_search": {
                                "filter": {
                                    "restricted": {
                                        "current_user": true
                                    }
                                }
                            }
                        }
                    }
                };
                
  • tags object

    Configuration options for Tag filters which are applied by default to the search criteria for the Item lookup results.

    • all array[TagsV2]

      Search for Items that contain all of the specified Tags.

      You would want to use this to perform a search including a combination of Tags.

      See Understanding Tag Formats for Content Creation and Filtering for more information on the TagsV2 format.

      var initializationOptions = {
                                              "config": {
                                                  "activity_edit": {
                                                      "item_search": {
                                                          "filter": {
                                                              "restricted": {
                                                                  "tags": {
                                                                      "all": [
                                                                          { "type": "TYPE1", "name": "NAME1" },
                                                                          { "type": "TYPE1", "name": "NAME2" },
                                                                          { "type": "TYPE2", "name": "NAME3" },
                                                                          { "type": "TYPE2", "name": "NAME4" }
                                                                      ]
                                                                  }
                                                              }
                                                          }
                                                      }
                                                  }
                                              }
                                          };
                                          
    • either array[TagsV2]

      Search for Items that contain at least one of the specified Tags.

      You would want to use this to perform a search including any Items containing a range of Tags.

      See Understanding Tag Formats for Content Creation and Filtering for more information on the TagsV2 format.

      var initializationOptions = {
                                              "config": {
                                                  "activity_edit": {
                                                      "item_search": {
                                                          "filter": {
                                                              "restricted": {
                                                                  "tags": {
                                                                      "either": [
                                                                          { "type": "TYPE1", "name": "NAME1" },
                                                                          { "type": "TYPE1", "name": "NAME2" },
                                                                          { "type": "TYPE2", "name": "NAME3" }
                                                                      ]
                                                                  }
                                                              }
                                                          }
                                                      }
                                                  }
                                              }
                                          };
                                          
    • none array[TagsV2]

      Search for Items that do not contain any of the specified Tags.

      You would want to use this to perform a search excluding any Items containing one of a range of Tags.

      See Understanding Tag Formats for Content Creation and Filtering for more information on the TagsV2 format.

      Important This initialization option requires either tags.all or tags.either to also be set. The tags.none initialization option cannot be set on its own.

      var initializationOptions = {
                                              "config": {
                                                  "activity_edit": {
                                                      "item_search": {
                                                          "filter": {
                                                              "restricted": {
                                                                  "tags": {
                                                                      "all": [
                                                                          { "type": "TYPE1", "name": "NAME1" }
                                                                      ],
                                                                      "none": [
                                                                          { "type": "TYPE2", "name": "NAME3" },
                                                                          { "type": "TYPE2", "name": "NAME4" }
                                                                      ]
                                                                  }
                                                              }
                                                          }
                                                      }
                                                  }
                                              }
                                          };
                                          

Type definitions

  • tagsV2 object

    Tags are used to improve searching for content while authoring and for reporting and analytics purposes.

    See Understanding Tag Formats for Content Creation and Filtering for more information.

    • name string

      The Tag name.

      Maximum length is 255 characters.

    • type string

      The Tag type.

      Maximum length is 255 characters.

Related articles

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.