diff --git a/joinrecording.php b/joinrecording.php
index 53c6fe0..e9aee08 100644
--- a/joinrecording.php
+++ b/joinrecording.php
@@ -14,8 +14,9 @@ require_once(dirname(__FILE__).'/locallib.php');
 require_once(dirname(__FILE__).'/connect_class.php');
 require_once(dirname(__FILE__).'/connect_class_dom.php');
 
-$id         = required_param('id', PARAM_INT);
-$groupid    = required_param('groupid', PARAM_INT);
+$id          = required_param('id', PARAM_INT);
+$groupid     = required_param('groupid', PARAM_INT);
+$recordingid = required_param('recording', PARAM_INT); 
 
 global $CFG, $USER, $DB;
 
@@ -62,31 +63,45 @@ $sql = "SELECT meetingscoid FROM {adobeconnect_meeting_groups} amg WHERE ".
        "amg.instanceid = :instanceid AND amg.groupid = :groupid";
 
 
-$meetscoids = $DB->get_record_sql($sql, $params);
+$meetscoid = $DB->get_record_sql($sql, $params);
 
 // Get the Meeting recording details
 $aconnect   = aconnect_login();
-$recording  = array();
+$recordings = array();
 $fldid      = aconnect_get_folder($aconnect, 'content');
 
 $data = aconnect_get_recordings($aconnect, $fldid, $meetscoid->meetingscoid);
 
 if (!empty($data)) {
-    $recording = $data;
+    $recordings = $data;
 }
 
 // If at first you don't succeed ...
 $data2 = aconnect_get_recordings($aconnect, $meetscoid->meetingscoid, $meetscoid->meetingscoid);
 
 if (!empty($data2)) {
-     $recording = $data2;
+     $recordings = $data2;
 }
 
 aconnect_logout($aconnect);
 
-if (empty($recording) and confirm_sesskey()) {
-    notify(get_string('errormeeting', 'adobeconnect'));
-    die();
+
+if ((!isset($recordings[$recordingid]) || empty($recordings[$recordingid])) && confirm_sesskey()) {
+    /// Print the page header
+    $url = new moodle_url('/mod/adobeconnect/view.php', array('id' => $cm->id));
+    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+
+    if ($groupid) {
+        $url->param('group', $groupid);
+    }
+
+    $PAGE->set_url($url);
+    $PAGE->set_context($context);
+    $PAGE->set_title(format_string($adobeconnect->name));
+    $PAGE->set_heading($course->fullname);
+
+    echo $OUTPUT->header();
+    notice(get_string('errorrecording', 'adobeconnect'), $url);
 }
 
 add_to_log($course->id, 'adobeconnect', 'view',
@@ -100,5 +115,5 @@ if (!empty($CFG->adobeconnect_port) and (80 != $CFG->adobeconnect_port)) {
 }
 
 
-redirect($protocol . $CFG->adobeconnect_meethost . $port
-                     . $recording->url . '?session=' . $adobesession);
+//redirect($protocol . $CFG->adobeconnect_meethost . $port
+//                     . $recordings[$recordingid]->url . '?session=' . $adobesession);
diff --git a/view.php b/view.php
index fb37342..469a1c9 100644
--- a/view.php
+++ b/view.php
@@ -136,7 +136,7 @@ $sql = "SELECT meetingscoid FROM {adobeconnect_meeting_groups} amg WHERE ".
 
 
 $meetscoids = $DB->get_records_sql($sql, $params);
-$recording = array();
+$recordings = array();
 
 if (!empty($meetscoids)) {
     $recscoids = array();
@@ -175,14 +175,22 @@ if (!empty($meetscoids)) {
         // May need this later on
         $data = aconnect_get_recordings($aconnect, $fldid, $scoid->meetingscoid);
 
+         //Get group id for recording
+        if (0 !== $cm->groupmode) {
+            $rgroupid = $DB->get_field_select('adobeconnect_meeting_groups', 'groupid','meetingscoid = '.$scoid->meetingscoid);
+        }
+        if (empty($rgroupid)) {
+            $rgroupid = 0;
+        }
+
         if (!empty($data)) {
-            $recording[] = $data;
+            $recordings[$rgroupid] = $data;
         }
 
         $data2 = aconnect_get_recordings($aconnect, $scoid->meetingscoid, $scoid->meetingscoid);
 
         if (!empty($data2)) {
-             $recording[] = $data2;
+             $recordings[$rgroupid] = $data2;
         }
 
     }
@@ -192,9 +200,9 @@ if (!empty($meetscoids)) {
     // recording settings on ACP server change between publishing the recording links in meeting folders and
     // not publishing the recording links in meeting folders
     $names = array();
-    foreach ($recording as $key => $recordingarray) {
+    foreach ($recordings as $rgroupid => $recordingarray) {
 
-        foreach ($recordingarray as $key2 => $record) {
+        foreach ($recordingarray as $recording_scoid => $record) {
 
 
             if (!empty($names)) {
@@ -204,7 +212,7 @@ if (!empty($meetscoids)) {
                     $names[] = $record->name;
                 } else {
 
-                    unset($recording[$key][$key2]);
+                    unset($recordings[$rgroupid][$recording_scoid]);
                 }
             } else {
 
@@ -375,15 +383,15 @@ if (!$adobeconnect->meetingpublic) {
     $showrecordings = true;
 }
 
-$recordings = $recording;
+if ($showrecordings && isset($recordings) && isset($recordings[$groupid]) && !empty($recordings[$groupid])) {
+    foreach ($recordings[$groupid] as $recording_scoid => $recording) {
+        echo $OUTPUT->box_start('generalbox', 'meetingsummary');
 
-if ($showrecordings and !empty($recordings)) {
-    echo $OUTPUT->box_start('generalbox', 'meetingsummary');
+        // Echo the rendered HTML to the page
+        echo $renderer->display_meeting_recording($recordings, $cm->id, $groupid, $adobesession);
 
-    // Echo the rendered HTML to the page
-    echo $renderer->display_meeting_recording($recordings, $cm->id, $groupid, $adobesession);
-
-    echo $OUTPUT->box_end();
+        echo $OUTPUT->box_end();
+    }
 }
 
 add_to_log($course->id, 'adobeconnect', 'view',
