Coursepress and Marketpress

Hi Guys. I have added a few paid courses for my client.
All working ok except on the logged in student's course page for a paid course there's a comment added:
"One Response
Anonymous 26th October 2016
Completed: The payment has been completed, and the funds have been added successfully to your account balance."

This would be ok if it didnt say 'Anonymous'
Or if it didn't say ' the funds have been added successfully to your account balance' because the student pays, not receives the funds.

So that is odd - can someone tell me how to edit that response or remove it completely

Thank you
ian

  • Rupok

    Hi Ian,

    Thanks for asking. I just searched in our plugin code for that line, but that line is not in our plugin code. And from the format of those lines, it seems like someone has made a comment with that text there, I'm not sure though. CoursePress have discussion options, but I don't think you can add anonymous question there. So this should be a comment. Can you please go to "Dashboard > Comments" section of your site and check if there is any comment with that line?

    However, I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this? And also please provide the page link where we can see that text.

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    If it's a comment, then you should be able to edit that from your dashboard, but I can tell you better after seeing this live. I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • ian20

    Hi Rupok

    I have enabled support access

    there has been one test order 6bb5d3c7c06a
    If you look at order details you can see the IPN History says
    "26th October 2016: Completed: The payment has been completed, and the funds have been added successfully to your account balance."

    This has been added as a comment to the customer's course page and appears in the "Dashboard > Comments" section too

    This should not be happening - it is fine in the IPN history but should not be added to comments

    coursepress or marketpress is going wrong somewhere

    thanks for your help

    regards
    ian

  • Kasia Swiderska

    Hello ian,

    This should not be happening - it is fine in the IPN history but should not be added to comments

    This is common practice to add order status changes as comments - WooCommerce do that as well.

    I tried to replicate on my site that comments showing on course page for user but I could not. Those comments were only available for admin user in dashboard.
    My suspicion is that this is your theme that is displaying them.
    I think I could hide them on those certain pages if I could get access to that user account and see how it looks from its perspective. I checked your site as admin and could not find those comments on front end.
    Is it possible for you to install that plugin https://wordpress.org/plugins/user-switching/ so I could switch to user and check how it all looks there and provide solution?

    kind regards,
    Kasia

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    Thank you for the detailed explanation, I was able to notice this in your theme, but I wasn't able to replicate this issue. This seems to be theme specific, I tried to apply custom CSS to hide the comments, but it seems like it would remove the comments for all your pages, and not specific to course page. It's easier to include a custom template to solve this, for that could you please send us your credentials, so that we could give a closer look at your themes file structure.

    You can send credentials by using our secure contact form: http://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic.

    - To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    Thank you for sharing the credentials, I have added archive-unit.php, and archive-notifications.php template in your child theme, and have removed the comments section from these templates. The templates will override the default templates of your theme, and this would be how the default courses will work.

    Please check, and confirm whether it works fine, and let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • ian20

    Hi Nithin

    thank you
    I have logged in the front end as c****19

    I still see the comment on the units pages

    for example

    /courses/mount-everest-intermediate-comprehension/units/untitled-2/

    and this page
    /courses/mount-everest-intermediate-comprehension/units/mount-everest-answers/

    /courses/bruce-lee-easy-comprehension/units/bruce-lee-video-comprehension/

    it just seems to be the units pages

    regards
    ian

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    I still see the comment on the units pages

    Thank you for pointing this out, I have added a new template named single-unit.php in your child theme, and this should help in removing the comments from the unit pages. Please check, and see if everything works fine, and please advise if I had missed out anything.

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    I tried to access your website, but I'm getting the following error in your website, are you working on your website?

    Could you also specific the pages where you are seeing this issue now, so that I could give a closer, and see what's going on. Please do let us know when the site is up, so that we could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    Thank you for enabling support access, and mentioning the pages where you are seeing the issue, it seems like the comments started to popup for these pages only. The pages what we had fixed before seems to be working.

    I tried to access your server through FTP, but it seems like you have changed the password, could you please send us your new FTP credentials, so that I could give a closer look, and correct these for you. You can send the details as you have done previously: https://premium.wpmudev.org/forums/topic/coursepress-and-marketpress#post-1167708

    then I get a HTTP 500 error when trying to launch a course

    How do I replicate this issue? Is it when you create a new course that you get a 500 error? Or when you try to load the course, for eg: /courses/lea-fa-easy-comprehension/. Please advise what I'm missing, so that I could give a closer look.

    Please do let us know once you have sent the credentials, have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Kasia Swiderska

    Hello ian,

    I see the message at the bottom of

    /student-login/
    /courses/
    /courses-signup/

    and when logged in
    /courses-dashboard/

    Can you switch those pages from virtual to normal WordPress pages? So as normal WordPress pages they will use right template without comments as other pages on your site.
    You can do that in CoursePress Pro -> Settings -> General Settings. You will see that there are pages that have select with "Use virtual page" - there you can change to normal pages.

    the 500 error
    log in as ch****9
    my courses
    launch a course
    click 'Start Learning' - this is a 500 error

    I setup debuggin on your site, however debug log was not created instantly. Probably we need to wait some more time to get it. In the mean time can you try increasing memory limits as shown here https://premium.wpmudev.org/blog/increase-memory-limit/
    Your current limits can be found in WPMU DEV -> Support -> System Info.

    Hopefully this will help with those errors.

    kind regards,
    Kasia

  • ian20

    Hi, thank you

    ok i have created the pages and changed from virtual

    there are 20 courses
    the /courses/ page which should list all available courses just lists 10 on the first page
    click to page 2 and it lists the same 10
    the comment still appears at the bottom of this page

    the courses dashboard now shows all 20 courses (courses you manage)?, followed by the ones that the student has enrolled on or completed
    courses you manage should not be on there

    if i click on a course
    then 'start learning'
    i get a page not found /units/

    memory limit is already 256M
    does that need to be increased?

    regards
    ian

  • Kasia Swiderska

    Hello ian,

    there are 20 courses
    the /courses/ page which should list all available courses just lists 10 on the first page
    click to page 2 and it lists the same 10
    the comment still appears at the bottom of this page

    Comment is now hidden with CSS in your style.css of child theme
    .course_archive-template-default #comments {display: none;}

    But second issue is bug - I replicated this on my site and other staff member confirmed that pagination is not working. Second and each next page shows the same courses that on first page.
    I'm reporting this to developers so they can find a reason of this issue and provide a fix. As soon they will release a patch we'll update you about that.

    the courses dashboard now shows all 20 courses (courses you manage)?, followed by the ones that the student has enrolled on or completed
    courses you manage should not be on there

    There is no separate page for instructor or admin so dashoard will show you as admin/instructor courses you manage or you are enrolled with your user, and also will show you completed ones.
    Actual students will not see managed courses, they will only see enrolled and completed.
    What you see as admin is correct there.

    if i click on a course
    then 'start learning'
    i get a page not found /units/

    Please check now. Thanks to debug log I found a fatal error in child theme templates files and removed it, so units should show correct now without any errors. I checked now on one course and it works on my side. Please check it on yours and confirm.

    kind regards,
    Kasia

  • ian20

    Hi

    thank you - I have checked but still have problems

    1. the comment is still at the bottom of the /courses/ page

    One Response
    Anonymous
    Completed: The payment has been completed, and the funds have been added successfully to your account balance.

    2. "Actual students will not see managed courses"
    logging in as a user (not admin) - I still see all the courses titled 'Courses you manage:'

    3. logging in as a user
    my courses
    scroll down to Your current courses:
    choose a course - Mt Everest
    press the button - start learning

    a) the video is missing under units

    b) select 'notifications' and the comment is there
    One Response
    Anonymous
    Completed: The payment has been completed, and the funds have been added successfully to your account balance.

    regards
    ian

  • Nithin

    Hi ian20,

    Hope you are doing good today. :slight_smile:

    1. the comment is still at the bottom of the /courses/ page

    I'm not able to notice any comments in the /courses page. I have cleared the plugin cache, could you please clear your browser cache, and check whether you are still getting the same result.

    2. "Actual students will not see managed courses"
    logging in as a user (not admin) - I still see all the courses titled 'Courses you manage:'

    I could notice this in the course dashboard. I think this could be theme specific issue, could you please check whether you are able to replicate the same issue with a default WordPress theme. Since it's a live site, I didn't test this by switching to a default theme. Is it okay, if we temporarily switch the themes to test?

    3. logging in as a user
    my courses
    scroll down to Your current courses:
    choose a course - Mt Everest
    press the button - start learning

    a) the video is missing under units

    Could you please check whether the videos work, if you switch to a default WordPress theme too. I checked the FTP access, but it seems like it doesn't work as I'm getting the following login error:

    Response:	331 Password required for xxxxxx.com
    Command:	PASS *********
    Response:	530 Login failed. Please verify the username and password supplied, and that FTP has been unlocked. Check your control panel or contact support for more information.
    Error:	Critical error: Could not connect to server

    b) select 'notifications' and the comment is there

    Please try the following CSS, and check whether that helps:

    .course_notifications_archive-template-default #comments {
    	display: none;
    }

    You can add the above CSS code in your child themes style.css. Please let us know how that goes, so that we could give a closer look at other issues. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    HI ian20,

    Hope you are doing good today. :slight_smile:

    This is really odd, switching to a default theme still shows the same, however I'm not able to replicate such issue in my system, about the other issues.

    "Actual students will not see managed courses"
    logging in as a user (not admin) - I still see all the courses titled 'Courses you manage:'

    Regarding this, I have manged to find a workaround, by adding the following code in your child themes functions.php file:

    add_filter( 'body_class', function( $classes ) {
    	global $current_user;
    
    	$user_role = array_shift($current_user->roles);
    
    	$new_class = 'cp-role-'. $user_role;
    
    	return array_merge( $classes, array ( $new_class) );
    } );

    And then adding the CSS described below, removed the manage section from the website:

    .cp-role-subscriber #homepage-blog .student-dashboard-wrapper .dashboard-managed-courses-list {
    	display: none;
    }

    Please clear your browser cache, and see whether it works without any issue.

    3. logging in as a user
    my courses
    scroll down to Your current courses:
    choose a course - Mt Everest
    press the button - start learning
    a) the video is missing under units

    I could see units are missing from all courses. I tested with Big Ben: Intermediate Comprehension **FREE**, and I could still see the same, ie units are missing in the frontend. I could see that my colleague already has a workaround for this as mentioned in this thread:
    https://premium.wpmudev.org/forums/topic/unit-not-displayed-for-student-with-subscriber-role#post-1191597

    I edited the course, and under Course Details, and selected show units checkbox, and now the courses are visible in the fronted. You'll have to repeat the same for other courses.

    I hope this helps. Please advise, if I had missed out anything. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin