New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master elearning gamification ranks badges dbe #30514

Closed
wants to merge 11 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@dbeguin
Copy link
Contributor

dbeguin commented Jan 24, 2019

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the seen 🙂 label Jan 24, 2019

@C3POdoo C3POdoo added the RD label Jan 24, 2019

@robodoo robodoo added the CI 🤖 label Jan 24, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch Jan 25, 2019

@robodoo robodoo removed the CI 🤖 label Jan 25, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch 2 times, most recently Jan 25, 2019

@robodoo robodoo added the CI 🤖 label Jan 25, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch Jan 28, 2019

@robodoo robodoo removed the CI 🤖 label Jan 28, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch 8 times, most recently Jan 29, 2019

@robodoo robodoo added the CI 🤖 label Feb 4, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch Feb 4, 2019

@robodoo robodoo removed the CI 🤖 label Feb 4, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch 3 times, most recently Feb 5, 2019

@tde-banana-odoo
Copy link
Contributor

tde-banana-odoo left a comment

Review of [IMP] gamification : add ranks based on karma. Some model thoughts, some guidelines remarks.

addons/gamification/controllers/main.py Outdated
return response

@http.route(['/gamification/badge/<model("gamification.badge"):badge>/icon'], type='http', auth="public", website=True, sitemap=False)
def get_badge_icon(self, badge, **post):

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Iwould remove all those routes and methods and simply use /web/image . Normally everything is already supported :) . A lot of templates use them :) .

addons/gamification/data/gamification_data.xml Outdated
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Guidelining: rename file to gamification_karma_rank_data .

addons/gamification/data/gamification_demo.xml Outdated
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Guidelining: rename to gamification_karma_rank_demo

addons/gamification/models/karma.py Outdated


class KarmaError(Forbidden):
""" Karma-related error, used for forum and posts. """
pass


class KarmaRank(models.Model):

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Guidelining: rename to gamification_karma_rank . py (+ gamification_karma_rank_views.xml for views)

addons/gamification/models/karma.py Outdated
_description = 'Rank based on karma'
_order = 'minimum_value'

name = fields.Text(string='Rank Name')

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Shouldn't it be required and translatable ?

addons/gamification/models/res_users.py Outdated

@api.multi
def add_karma(self, karma):
for user in self:
user.karma += karma
return True

def _recompute_rank(self):

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

I would remove users having 0 karma to be sure. Probably with a search to avoid a filtered / mapped.

addons/gamification/security/ir.model.access.csv Outdated
@@ -25,3 +25,9 @@ badge_user_employee,"Badge-user Employee",model_gamification_badge_user,base.gro
badge_user_manager,"Badge-user Manager",model_gamification_badge_user,base.group_erp_manager,1,1,1,1
badge_user_portal,"Badge-user Portal",gamification.model_gamification_badge_user,base.group_portal,1,1,1,0
badge_user_public,"Badge-user Public",gamification.model_gamification_badge_user,base.group_public,1,0,0,0

karma_rank_employee,"Karma Rank Employee",model_gamification_karma_rank,base.group_user,1,0,0,0

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Guidelines: gamification_karma_rank_access_user,gamification.karma.rank.access.user,model_gamification_karma_rank,base;group_user,1,0,0,0

Idea is: xml id is 'model'access'group' (user for base.group user is ok, otherwise employee if it conflicts with other groups), name is xml id with '.' instead of '_' . That way it is standard :) .

addons/gamification/views/karma_ranks_views.xml Outdated
</record>

<record id="gamification_karma_ranks_view_tree" model="ir.ui.view">
<field name="name">Ranks List</field>

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Guidelining: name of views (not actions) is just xml id with '. instead of '_'' so that it is standardized.

addons/gamification/views/karma_ranks_views.xml Outdated
</field>
</record>

<record id="gamification_karma_rank_view_form" model="ir.ui.view">

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

I would add a search view to be complete.

addons/website_slides/views/mail_templates.xml Outdated
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="mail_template_data_new_rank_reached" model="mail.template">

This comment has been minimized.

@tde-banana-odoo

tde-banana-odoo Feb 5, 2019

Contributor

Side note: commit mismatch for the template in slides (currently included in
[IMP] gamification : add ranks based on karma whether it should probably be moved to gamification, and then modules will override the famous button thingy).

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch Feb 5, 2019

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch 3 times, most recently Feb 5, 2019

dbeguin added some commits Feb 8, 2019

WIP Website_slides : add karma based action rules + view
DONE :
    - define karma gain rules
    - apply karma gain on rank slide_channel
    - apply karma gain on slide vote

TODO : Apply and use karma gain rules
    - finish a course

Task ID : 1922159
PR #30514

@dbeguin dbeguin force-pushed the odoo-dev:master-elearning-gamification-ranks-badges-dbe branch from 8bd2e5a to d45d436 Feb 11, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 11, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Feb 13, 2019

WIP Website_slides : add karma based action rules + view
DONE :
    - define karma gain rules
    - apply karma gain on rank slide_channel
    - apply karma gain on slide vote

TODO : Apply and use karma gain rules
    - finish a course

Task ID : 1922159
PR odoo#30514

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

WIP Website_slides : add karma based action rules + view
DONE :
    - define karma gain rules
    - apply karma gain on rank slide_channel
    - apply karma gain on slide vote

TODO : Apply and use karma gain rules
    - finish a course

Task ID : 1922159
PR odoo#30514

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR odoo#30770.

[1] forum and comments upgrade: task ID 1940516 - PR odoo#30514 and odoo#31097

robodoo pushed a commit that referenced this pull request Feb 14, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR #30770
[2] new user profile / gamification task: ID 1922159 and PR #30514 and #30988

robodoo pushed a commit that referenced this pull request Feb 14, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR #30770.

[1] forum and comments upgrade: task ID 1940516 - PR #30514 and #31097

robodoo added a commit that referenced this pull request Feb 14, 2019

[MERGE][IMP] website_slides: introduce a new home page for slides
This merge proposes a new homepage for slides module evolving towards
an eLearning platform. This merge closes task 1936153 and PR #30770.
More generally this merge is linked to currently under heavy work slides
module update to eLearning [1][2].

It includes

 * a new main page displaying top courses / channels. It displays 3 most
   popular and newest channels as well as its ongoing courses (if logged).
   Achievements and karma update done by eLearning community allow to
   give a gamification look and feel;
 * an 'All' page displaying all courses / channels. Tag groups and tags
   allow to search / filter displayed courses;
 * a new pimped and revamped display for main course / channel page;
 * new demo data for slides and small addition of demo data in bridge module
   with website_sale and website_forum;

Some features may not be completely working as other tasks will continue to
improve the display, notably new slide display [1], some forum / slide
link improvements [3] and certification integration [4]. Some code cleaning
will come in future update as this merge allows to unblock those other tasks.

For more details see sub commits. And thanks to the RD Fun SM Team. Much
fun, much SM.

[1] main eLearning task: task ID 1902304 - PR #29876
[2] new user profile /gamification: task ID 1922159 - PR #30514
[3] forum and comments upgrade: task ID 1940516 - PR #30514 and #31097
[4] certification inside eLearning: task ID 1940360 - PR #31060

awa-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

awa-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR odoo#30770.

[1] forum and comments upgrade: task ID 1940516 - PR odoo#30514 and odoo#31097

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR odoo#30770.

[1] forum and comments upgrade: task ID 1940516 - PR odoo#30514 and odoo#31097
@tde-banana-odoo

This comment has been minimized.

Copy link
Contributor

tde-banana-odoo commented Feb 15, 2019

Work continues on #31109 .

@robodoo robodoo added closed 💔 and removed CI 🤖 labels Feb 15, 2019

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR odoo#30770
[2] new user profile / gamification task: ID 1922159 and PR odoo#30514 and odoo#30988

tde-banana-odoo added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR odoo#30770.

[1] forum and comments upgrade: task ID 1940516 - PR odoo#30514 and odoo#31097

robodoo pushed a commit that referenced this pull request Feb 15, 2019

[IMP] gamification, website_slides: add challenges in slides and impr…
…ove ranks

Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR #30770
[2] new user profile / gamification task: ID 1922159 and PR #30514 and #30988

robodoo pushed a commit that referenced this pull request Feb 15, 2019

[IMP] website_slides_forum: add forum navigation tab in course displa…
…y and add demo data

Purpose of this commit is to add the forum tab in course main new page
when the course is linked to a forum. Some demo data are added.
Some more work to better include forums and courses are ongoing [1].

This commit is linked to task ID 1936153 and PR #30770.

[1] forum and comments upgrade: task ID 1940516 - PR #30514 and #31097

robodoo added a commit that referenced this pull request Feb 15, 2019

[MERGE][IMP] website_slides: introduce a new home page for slides
This merge proposes a new homepage for slides module evolving towards
an eLearning platform. This merge closes task 1936153 and PR #30770.
More generally this merge is linked to currently under heavy work slides
module update to eLearning [1][2].

It includes

 * a new main page displaying top courses / channels. It displays 3 most
   popular and newest channels as well as its ongoing courses (if logged).
   Achievements and karma update done by eLearning community allow to
   give a gamification look and feel;
 * an 'All' page displaying all courses / channels. Tag groups and tags
   allow to search / filter displayed courses;
 * a new pimped and revamped display for main course / channel page;
 * new demo data for slides and small addition of demo data in bridge module
   with website_sale and website_forum;

Some features may not be completely working as other tasks will continue to
improve the display, notably new slide display [1], some forum / slide
link improvements [3] and certification integration [4]. Some code cleaning
will come in future update as this merge allows to unblock those other tasks.

For more details see sub commits. And thanks to the RD Fun SM Team. Much
fun, much SM.

[1] main eLearning task: task ID 1902304 - PR #29876
[2] new user profile /gamification: task ID 1922159 - PR #30514
[3] forum and comments upgrade: task ID 1940516 - PR #30514 and #31097
[4] certification inside eLearning: task ID 1940360 - PR #31060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment