function parents_unpublish()
 {
     JRequest::checkToken() or jexit('Invalid Token');
     $cid = JRequest::getVar('cid', array(), 'post', 'array');
     JArrayHelper::toInteger($cid);
     if (count($cid) < 1) {
         JError::raiseError(500, JText::_('Select an item to create'));
     }
     JoomdleHelperMailinglist::delete_mailing_lists($cid, 'course_parents');
     $this->setRedirect('index.php?option=com_joomdle&view=mailinglist');
 }
Exemple #2
0
 function display($tpl = null)
 {
     $this->sidebar = JHtmlSidebar::render();
     $params = JComponentHelper::getParams('com_joomdle');
     if ($params->get('mailing_list_integration') == 'no') {
         JToolbarHelper::title(JText::_('COM_JOOMDLE_VIEW_MAILINGLIST_TITLE'), 'mailinglist');
         $this->message = JText::_('COM_JOOMDLE_MAILING_LIST_INTEGRATION_NOT_ENABLED');
         $tpl = "disabled";
         parent::display($tpl);
         return;
     }
     $this->courses = JoomdleHelperMailinglist::getListCourses();
     $this->addToolbar();
     parent::display($tpl);
 }
Exemple #3
0
?>
</th>
						<th class="center"><?php 
echo JText::_('COM_JOOMDLE_MAILING_LIST_TEACHERS');
?>
</th>
						<th class="center"><?php 
echo JText::_('COM_JOOMDLE_MAILING_LIST_PARENTS');
?>
</th>
                    </tr>              
             </thead>
             <tbody>
                    <?php 
$k = 0;
$row = JoomdleHelperMailinglist::get_general_lists();
$checked = JHTML::_('grid.id', $i, $row->id);
$row->published = $row->published_students;
$published_students = JHTML::_('jgrid.published', $row->published, $i, 'mailinglist.students_');
$row->published = $row->published_teachers;
$published_teachers = JHTML::_('jgrid.published', $row->published, $i, 'mailinglist.teachers_');
$row->published = $row->published_parents;
$published_parents = JHTML::_('jgrid.published', $row->published, $i, 'mailinglist.parents_');
?>
					<tr class="<?php 
echo "row{$k}";
?>
">
						<td><?php 
echo $row->id;
?>
Exemple #4
0
 static function get_general_lists()
 {
     $i = 0;
     $c = new JObject();
     $c->id = 0;
     $c->fullname = JText::_('COM_JOOMDLE_GENERAL');
     $c->published_students = JoomdleHelperMailinglist::general_list_exists('course_students');
     $c->published_teachers = JoomdleHelperMailinglist::general_list_exists('course_teachers');
     $c->published_parents = JoomdleHelperMailinglist::general_list_exists('course_parents');
     $i++;
     return $c;
 }
Exemple #5
0
    function removeMailingSub ($action, $params)
    {
		$username = $params[0];
		$course_id = $params[1];
		$type = $params[2];

        $username = utf8_decode ($username);

		return JoomdleHelperMailinglist::remove_list_member ($username, $course_id, $type);
    }