Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: Course
    • Testing Instructions:
      Hide

      There are no changes in functionality

      1. Add block 'recent activity' to the course page
      2. Make sure student/teacher can see in the block structural changes (when activities were added/removed/edited)
      3. Make sure student/teacher can see in the block the activities updates: new forum posts, assignment submissions, etc.
      4. recent enrollments unfortunately are not shown, bug MDL-36993 is created for that
      Show
      There are no changes in functionality Add block 'recent activity' to the course page Make sure student/teacher can see in the block structural changes (when activities were added/removed/edited) Make sure student/teacher can see in the block the activities updates: new forum posts, assignment submissions, etc. recent enrollments unfortunately are not shown, bug MDL-36993 is created for that
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-36968-master

      Description

      function print_recent_activity() in course/lib.php is only used in the block recent_activity
      It should be located in this block and use block renderers

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              marina Marina Glancy added a comment -

              TO INTEGRATORS: master only

              Show
              marina Marina Glancy added a comment - TO INTEGRATORS: master only
              Hide
              marina Marina Glancy added a comment -

              rebased

              Show
              marina Marina Glancy added a comment - rebased
              Hide
              poltawski Dan Poltawski added a comment -

              Hi Marina,

              Just wondering if there is a way we can instead call the block code in the deprecated function rather than implementing the code twice?

              Show
              poltawski Dan Poltawski added a comment - Hi Marina, Just wondering if there is a way we can instead call the block code in the deprecated function rather than implementing the code twice?
              Hide
              marina Marina Glancy added a comment -

              well, first we would need to create block instance then (class block_recent_activity) and I can't be sure that it does not do other code.
              second, what if block is removed? Which is quite probable for sites with custom code that uses print_recent_activity() outside of the block

              Show
              marina Marina Glancy added a comment - well, first we would need to create block instance then (class block_recent_activity) and I can't be sure that it does not do other code. second, what if block is removed? Which is quite probable for sites with custom code that uses print_recent_activity() outside of the block
              Hide
              marina Marina Glancy added a comment -

              I rebased over integration. The branch is wip-MDL-36968-int in my git

              Show
              marina Marina Glancy added a comment - I rebased over integration. The branch is wip- MDL-36968 -int in my git
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Marina, integrated to 2.5

              Show
              poltawski Dan Poltawski added a comment - Thanks Marina, integrated to 2.5
              Hide
              poltawski Dan Poltawski added a comment -

              Debug info: ERROR: syntax error at or near "$"
              LINE 2: ... $userfield...
              ^
              SELECT asb.id, asb.timemodified,
              $userfields
              FROM mdl_assign_submission asb
              JOIN mdl_assign a ON a.id = asb.assignment
              JOIN mdl_user u ON u.id = asb.userid
              $groupjoin
              WHERE asb.timemodified > $1 AND
              a.id = $2
              ORDER BY asb.timemodified ASC
              [array (
              0 => 1358140869,
              1 => '3',
              )]
              Error code: dmlreadexception
              Stack trace:
              line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
              line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
              line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
              line 628 of /mod/assign/lib.php: call to pgsql_native_moodle_database->get_records_sql()
              line 170 of /course/recent.php: call to assign_get_recent_mod_activity()

              Show
              poltawski Dan Poltawski added a comment - Debug info: ERROR: syntax error at or near "$" LINE 2: ... $userfield... ^ SELECT asb.id, asb.timemodified, $userfields FROM mdl_assign_submission asb JOIN mdl_assign a ON a.id = asb.assignment JOIN mdl_user u ON u.id = asb.userid $groupjoin WHERE asb.timemodified > $1 AND a.id = $2 ORDER BY asb.timemodified ASC [array ( 0 => 1358140869, 1 => '3', )] Error code: dmlreadexception Stack trace: line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end() line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end() line 628 of /mod/assign/lib.php: call to pgsql_native_moodle_database->get_records_sql() line 170 of /course/recent.php: call to assign_get_recent_mod_activity()
              Hide
              marina Marina Glancy added a comment -

              this is to Damyon I guess, has nothing to do with my changes

              Show
              marina Marina Glancy added a comment - this is to Damyon I guess, has nothing to do with my changes
              Hide
              poltawski Dan Poltawski added a comment -

              Yep, pinged Damyon about it.

              Show
              poltawski Dan Poltawski added a comment - Yep, pinged Damyon about it.
              Hide
              poltawski Dan Poltawski added a comment -

              Looks good here, thanks Marina.

              Show
              poltawski Dan Poltawski added a comment - Looks good here, thanks Marina.
              Hide
              poltawski Dan Poltawski added a comment -

              Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

              Show
              poltawski Dan Poltawski added a comment - Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

                People

                • Assignee:
                  marina Marina Glancy
                  Reporter:
                  marina Marina Glancy
                  Integrator:
                  Dan Poltawski
                  Tester:
                  Dan Poltawski
                  Participants:
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13