Microcredentials Documentation

Constructor

constructor()

Initializes a new instance of the MicrocredentialsFilter class.

Properties

jsonData

The raw JSON data.

Type: Array

filteredData

The filtered data.

Type: Array

activeFilters

The active filters.

Type: Object

Properties:

  • searchTerm: string
  • instructionMethod: string
  • interest: string
  • creditType: string

Methods

fetchData(sheetUrl)

Fetches data from a specified sheet URL and initializes the filters and event listeners.

Parameters: sheetUrl (string) - The URL of the sheet containing the data.

processData(data)

Processes the given data and returns an array of objects.

Parameters: data (Object) - The data to be processed.

Returns: Array - An array of objects representing the processed data.

displayFeaturedMicrocredentials()

Displays featured microcredentials.

displayFilteredMicrocredentials()

Displays filtered microcredentials.

initializeEventListeners()

Initializes event listeners for the searchbox, instruction method, interest, and credit type dropdowns.

clearInput()

Clears the input value of the searchbox.

applyFilters()

Applies all active filters and updates the display.

filterBySearchTerm(item)

Filters by search term.

Parameters: item (Object) - The item to filter.

Returns: boolean - True if the item matches the filter, false otherwise.

filterByInstructionMethod(item)

Filters by instruction method.

Parameters: item (Object) - The item to filter.

Returns: boolean - True if the item matches the filter, false otherwise.

filterByInterest(item)

Filters by interest.

Parameters: item (Object) - The item to filter.

Returns: boolean - True if the item matches the filter, false otherwise.

filterByCreditType(item)

Filters by credit type.

Parameters: item (Object) - The item to filter.

Returns: boolean - True if the item matches the filter, false otherwise.

static sortAtoZ(a, b)

Sorts an array of objects in ascending order based on the "MicrocredentialsName" property.

Parameters: a (Object) - The first object to compare. b (Object) - The second object to compare.

Returns: number - Returns a negative value if a should be sorted before b, a positive value if a should be sorted after b, or 0 if they are equal.

static createHtmlTemplate(item)

Creates an HTML template for a microcredential item.

Parameters: item (Object) - The microcredential item.

  • URL (string) - The URL of the microcredential.
  • ImageURL (string) - The URL of the microcredential image.
  • Level (string) - The level of the microcredential.
  • Industry (string) - The industry of the microcredential.
  • CreditNoncredit (string) - The credit/non-credit status of the microcredential.
  • InstructionMethod (string) - The instruction method of the microcredential.
  • MicrocredentialsName (string) - The name of the microcredential.
  • Text (string) - The description of the microcredential.

Returns: string - The HTML template for the microcredential item.

Video Tutorials

How to Create a Microcredential

How to Update a Microcredential

How to Delete a Microcredential

Steps to Manage Microcredentials

Create a Microcredential

Follow these steps to create a new microcredential:

  1. Navigate to the microcredentials google sheet.
  2. Fill in the required fields such as featured, name, description, and other relevant information.
  3. Head to the microcredential finder page to see the changes
  4. If the changes are not showing
    1. Refresh the page and check again.
    2. Scroll down and click the "Updated {Todays Date}" button.
    3. Click the "Source" Tab.
    4. Scroll down to line 652 and look for the "const range".
    5. Change value of the range to match the number of new microcredentials you added.
      1. For example if the current range is "DB!A1:J103", and you just added 1 microcredential.
      2. You would need to change the range to "DB!A1:J104".

Update a Microcredential

Follow these steps to update an existing microcredential:

  1. Navigate to the microcredentials google sheet.
  2. Select the microcredential you want to update.
  3. Make the necessary changes in the microcredential.
  4. Head back to the microcredential finder page to see the changes(remember to refresh the page incase the changes are not showing).

Delete a Microcredential

Follow these steps to delete a microcredential:

  1. Navigate to the microcredentials google sheet.
  2. Select the row of the microcredential you want to delete.
  3. Left click and select the "Delete Row" button.
  4. Head back to the microcredential finder page to see the changes(remember to refresh the page incase the changes are not showing).