Пример #1
0
 function Portada($idGroup)
 {
     $groupName = NotesPDF::getGroupByID($idGroup)->getBestName();
     $this->AddPage();
     $this->Ln(7);
     $this->SetFont('Arial', 'I', 12);
     setlocale(LC_ALL, "es_ES");
     $this->Cell(0, 0, strtoupper($groupName) . ' - ' . strftime("%d de %B del %Y"), 0, 0, 'R');
     $this->Ln(10);
     $this->SetFont('Arial', 'B', 14);
     $this->Cell(0, 7, 'Ideas Seleccionadas', 1, 0, 'C');
     $this->Ln(10);
 }
Пример #2
0
 function formData()
 {
     $this->out->hidden('group-h-' . $this->idGroup, $this->idGroup, 'idGroup');
     // Box para apuntes automáticos
     $this->out->elementStart('div', array('class' => 'notes-div-auto'));
     $this->out->element('p', 'notes-text-auto', 'Generar Apuntes Automáticos');
     $this->out->element('p', null, 'Se seleccionarán los tweets con la máxima puntuación hasta la fecha.');
     $this->out->elementStart('div');
     $this->out->submit('notes-submit-auto', _m('BUTTON', 'Aceptar'), 'submit', 'submit-auto');
     $this->out->elementEnd('div');
     $this->out->elementEnd('div');
     // Box para apuntes personalizados
     $this->out->elementStart('div', array('class' => 'notes-div-manual'));
     $this->out->element('p', 'notes-text-manual', 'Generar Apuntes Personalizados');
     $this->out->elementStart('div');
     $this->out->element('p', 'notes-manual-option', 'Hashtag: ');
     $this->out->elementStart('select', array('name' => 'combo-tag', 'id' => 'notes-combo-hashtag', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboTag(' . $this->idGroup . ');'));
     $tags = NotesPDF::getTagsOfUserWithGradeInGroup($this->idGroup, '%', '%');
     $this->out->element('option', array('value' => 'Todos'), 'Todos');
     for ($i = 0; $i < count($tags); $i++) {
         $this->out->element('option', array('value' => $tags[$i]), $tags[$i]);
     }
     $this->out->elementEnd('select');
     $this->out->elementEnd('div');
     $this->out->elementStart('div');
     $this->out->element('p', 'notes-manual-option', 'Usuario: ');
     $this->out->elementStart('select', array('name' => 'combo-user', 'id' => 'notes-combo-user', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboUser(' . $this->idGroup . ');'));
     $nicks = NotesPDF::getUsersinGroupWithHashtagAndGrade($this->idGroup, '%', '%');
     $this->out->element('option', array('value' => 'Todos'), 'Todos');
     for ($i = 0; $i < count($nicks); $i++) {
         $this->out->element('option', array('value' => $nicks[$i]), $nicks[$i]);
     }
     $this->out->elementEnd('select');
     $this->out->elementEnd('div');
     $this->out->elementStart('div');
     $this->out->element('p', 'notes-manual-option', 'Puntuación: ');
     $this->out->elementStart('select', array('name' => 'combo-grade', 'id' => 'notes-combo-grade', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboGrade(' . $this->idGroup . ');'));
     $grades = NotesPDF::getGradesinGroupWithTagAndUser($this->idGroup, '%', '%');
     $this->out->element('option', array('value' => 'Todos'), 'Todos');
     for ($i = 0; $i < count($grades); $i++) {
         $this->out->element('option', array('value' => $grades[$i]), $grades[$i]);
     }
     $this->out->elementEnd('select');
     $this->out->elementEnd('div');
     $this->out->submit('notes-submit-manual', _m('BUTTON', 'Aceptar'), 'submit', 'submit-custom');
     $this->out->elementEnd('div');
 }
Пример #3
0
 function showContent()
 {
     if (empty($this->user)) {
         $this->element('p', array('class' => 'notespdf-customize-error'), _m('Login first!'));
     } else {
         $idGroup = $this->trimmed('idGroup');
         $group = NotesPDF::getGroupByID($idGroup);
         $this->element('h2', null, 'Apuntes para el grupo ' . $group->getBestName());
         $this->elementStart('p');
         $this->raw('A continuación personalice los apuntes.');
         $this->elementEnd('p');
         $optionsForm = new Notescustomizeform($this, $group->id);
         $optionsForm->show();
     }
 }
Пример #4
0
<?php

/**
 * 
 * BoloTweet 2.0
 *
 * @author   Alvaro Ortego <*****@*****.**>
 *
 */
define('STATUSNET', true);
define('LACONICA', true);
// compatibility
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../../..'));
require_once INSTALLDIR . '/lib/common.php';
require_once INSTALLDIR . '/local/plugins/NotesPDF/classes/NotesPDF.php';
$userid = $_POST['userid'] == 'Todos' ? '%' : $_POST['userid'];
$grade = $_POST['grade'] == 'Todos' ? '%' : $_POST['grade'];
$groupid = $_POST['groupid'];
$tags = NotesPDF::getTagsOfUserWithGradeInGroup($groupid, $userid, $grade);
echo '<option value="Todos">Todos</option>';
for ($i = 0; $i < count($tags); $i++) {
    echo '<option value="' . $tags[$i] . '">' . $tags[$i] . '</option>';
}
Пример #5
0
 static function getNoticesInModeCustom($fields)
 {
     extract($fields);
     $notes = new NotesPDF();
     if ($tag == '%') {
         $qry = 'select distinct g.noticeid as noticeid' . ' from grades g, group_inbox gr, notice_tag nt, notice n, profile p' . ' where g.noticeid = gr.notice_id' . ' and g.grade LIKE \'' . $grade . '\'' . ' and gr.group_id = ' . $idGroup . ' and gr.notice_id = n.id' . ' and n.profile_id = p.id' . ' and p.nickname LIKE \'' . $nick . '\'';
     } else {
         $qry = 'select distinct g.noticeid as noticeid' . ' from grades g, group_inbox gr, notice_tag nt, notice n, profile p' . ' where g.noticeid = gr.notice_id' . ' and g.grade LIKE \'' . $grade . '\'' . ' and gr.group_id = ' . $idGroup . ' and gr.notice_id = nt.notice_id' . ' and nt.tag LIKE \'' . $tag . '\'' . ' and n.id = nt.notice_id' . ' and n.profile_id = p.id' . ' and p.nickname LIKE \'' . $nick . '\'';
     }
     $notes->query($qry);
     // all select fields will
     // be written to fields of the Grade object. It is required that
     // select fields are named after the Grade fields.
     $noticesids = array();
     while ($notes->fetch()) {
         $noticesids[] = $notes->noticeid;
     }
     $notes->free();
     return $noticesids;
 }
Пример #6
0
<?php

/**
 * 
 * BoloTweet 2.0
 *
 * @author   Alvaro Ortego <*****@*****.**>
 *
 */
define('STATUSNET', true);
define('LACONICA', true);
// compatibility
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../../..'));
require_once INSTALLDIR . '/lib/common.php';
require_once INSTALLDIR . '/local/plugins/NotesPDF/classes/NotesPDF.php';
$tag = $_POST['tag'] == 'Todos' ? '%' : $_POST['tag'];
$userid = $_POST['userid'] == 'Todos' ? '%' : $_POST['userid'];
$groupid = $_POST['groupid'];
$grades = NotesPDF::getGradesinGroupWithTagAndUser($groupid, $userid, $tag);
echo '<option value="Todos">Todos</option>';
for ($i = 0; $i < count($grades); $i++) {
    echo '<option value="' . $grades[$i] . '">' . $grades[$i] . '</option>';
}
Пример #7
0
 function showContent()
 {
     $idGroup = $this->trimmed('idGroup');
     $group = NotesPDF::getGroupByID($idGroup);
     $this->element('h2', null, 'Apuntes para el grupo ' . $group->getBestName());
     $this->elementStart('p');
     $this->raw('A continuación personalice los apuntes.');
     $this->elementEnd('p');
     $optionsForm = new Notescustomizeform($this, $group->id);
     $optionsForm->show();
 }
Пример #8
0
<?php

/**
 * 
 * BoloTweet 2.0
 *
 * @author   Alvaro Ortego <*****@*****.**>
 *
 */
define('STATUSNET', true);
define('LACONICA', true);
// compatibility
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../../..'));
require_once INSTALLDIR . '/lib/common.php';
require_once INSTALLDIR . '/local/plugins/NotesPDF/classes/NotesPDF.php';
$tag = $_POST['tag'] == 'Todos' ? '%' : $_POST['tag'];
$grade = $_POST['grade'] == 'Todos' ? '%' : $_POST['grade'];
$groupid = $_POST['groupid'];
$users = NotesPDF::getUsersinGroupWithHashtagAndGrade($groupid, $tag, $grade);
echo '<option value="Todos">Todos</option>';
for ($i = 0; $i < count($users); $i++) {
    echo '<option value="' . $users[$i] . '">' . $users[$i] . '</option>';
}