Changeset 1386


Ignore:
Timestamp:
Jan 9, 2013, 3:17:33 AM (5 years ago)
Author:
dkg
Message:

display number of attendees in liaison view for january conferences

Location:
trunk/jpdd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.organization.php

    r1385 r1386  
    175175     
    176176      if (count($requirements) == 0) {
    177         return $this->getListOfPeopleForEvent($jpdd->getActiveEventID());
     177        return '<h3>'.(int)($this->countAttendeesSQL($eventid)).' people signed up</h3>'.$this->getListOfPeopleForEvent($jpdd->getActiveEventID());
    178178      }
    179179     
     
    373373      reset($peops);
    374374      while(list(,$x) = each($peops))
    375         $ret .= "<li>".$x->getLinkedTitle()." ".$x->getWorkshopText(false).
     375        $ret .= "<li>".$x->getLinkedTitle()." ".$x->getWorkshopText(false, $event).
    376376          (array_key_exists($x->getID(), $roles) ? ' <span class="roletag">'.$roles[$x->getID()].'</span>' : '').
    377377          (array_key_exists($x->getID(), $applications) ? ' <span class="applicationtag">'.$applications[$x->getID()].'</span>' : '')."</li>\n";
  • trunk/jpdd/class.jpdd.person.php

    r1369 r1386  
    7474    }
    7575
    76         function getAttendingWorkshops($flavor) {
     76        function getAttendingWorkshops($flavor, $eventid = NULL) {
    7777          global $jpdd;
     78      if (is_null($eventid))
     79        $eventid = $jpdd->getActiveEventID();
     80      $eventid = (int)$eventid;
    7881          $jpdd->prepClass('workshop');
    79       $sql = 'SELECT workshop.* FROM workshop JOIN attendance ON (workshop.id = attendance.workshop_id) WHERE person_id = '.$this->getID().' AND flavor = '.$jpdd->escStr($flavor).' AND event_id = '.$jpdd->getActiveEventID();
     82      $sql = 'SELECT workshop.* FROM workshop JOIN attendance ON (workshop.id = attendance.workshop_id) WHERE person_id = '.$this->getID().' AND flavor = '.$jpdd->escStr($flavor).' AND event_id = '.$eventid;
    8083          return $jpdd->getSeriesFromSQL($sql, 'JPDD_Workshop');
    8184        }
     
    271274    }
    272275
    273     function getWorkshopText($usedivs = true) {
     276    function getWorkshopText($usedivs = true, $eventid = NULL) {
     277      global $jpdd;
    274278      $ret = '';
    275           $presenting = $this->getAttendingWorkshops('presenter');
     279      if (is_null($eventid))
     280        $eventid = $jpdd->getActiveEventID();
     281      $eventid = (int)$eventid;
     282
     283          $presenting = $this->getAttendingWorkshops('presenter', $eventid);
    276284          // show workshops presenting
    277285          if (count($presenting)) {
     
    279287          }
    280288         
    281           $attending = $this->getAttendingWorkshops('audience');
     289          $attending = $this->getAttendingWorkshops('audience', $eventid);
    282290          // show workshops being attended
    283291          if (count($attending)) {
Note: See TracChangeset for help on using the changeset viewer.