Moodle
  1. Moodle
  2. MDL-21687

"on View" not working from the "add a resource" drop down

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Conditional activities
    • Labels:
      None
    • Environment:
      Moodle .2.0
    • Rank:
      26812

      Description

      When testing out Conditional Activities with page, file, folder and URL it appears that the activity completion requirement to "view" the resource no longer works and the resource is not revealed once a user has viewed it.
      See forum post here
      http://moodle.org/mod/forum/discuss.php?d=139294#p630341

        Issue Links

          Activity

          Hide
          Sam Marshall added a comment -

          Thanks Mary. I'm hoping to work on this tomorrow. If I don't comment further here inside a week, please feel free to post another comment to hassle me.

          Show
          Sam Marshall added a comment - Thanks Mary. I'm hoping to work on this tomorrow. If I don't comment further here inside a week, please feel free to post another comment to hassle me.
          Hide
          Sam Marshall added a comment -

          Fixed now. Support is supposed to be in place for automatic completion of all Resource types except Label, i.e. File, Folder, IMS content package, Page, URL.

          I was not able to test IMS CP as I don't have any content packages handy, but I checked the rest, think it's working.

          Note the file download completion is a bit disappointing because it doesn't automatically update the page straight away, i.e. you only see the tick next time you reload the course page, not immediately when the download starts. This is obviously because it was technically difficult to do but maybe it should be improved...

          Show
          Sam Marshall added a comment - Fixed now. Support is supposed to be in place for automatic completion of all Resource types except Label, i.e. File, Folder, IMS content package, Page, URL. I was not able to test IMS CP as I don't have any content packages handy, but I checked the rest, think it's working. Note the file download completion is a bit disappointing because it doesn't automatically update the page straight away, i.e. you only see the tick next time you reload the course page, not immediately when the download starts. This is obviously because it was technically difficult to do but maybe it should be improved...
          Hide
          Dan Marsden added a comment -

          Hi Sam - a few of those commits broke -
          Fatal error: Class 'completion_info' not found in /home/dan/www/workspace/moodle/mod/imscp/view.php on line 49

          I see Dongsheng fixed one - I'll fix the imscp now, but you should probably check the others to make sure completionlib is included...

          Show
          Dan Marsden added a comment - Hi Sam - a few of those commits broke - Fatal error: Class 'completion_info' not found in /home/dan/www/workspace/moodle/mod/imscp/view.php on line 49 I see Dongsheng fixed one - I'll fix the imscp now, but you should probably check the others to make sure completionlib is included...
          Hide
          Rossiani Wijaya added a comment -

          Hi Sam,

          I fixed mod/url/view.php to include completionlib.php.

          Show
          Rossiani Wijaya added a comment - Hi Sam, I fixed mod/url/view.php to include completionlib.php.
          Hide
          Sam Marshall added a comment -

          Thanks Dan, Rossiani. Actually I think I didn't break it - except imscp I tested the other types before so they used to work. I guess probably some other file used to require completion and now doesn't (probably for efficiency), which means the require_once is now needed at this level when it wasn't before.

          I tested resource, folder, page, and url again, setting all of them to use 'view' completion and checking it actually worked when I viewed it. Folder and URL (thanks for fix) already worked. I just added the require_once into resource and page. I put it next to the lines that use it so hopefully it won't get lost if the files are rearranged again...

          Show
          Sam Marshall added a comment - Thanks Dan, Rossiani. Actually I think I didn't break it - except imscp I tested the other types before so they used to work. I guess probably some other file used to require completion and now doesn't (probably for efficiency), which means the require_once is now needed at this level when it wasn't before. I tested resource, folder, page, and url again, setting all of them to use 'view' completion and checking it actually worked when I viewed it. Folder and URL (thanks for fix) already worked. I just added the require_once into resource and page. I put it next to the lines that use it so hopefully it won't get lost if the files are rearranged again...
          Hide
          Dan Marsden added a comment -

          yeah - I'm pretty sure imscp was working a couple of weeks ago too, I couldn't quickly find the commit that pulled completionlib but saw that the commits that went in with this bug probably all needed checking again.

          Show
          Dan Marsden added a comment - yeah - I'm pretty sure imscp was working a couple of weeks ago too, I couldn't quickly find the commit that pulled completionlib but saw that the commits that went in with this bug probably all needed checking again.

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: