opencredit / badgeos

BadgeOS is a plugin to WordPress that allows you to easily create badges and set up the steps and achievements users take to earn them. Badges are Mozilla OBI compatible and sharable via Credly.
http://www.badgeos.org
GNU Affero General Public License v3.0
92 stars 64 forks source link

Credly Integration: Add an optional "Criteria" field to BadgeOS achievement CPTs #332

Open tw2113 opened 10 years ago

tw2113 commented 10 years ago

Add a new optional "Criteria" field in the "Achievement Data" area when adding/editing an achievement. The text area field should have a rich media editor.

Helper text should read: "A description of what someone must do to earn this achievement."

Add a checkbox option below it:

Display "Criteria" on the single achievement page? Yes / No

When the field has data in it, on a singe achievement page, below the body description text of the achievement, show:

Criteria:
{text here}

This will help address the inquiries from people about what field to map to Credly's criteria field.

Sym-O commented 9 years ago

Hi Mickael ! First of all, thanks for your work on that plugin. We're working on building a platform for my company to use BadgeOS and Credly as an engagement tool for innovation and training. This enhancement you describe is really one of the things we need to have an efficient badgeos plateform and understable badges on Credly. We'll probably need this before february. Do you need help on developing this enhancement ? If yes, do you have specific expectation on the how to do that ?

Sofiann.

Sym-O commented 9 years ago

@tw2113 we plan on working on this issue soon, at least for us, but it would be cool if it's useful to the badgeos community. So do you have any advices or expectation about developing this enhancement ?

tw2113 commented 9 years ago

If you're planning to go the route of adding the new parameter to the existing shortcode, I'd suggest looking over what we have already and do your best to match up. Then for the output of the shortcode, wrap the current display construction with an if statement that checks for if the "layout" parameter is set to "grid" and if it is, construct the html the way intended. Otherwise, leave as is currently in the else side of the if statement.

Feel free to link to code as you're working on it, and I can look things over to help get it figured out or provide feedback.

Sym-O commented 9 years ago

Mmmh... I may make a mistake but it seems to me you're answering to another issue here: the grid view one, not the criteria field enhancement. Am I right?

tw2113 commented 9 years ago

probably. Sorry about that.

Forgot you were responding regarding a couple features.

tw2113 commented 9 years ago

That said, I'd have to look into this one myself, as I'm not super familiar with the Credly integration.

Sym-O commented 9 years ago

Hi ! You may have received a mail notification about a previous comment on this feed, but I removed it since it was obsolet. I wanted to ask when you wanted to work on that subject because we'll need this feature in the weeks to come and I needed to organize our project. But while writing the comment, I'll look at how it work and from one idea to another, I think I finally come up with something like a clean solution that could be integrate as is (if it's feels right for you).

tw2113 commented 9 years ago

I haven't seen any movement at all on this topic and don't foresee anything happening in the immediate future. So it may be best to explore the alternative solution(s) at the moment.

Sym-O commented 9 years ago

OK I'll do that, but when you'll have time, I don't know if you have seen this since I messed up with the commentaries in the issue, but I have a solution which seems clean to solve this issue. Just a problem probably linked to a bug in CMB (?) about display a CMB of type wysiwyg : after saving the achievement, the content in the CMB of type wysiwyg is no longer in rich text but we see the html tags, and if save again, there is another step in escaping html characters. Maybe this would be solved with your proposal in #423 ... A tempary solution would be to just use textarea instead of wysiwyg...

tw2113 commented 9 years ago

Could you start a new issue for the recursive html escaping? I have code that could probably help fix that, even if temporarily as well, until it could be pushed out in BadgeOS core.

Sym-O commented 9 years ago

With your piece of code in #429, I have now a clean solution for adding a criteria field. It's all in one commit and ready to be PR if you will : https://github.com/Sym-O/badgeos/commit/4a2ec98ccab8718d2169af5647f360f65abd0973

For information, for the needs our own platform, I'm going to add, using the same approach, an evidence link field. In case of a private platform, such ours, the permalink can't be used as evidence. So I'll add a specific field to be able to choose a customizable public link. in our case, I think the credly page of the badge once it's created, because it shows to whom our company gave this badge. If this is something interesting for the core application, just tell me.

Sym-O commented 9 years ago

To complete my previous remark, here is the commit about adding a new option to the credly settings for evidence. Now we have the choice between permalink or the link to the badge on credly. This page shows that the issuer, identified by his account on credly, has given the badge to the earner. It's sufficient for an evidence especialy if the issuer has a trusted label on credly. https://github.com/Sym-O/badgeos/commit/bcbefbd6bccebcd10611136a729c438824ecaba4 note: line 1037 in this commit was a forgot thing in the previous one.