예제 #1
0
 function definition()
 {
     $values = $this->values;
     $attributes = 'size=4';
     $acode = $values->activitycode;
     $jobid = $values->jobid;
     $a = $values->a;
     $id = $values->id;
     $default = $values->eval;
     $mform =& $this->_form;
     // Don't forget the underscore!
     $mform->addElement('text', 'TEMPLATEFIELD', get_string('activitycode', 'blended'), $attributes);
     $mform->setHelpButton('TEMPLATEFIELD', array('TEMPLATEFIELD', get_string('activitycode', 'blended'), 'blended'));
     $mform->setDefault('TEMPLATEFIELD', $values->activitycode);
     $mform->addRule('TEMPLATEFIELD', null, 'required', null, 'client');
     $mform->addElement('text', 'USERID', get_string('idlabel', 'blended'), $attributes);
     $mform->setHelpButton('USERID', array('USERID', get_string('userid', 'blended'), 'blended'));
     $mform->addRule('USERID', null, 'required', null, 'client');
     $mform->setDefault('USERID', $values->userid);
     $mform->addElement('hidden', 'id', $id);
     $mform->addElement('hidden', 'a', $a);
     $mform->addElement('hidden', 'acode', $acode);
     $mform->addElement('hidden', 'jobid', $jobid);
     try {
         display_eval($mform, $acode, $default, $jobid);
         $mform->addElement('static', 'PREGUNTA', 'Zona de respuestas: ');
         $mform->setHelpButton('PREGUNTA', array('PREGUNTA', get_string('PREGUNTA', 'blended'), 'blended'), false);
         display_questions($mform, $acode, $jobid, $values->warnings);
     } catch (ResultsError $e) {
         //print "no llego aqui";
         throw $e;
     }
     $buttonarray = array();
     $buttonarray[] =& $mform->createElement('submit', 'errors_resolved', get_string('errors_resolved', 'blended'));
     $buttonarray[] =& $mform->createElement('submit', 'submitbutton', get_string('submit'));
     //$buttonarray[] = &$mform->createElement('reset', 'resetbutton', get_string('reset'));
     $buttonarray[] =& $mform->createElement('cancel');
     $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
     $mform->closeHeaderBefore('buttonar');
     return $mform;
 }
예제 #2
0
                    <h4 class="modal-title" >Questions</h4>
                    
                  </div>

                  <div class="modal-header" class="col-md-2">
                    
                    <h5 style="text-align: right; padding-right: 10px;"><strong>Time Remaining: 00:00:00</strong></h5>
                    
                  </div>

                  <div class="modal-body">


                  <table class="table table-hover">
                    <?php 
$result = display_questions($conn);
?>
                  </table>

                  </div>
                  <div class="modal-footer">
                    <button type="button" class="btn btn-primary">Save Changes</button>
                  </div>
                </div><!-- /.modal-content -->
              </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
          </div><!-- /.example-modal -->

            </div><!-- /.col -->
            </section>