updating coursepress pro losing work

Hello
Okay.. today I tried to update the site. Unfortunately teachers lost information after the update.. student work (non-assessable work) and well as unpublished units disappeared. Also, the assessment area was saying that there was unmarked work. But I checked these courses and all marks had been given. I restored everything and tried again. The wordpress update was fine.. but once I updated Coursepress the same thing happened. any suggestions as to how to solve this? BTW I restored everything again and will wait to hear from you before moving forward. thanks

  • Nastia

    Hello @paulstavropoulos

    Regrading disappearing Units, we have previously reported when an instructor sets a unit as a draft, it disappearing. This is already reported to a developer, and they are working to fix this.

    Would you please let us know, from what version you are updating the CoursePress plugin? How did you completed the update? Would you please try to update the plugin manually using FTP or File Manager from your cPanel?

    - Download the plugin from CoursePress Pro page
    - Navigate to wp-content/plugins and rename the current cursepress folder to something else
    - Upload the latest version to the wp-content/plugins directory

    As for lost student's work, whrn you mean non-assessable work you mean th estudent's progress and not assesments, right?

    Let us know how it went!

    Cheers,
    Nastia

  • Brenda

    Hello
    I am updating from CoursePress Pro V 1.2.6.6 to 1.3 I completed the update by clicking on the update now link as this is very new to me so I did it the easy way. :slight_smile:

    Download the plugin from CoursePress Pro page (this I understand :slight_smile: )

    - Navigate to wp-content/plugins and rename the current cursepress folder to something else (you mean using my FTP program and find this file on my server in my webpage folders?)
    - Upload the latest version to the wp-content/plugins directory (you mean using the files from the down -- then uploading using the ftp program? right? Just want to make use I do the step correctly.,)

    When you create assessment you can make them assessable (meaning you assign a grade) and non-assessable (meaning you assign no grade). One of my teachers said the work that was non-assessable disappeared and she knows it was previous completed as she had looked at to to make sure it was done correctly.

    Also, it was showing that there were many assessments that needed to be graded. For example, I am also a teacher an in one of my courses it jumped from 35 to 66 things needed grades assigned to them.. but there was no "pending grade" showing.

    thanks again for your help

  • Brenda

    Okay.. update.. I manually updated coursepress using my FTP .. same problems problems as before.

    Also I notice in the preview mode if I click "units" it says "O units in the course currently. Please check back later."

    Number beside assessment for my courses has changed from 40 ish to 299. I know there are not 299 assignments/questions for me to mark.

    Some teachers have also noted that unpublished draft units have disappeared.

    Is there anyway to fix these issues? thanks for your help

  • Nastia

    Hello brenda , I hope you are doing well today!

    One of my teachers said the work that was non-assessable disappeared and she knows it was previous completed as she had looked at to to make sure it was done correctly.

    I can't replicate the same on my installation. I logged in as an instructor and the non-assessable assessments are shown normally.

    I see on your installation non-assessable assessments are showing. Would you please compare the assessments what are shown from your end with the assessments that are shown from the instructor's end?

    Also, it was showing that there were many assessments that needed to be graded. For example, I am also a teacher an in one of my courses it jumped from 35 to 66 things needed grades assigned to them.. but there was no "pending grade" showing.

    Is the notifications shown all the time or it was just once? Right now I see that there are some assessments with pending Grade status.

    Also I notice in the preview mode if I click "units" it says "O units in the course currently. Please check back later."

    I can't replicate it now on your site because I see that you are using the previous version 1.2.6.6 of the plugin. Is this happening when you open a unit in Draft mode?

    Some teachers have also noted that unpublished draft units have disappeared.

    This is a known bug and it happens to instructors only. Once a draft unit saved, it's units dessappearing from the list. I'm flagging this thread to our developers as well Once there is an update, I will post back here, in this thread. The permanent solution to this is to assign to an instructor an Administrator user role.

    Please advise,

    Cheers,
    Nastia

  • Brenda

    Hello Nastia
    I hope you are have a great day too!

    The notifications only show after I update coursepress. As per my example, with the courses I teach.. I jumped from 40 assessments requiring marking to 300 requiring marking.. I do not have 300 pending grades.. (note: I have a separate account for instructor duties)

    I had to restore the update as students can not access their course material after the update.. This is the biggest issue... I get a message saying that "O units in the course currently. Please check back later." in the preview mode if I click units. This is preventing students from accessing their course work.

    To clarify.. to the unpublished units only disappeared after I did the update...

    Also, the site is extremely slow once you log in to the school area and try to move from page to page.. it can take up to 20 to 30 seconds for a page to load... Wordpress said it was a coursepress issue because the site is only slow when navigating in the courses.

  • Nastia

    Hello Brenda!

    As per my example, with the courses I teach.. I jumped from 40 assessments requiring marking to 300 requiring marking.. I do not have 300 pending grades

    I have tried to replicate this issue on my installation, by updating the plugin, but the notifications for ungraded assessments remained the same. Most likely there was a conflict with another plugin. Do you have a staging site where we can repeat the process and check if this happens again?

    Also, the site is extremely slow once you log in to the school area and try to move from page to page.. it can take up to 20 to 30 seconds for a page to load...

    I can't replicate the same. On your site the sourse pages opens in 3-4 seconds. Do you use a cache plugin? Please try once of the most commonly use plugins:
    https://wordpress.org/plugins/search.php?q=cache
    https://wordpress.org/plugins/w3-total-cache/
    https://wordpress.org/plugins/wp-fastest-cache/

    Please instll P3 Profiler plugin to measure the CoursePress Performance and let us know the results:
    https://el.wordpress.org/plugins/p3-profiler/

    students can not access their course material after the update.. This is the biggest issue... I get a message saying that "O units in the course currently. Please check back later." in the preview mode if I click units. This is preventing students from accessing their course work.

    Do you see this message when you logged in as instructor or as administrator? As an administrator once I viewed Units, all units are visible for me on your site.

    I created a test account on your site and added myself to course MHF4U to check if the students can see the Units and all Units re visible for me:

    Is this happens only with a specific unit? Would you please post the name of the Unit here?

    To clarify.. to the unpublished units only disappeared after I did the update...

    The draft units are not visible for instructors only in the current version of the CouursePress 1.3 and 1.3.1. . To the administrator the draft units are visible.

    Would you please use the previous version of the CoursePress 1.2.6.6 till we fix these bugs?

    Please advise,

    Kind Regards,
    Nastia

  • Nastia

    Hello Brenda

    My apologies for late reply.

    Which site were looking at?

    I was looking at your staging site then

    Would you please send to us the staging site credentials credentials , so I could troubleshoot this issue?
    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select “?*I have a different question*?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:

    Subject: "Attn: Nastia”
    - WordPress admin username
    - WordPress admin password
    - login url
    - FTP credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    We are waiting for your email! I will look at it ASAP.

    Kind Regards,
    Nastia

  • Nastia

    Hello Brenda

    The FTP credentials you have sent are not working. Do you use any aspesific port to connect to your host?

    I can confirm that 0 units shown after clicking on Units link. Please increase the maximum execution time. This should solve the issue

    Please locate the .htaccees file and put the following line inside:

    php_value max_execution_time 300

    If after testing you will still see 0 Units, 300 sec. will not be enough, increase it to 600

    Also I increased the memory_limit to 256M in wp-config.php. Put the following line:

    define('WP_MEMORY_LIMIT', '256M');

    Link for refference:
    https://premium.wpmudev.org/blog/increase-memory-limit/

    Would you please resent the correct FTP details so I could troubleshoot the issue with assesments notification?

    Please send to us, through our contact form: https://premium.wpmudev.org/contact/
    Select “?*I have a different question*?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:

    Subject: "Attn: Nastia”
    - FTP credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Kind Regards,
    Nastia

  • Nastia

    Hello Brenda

    You should make the changes on the staging site. Once you make these changes, please login with a test student account to check if the issue with 0 units, is solved.

    I'll include an available developer from a second level support line in this thread for his valuable opinion on the issue with non-assessable assesments. Please note that, developer response might be slower than the usual staff response, so we appreciate your patience on this.

    Best regards,
    Nastia

  • Nastia

    Hello Brenda

    I hope you are doing well today!

    I'm trying to access to your staging site via FTP unuccesfully. Would you please send us the FTP credentials so we could continue to troubleshoot the issues with CoursePress update.

    Please include in the email:
    Subject: "Attn: Nastia”
    - FTP credentials for staging site (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Please send to us, through our contact form and select "I have a different question" for your topic
    https://premium.wpmudev.org/contact/

    We are waiting for your reply!

    Kind Regards,
    Nastia

  • Panos

    Hello brenda,

    Apologies for the delay !

    Nastia was correct about the archive-unit.php file :slight_smile:

    I have replaced it and it seems to be working as expected. Please have a look and if you confirm that it works correctly you can download it and replace it in your live site.

    I would strongly recommend to first keep a backup of your previous file so if things don't work out you can restore instantly.

    Kind regards,
    Panos

  • Brenda

    I have not made any changes as per your suggestions yet.. but now there is another major issue:

    My teachers can not create new pages and save them. I have tested this .. what happens when I click on save (within the course units - I am trying to create a new page) it takes a long time to save.. and finally it stops.. and all the text I have typed disappears - not only is it not saving but it is deleting everything I have created from the page...

    Please look into this.. I have given access to the site.

  • Panos

    Hi Brenda,

    Yes,

    1. definitely backup your Live site :slight_smile:

    2. Then download the "archive_unit.php" file your staging site somewhere on your desktop (if you haven't already)

    3. Do your updates, first WordPress and then CoursePress (but that should make any difference)

    4. Check if units are appearing in front end, which I doubt, and if not replace the archive_unit.php file.

    5. Check the number of assessments ( the issue regarding 300+ assessments ). You will probably have this issue again so you should let us know so we can fix it. In case you want to do it on your own,
    open file includes/classes/class.course.unit.module.php and add:

    if ( get_post_meta( $ungraded_response->post_parent, 'gradable_answer', true ) != 'yes' ) {
    					unset( $ungraded_responses[ $key ] );
    					continue;
    				}

    at line ~830, before:
    if ( get_user_option( 'role', $ungraded_response->post_author ) !== 'student' ) {

    and this

    if ( get_post_meta( $ungraded_response->post_parent, 'gradable_answer', true ) != 'yes' ) {
    						unset( $ungraded_responses[ $key ] );
    					continue;
    }

    at line ~893 (depends how many enters you pressed at previous code), before this line:
    if ( get_user_option( 'role', $ungraded_response->post_author ) !== 'student' ) {

    If you want, you can provide us ftp access so we can do this change.

    6. Also check if when logged in as an istructor you can see draft units or they disappear.

    I will keep an eye on this thread in case you need anything though I will be here for about an hour, but I'll be back early tomorrow :slight_smile:

    Please let us know how it goes!

    Thanks!
    Panos

  • Brenda

    Hello
    Okay I have updated wordpress and course press pro. I successfully uploaded the archive_unit.php file and viewing units appears to be working correctly. :slight_smile:

    But yes the number of assessments is wrong again. I have given you access to the site to fix the problem. I will let you do the coding as I am not a programmer... :slight_smile: I have given you access again via wpmu dev. Let me know if you need anymore information.
    Thanks so much for all your help with this issue.
    Brenda

  • Panos

    Hi Brenda!

    Really glad you are happy :grinning:

    Generally it is considered good practise to keep backup before each update of theme or plugin (or file modification). So before updating I would recommend to at-least keep backup of the db and the entire plugin you are about to replace. You can use our Snapshot plugin which makes the backup process really simple and quick.

    This fix should be included in next version, but before updating you can check the changelog where it mentions which fixes it includes. You can see the changelog directly when trying to update through the WPMUDEV Dashboard plugin.

    Thanks!

    Kind regards,
    Panos

  • Brenda

    I logged in as a teacher and I can see unpublished units..in my own courses but it is in old course that is not published any longer. would that allow me to see it? I can't log in as teacher and see the other teachers courses -- only as administrator

    I will check with the teachers tomorrow and see who is missing units. I only know of one teacher because she emailed me today.. (its a holiday here.. not sure where you are). But I will ask her tomorrow if she can see all her files. When I look as an administrator I can't see any unpublished units in her course but she told me this morning in her email that there was and that she couldn't see them.
    thanks for your help
    Brenda

    I will keep you posted ..thanks

  • Brenda

    Yes as an instructor I can create a draft unit and see it. But the draft units that are missing, I am not able to see them when I am logged in as admin. The missing units are not visible logged in as admin or as a teacher . And some draft units are there.. and some are missing. (of course it is the important ones that are missing).

    how do I make sure there is no caching enabled?

    Thanks

  • Panos

    The problem that we had up to now regarding missing units, was because the plugin only checked for administrator permissions to allow to view un-published (draft) units. By changing the permission check (already done that in your files) all units should be visible now to instructors.

    What you are telling me now is completely different. I am afraid this will be hard to follow, as there is no clue what we are looking for. Do you have a specific course you know of that is missing units?

    To make thing easier I have installed plugin : MiwoSQL - Database & SQL Manager. With this we can query the database and search for all units of a course.

    First locate a course and get it's id. To get it's ID, go to admin menu > CoursePress Pro > Courses and click on a course. At the address bar of your browser you can see it's id at the query var "course_id".

    Next go to your admin menu > MiwoSQL. Let the "command" dropdown as it is ("Select") and at the "Table" dropdown select the posts table (yourprefix_posts). At the text area paste
    SELECT * FROM wpmu1_posts WHERE post_parent = 72
    and replace 72 with the course id that you know is missing units.

    Finally press the Run Query button.

    At the list that appears check the results where post_type field is "unit" and post_status is "draft" and compare them with the ones you see in your course page.

    Please report if you notice that they don't match.

    If you find the above steps to complicated please provide us an id of a course you know that has missing units.

    Looking forward to your reply!

    Kind regards,
    Panos

  • Brenda

    I tried the query on a different computer and got this error:

    The canadianecollege.ca page isn’t working

    canadianecollege.ca is currently unable to handle this request.
    HTTP ERROR 500

    You can also look at
    CHY4U World History: The West and the World Grade 12 April 2016 Mrs. Vafiades

    The assessment folder is showing (unpublished) but the teacher says there were other units that were draft that are not showing.

    MCV4U missing 3 units (Unit 5, Exam Review, Assessments)
    SCH4U missing 3 units (Unit 4, Unit 5, Assessments)
    SPH4U missing 3 units (Unit 4, Unit 5, Assessments)

  • Brenda

    While I appreciate all your help, my teachers need their course material. So what I have done is created a staging site of the current updated site. So that you can continue to trouble shoot it. And I have restored the site back to how it was before I updated.

    ciconline.staging.wpengine.com

    also, you will be able to compare and see which units are missing. :slight_smile:

    Thanks so much for your help. I hope we get this issue solved soon. It would be nice to have an updated site .
    Brenda

  • Panos

    Hi Brenda,

    For some reason the plugin isn't working on your site. In order to check select result I would need to have access to db so I can run a select query through phpMyAdmin.

    Although this is harmless and doesn't affect your site at any aspect I would still recommend to keep a backup (I suppose you already have one).

    What I need is your cPanel credentials so I can open your phpMyAdmin.

    As you already know, you can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:Subject: "Attn: Panos Lyrakis"
    - cPanel credentials (login url/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Thanks!
    Panos

  • Panos

    Hello Brenda,

    I have added a small snippet which selects the drafts from the database and in the course's page it displays you the number of drafts returned and the tile of the draft.

    You can see the results when visiting each course's page. You can quickly compare the results by visiting the courses list page and for each course you are interested in hold the Ctrl key and click on the course's units link. This way it will open the units page in a new tab so you can go back quicker.

    In each page you click you can compare the results the snippet returns at the top of the page with the Draft units the course has.

    I have already checked most of them and didn't find any mismatches, but the say 4 eyes are better than two :slight_smile:

    Please let me know if you find any missing drafts this way. When you are done you can ask me to remove that snippet.

    What comes to my mind is the point the restore was made, if it was a restore of database records, then some possible changes would be gone. Eg, if you have a database backup taken yesterday morning, and I have added some units (drafts or published) during the day but today you restore the previous backup then my changes will be gone. Please let me know if this is a possible scenario.

    Kind regards,
    Panos

  • Panos

    Yes, I'm talking about the staging site. Could you follow instructions above? Simply visit units pages of courses that are missing draft units, and in that page compare the results of the script on the top of the page with the number of draft units you have in that course.

    What would make things easier would be to refer to courses by their ids, as their titles look alike for some of them, if you are OK with it of course.

    Thanks!
    Panos

  • Brenda

    Where do I find this snippet?

    Not sure why it shows differently. But if you look at MCV4U id is 54530 there are three units missing. There should be Unit 5, Exam Review and Assessments. All of which are unpublished units. None of the unpublished units show on the staging site.

    I know for sure that these units are missing because after I restored the site I went in to make sure the unpublished units ((I have a list from each teacher) were showing.

  • Panos

    Hi Brenda,

    Apologies for the delay here, somehow I missed the notification of your reply.

    That snipped is hardcoded in includes/admin-pages/courses-details.php and displays the count of drafts in Course page.

    What I noticed is that the units you mention are stored with status "private" and "unpublished" instead of draft and I think that this is the reason the new version doesn't "read" them.

    What I have to propose is to let me run a small query replacing "private" and "unpublished" with "draft".

    If you agree please let me know and keep a backup of the database tables. I am talking about the staging site.

    Cheers!
    Panos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.