Constructing a Link to Download a Certificate using IntelliBoard Pro
IntelliBoard provides a powerful and flexible formula building utility that can be used to calculate values, evaluate conditional rules, or construct HTML links based on data drawn from connected data sources.
In this example, we'll see how to construct a link to allow a user to view or download a certificate from Moodle.
Construct Basic Report
The first step is to construct a basic report that will hold the link. In this case, we have included:
· Participant Name
· Certificate Code
· Certificate Issue Date
· Certificate Expiration Date
· Certificate Name
Construct Link Formula
In the final column, we construct a formula.
Moodle stores the URL of each certificate using a pattern constructed from the Certificate Issue Date and the Certificate Code
· HTML tags to construct an active link
· Path to Moodle site
· Path to area of site where certificates are generated/stored as PDF
In our example, this URL is constructed using the following elements:
· https://mwplarge.intelliboard.net (change this to your own Moodle base URL)
As usual, the link is constructed as a pattern:
·<a href = url_to_location> link_text </a>
Formula builder allows us to simply concatenate the components of this url using quoted strings and plus signs:
"<a href = https://mwplarge.intelliboard.net/pluginfile.php/1/tool_certificate/issues/" + [MWP Certificate Issues Time Created] + "/" + [MWP Certificate Issues Col Code 279 Title] + ".pdf> View </a>"
Here, "View" is being used as the link text. Any string can be used here, including one assembled from the certificate name, participant name, etc.
Save the formula as data type "string".
Format Link Column
The resulting formula will strip out HTML and display only the link text as plain text. One final step is needed to convert this to a live link. Go to the Format tab in the report and click the edit icon next to the formula, in this case "View Certificate":
Scroll down to the "Types" control and instead of "String" choose "Html":
The formula column will now display the link value as a live link to the certificate document.