Moodle
  1. Moodle
  2. MDL-23730

Course calender events by group..

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.9
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      6209

      Description

      When events are created in a calendar at a course level and attributed to a particular group they are not identified as to which group they relate to - when you vuew the calendar month view - or the single event view..

      The Group icon appears but no group name is shows ( as it is when an activity or resource is attributed to a single group).
      Even when you go back to edit the calendar event there is no 'Group' setting there.

        Issue Links

          Activity

          Hide
          Ricardo Díaz added a comment -

          Patch to see the group when editing a calendar event. Tested in Moodle v1.9.19
          Archive ../moodle/calendar/event.php, line 309:

                  case 'edit':
                      if(empty($form)) {
                          $form->name = clean_text($event->name);
          ++ add ->         $form->groupid = clean_text($event->groupid);
                          $form->courseid = $event->courseid; // Not to update, but for date validation
                          $form->description = clean_text($event->description);
          

          Archive ../moodle/calendar/event_edit.html, line 12:

           
               <td>
                 <input type="text" name="name" size="67" value="<?php p($form->name); ?>" />
                 <?php if (isset($err['name'])) formerr($err['name']); ?>
               </td>
             </tr>
          ++   <tr>
          ++     <td style="vertical-align: top; text-align: right;">
          ++      <?php print_string('group', 'calendar'); ?>:
          ++     </td>
          ++     <td><?php $grupo_name=get_record_sql('SELECT name FROM '.$CFG->prefix.'groups WHERE id='.$form->groupid); echo $grupo_name->name; ?>
          ++     </td>
          ++   </tr>
             <tr>
              <td style="vertical-align: top; text-align: right;">
                <?php print_string('eventdescription', 'calendar'); ?>:
             </td>
          
          Show
          Ricardo Díaz added a comment - Patch to see the group when editing a calendar event. Tested in Moodle v1.9.19 Archive ../moodle/calendar/event.php , line 309: case 'edit': if (empty($form)) { $form->name = clean_text($event->name); ++ add -> $form->groupid = clean_text($event->groupid); $form->courseid = $event->courseid; // Not to update, but for date validation $form->description = clean_text($event->description); Archive ../moodle/calendar/event_edit.html , line 12: <td> <input type= "text" name= "name" size= "67" value= "<?php p($form->name); ?>" /> <?php if (isset($err['name'])) formerr($err['name']); ?> </td> </tr> ++ <tr> ++ <td style= "vertical-align: top; text-align: right;" > ++ <?php print_string('group', 'calendar'); ?>: ++ </td> ++ <td><?php $grupo_name=get_record_sql('SELECT name FROM '.$CFG->prefix.'groups WHERE id='.$form->groupid); echo $grupo_name->name; ?> ++ </td> ++ </tr> <tr> <td style= "vertical-align: top; text-align: right;" > <?php print_string('eventdescription', 'calendar'); ?>: </td>

            People

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

              Dates

              • Created:
                Updated: