Since updating to beta2, the "Take Course" button does not update once the user is enrolled in the course.

The user does get enrolled properly, however the UI isn't updated.

Any help will be greatly appreciated.

Comments

ydahi’s picture

Category: bug » support

It seems that "Take Course" changes to "Review Course" after the course is completed by the user.

Is there a way to have "Take Course" read "Review Course" after user enrols? "Take Course" might be confusing if the user is already enrolled.

ydahi’s picture

Title: "Take Course" doesn't update to "Review Course" » UI Update: "Take Course" should change to "Review Course" after user enrolled
Category: support » feature

Changing title as initial title was false.

djdevin’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev

What if the user is enrolled but not finished?

Maybe we should have 3 states (and think of labels for them) - not started, in progress, completed

take
continue/resume
review

?

ydahi’s picture

That works for me. How does this sound:

- Take Course
- Course Outline (or Table of Contents) - since that is essentially what's on that page
- Review Course

Would be nice if the "Review Course" can consist of widgets like:

- Similar Courses
- More courses from this instructor
- Give feedback for course
- Recommend course
- Statistics for enrolled user (time to completion, quiz results, comments, etc.)

Some of these can be pulled off by views and flags modules (going to experiment right now)

wlftn’s picture

I am looking for this feature too: for the "take course" to change to "course outline" or "resume course" once the user is enrolled.

Or a way for the 'Take Course' tab to disappear after the user enrolled.

Or add a class to the 'Take Course' tab once the user is enrolled, like 'class='enrolled''

I found this in 633 of course.module:

function course_takecourse_title($node) {
     global $user;
     $report = course_report_load($node, $user);
     return ($user->uid > 1 && isset($report->complete) && $report->complete) ? t('Review Course') : t('Take Course');
}

I was thinking I could change '$report->complete' to '$report->incomplete' (or 'started') in this code to make it so the 'Take Course' button changes to 'Review Course' once the user was enrolled and taking the course, but there were errors. I am just a newbie at PHP, so I guess I am trying to see if this is the right place to be working on this problem.

Thanks!

wlftn’s picture

OK -- I've got a short term fix! This will make it so that the tab changes to 'Review Course' when the user is enrolled.

@ line 633 of course.module:

function course_takecourse_title($node) {
     global $user;
     $report = course_report_load($node, $user);
     return ($user->uid > 1 && isset($report->complete) && ($report->complete == 0)) ? t('Review Course') : t('Take Course');
}

I'm using 7.x-1.0-rc1

ydahi’s picture

Cool, thanks for sharing wlftn. Are you using the dev branch or the rc branch?

djdevin’s picture

Shouldn't matter, that bit of code hasn't changed.

This all looks good I'm just pondering over what is a good default for all users.

ydahi’s picture

still think the suggest from #3 works fine for most scenarios:

1. Take Course
2. Resume Course / Course Overview / Course Progress
3. Review Course

wlftn’s picture

I'm using 7.x-1.0-rc4

zhiqiang.qiu’s picture

Issue summary: View changes

Hi djdevin

Thanks your great module. I also looking for the feature.

1. Take Course
2. Resume Course / Course Overview / Course Progress
3. Review Course

maybe you can reference teamtreehouse.com's logic

deggertsen’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB

Perhaps not the most elegant solution, but here's a working patch. If anyone has ideas on how or if this can be improved let me know, otherwise I think this is a decent solution.

ydahi’s picture

Version: 7.x-1.x-dev » 3.x-dev
Status: Needs review » Needs work

Can we please have another look at this feature req.

djdevin’s picture

Status: Needs work » Needs review
StatusFileSize
new976 bytes

Here it is for 3.x

  • djdevin authored 9a48430 on 3.x
    Issue #2001772 by djdevin, deggertsen: UI Update: "Take Course" should...
djdevin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.