Course on Sell by Default

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago - 15 years 7 months ago #1 by shekar
Course on Sell by Default was created by shekar
How can I make all the courses on Sell by default.

I made a change in function is_course_on_sell_on_vm to return always 1 :lol: , its working perfectly, is there any good way to do this? :(




Thanks
Shekar
Last edit: 15 years 7 months ago by shekar.

Please Log in or Create an account to join the conversation.

  • Antonio Durán
  • Away
  • Moderator
  • Moderator
More
15 years 7 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Course on Sell by Default
Problem is you actually need to "transfer" the courses to VM, so that products are created.

I guess you want to get courses set to be sold on VM as they are created in Moodle, with no further intervention, am i right?

Please Log in or Create an account to join the conversation.

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago #3 by shekar
Replied by shekar on topic Re: Course on Sell by Default
You are correct, I want exactly as you guess.

And the above change works only when JOOMDLE shop set to VM, but the problem is I am unable to unpublish selected course from the list.

Please Log in or Create an account to join the conversation.

  • Antonio Durán
  • Away
  • Moderator
  • Moderator
More
15 years 7 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Re: Course on Sell by Default
But what you have now won't work.

If you create a new course in Moodle, it will return yes on is_course_on_sell (with your dummy function), but there will be no product in VM matching the course, and thus purchase won't work.

Or I am missing something?

Please Log in or Create an account to join the conversation.

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago #5 by shekar
Replied by shekar on topic Re: Course on Sell by Default
:ohmy: yes it's jsut showing as published but not available in VM. Please suggest me.

Please Log in or Create an account to join the conversation.

  • Antonio Durán
  • Away
  • Moderator
  • Moderator
More
15 years 7 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Re: Course on Sell by Default
Ok.

If you want to get it to auto-sell on VM, here is what I suggest (doign it this way means we can add your patch for next release):

- In moodle/auth/joomdle/auth.php, you will see event handlers for many events, for example, course creation.
This one handles adding Jomsocial activities and groups.

What you can do is add a new config optin in Moodle side, 'auto-sell' courses.

Then, if enabled, add code in course_created handler function to call a new web service you would need to create in Joomla side, that would just call the sell_courses function.

Sounds a bit tricky, but it is just adding a couple of functions in the right place.

Let me know if you have any doubts trying.

Please Log in or Create an account to join the conversation.

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago #7 by shekar
Replied by shekar on topic Re: Course on Sell by Default
:cheer:
Yessssssssssss I got it thank you so much... I have tested, its publishing the course in VM.


Please Log in or Create an account to join the conversation.

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago #8 by shekar
Replied by shekar on topic Re: Course on Sell by Default
Hi Antonio,

Is there any possibility to make categories in VM as in Moodle?

Please Log in or Create an account to join the conversation.

  • Antonio Durán
  • Away
  • Moderator
  • Moderator
More
15 years 7 months ago #9 by Antonio Durán
Replied by Antonio Durán on topic Re: Course on Sell by Default
Do you mean a category mapping?

Now that you have coded the auto-sell feature, this one would be much needed.

Sure, it can be done, but this one would require quite more work.

Let me know if you want to try, I can give you some advice on what to do.

Please Log in or Create an account to join the conversation.

  • shekar
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 7 months ago #10 by shekar
Replied by shekar on topic Re: Course on Sell by Default
Ohhh that's great...

Let's try on this, please advice me.


Thanks
Shekar

Please Log in or Create an account to join the conversation.