[svn r19644] gradebook: better icons, form header

lp: consistent form
skala
Patrick Cool 16 years ago
parent 149025d3b0
commit e28e0ee6b2
  1. 3
      main/course_description/index.php
  2. 6
      main/gradebook/gradebook_edit_all.php
  3. 26
      main/gradebook/lib/fe/displaygradebook.php
  4. 7
      main/gradebook/lib/fe/evalform.class.php
  5. 5
      main/gradebook/lib/fe/linkaddeditform.class.php
  6. 2
      main/gradebook/lib/fe/linkform.class.php
  7. 6
      main/gradebook/lib/fe/scoredisplayform.class.php
  8. 4
      main/gradebook/user_stats.php
  9. BIN
      main/img/back.png
  10. 28
      main/newscorm/lp_add.php

@ -1,4 +1,4 @@
<?php // $Id: index.php 19325 2009-03-25 20:54:39Z aportugal $
<?php // $Id: index.php 19644 2009-04-08 14:55:54Z pcool $
/*
==============================================================================
@ -184,6 +184,7 @@ if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') {
//Se borro: echo ' <style> .row{} <\style> por que hacia conflicto en apartado personalizado con los estilos propios del formvalidator
// Build the form
$form = new FormValidator('course_description','POST','index.php','','style="width: 100%;"');
$form->addElement('header', '', $default_description_titles[$_GET['description_id']]);
$form->addElement('hidden', 'description_id');
if ($_GET['action']=='edit' || $_POST['edit']==1 ) {

@ -70,7 +70,7 @@ if (!isset($_GET['exportpdf']) and !isset($_GET['export_certificate'])) {
$interbreadcrumb[]= array (
'url' => $_SESSION['gradebook_dest'].'?&selectcat='.Security::remove_XSS($_GET['selectcat']),
'name' => get_lang('Details'));
'name' => get_lang('EditAllWeights'));
Display :: display_header('');
@ -174,7 +174,9 @@ if ($my_api_cidreq=='') {
$my_api_cidreq='cidReq='.$my_category['course_code'];
}
?>
<a href="<?php echo $_SESSION['gradebook_dest'].'?id_session='.$_SESSION['id_session'].'&amp;'.$my_api_cidreq ?>&selectcat=<?php echo $category_id ?>"><< <?php echo get_lang('Back') ?></a>
<div class="actions">
<a href="<?php echo $_SESSION['gradebook_dest'].'?id_session='.$_SESSION['id_session'].'&amp;'.$my_api_cidreq ?>&selectcat=<?php echo $category_id ?>"> <?php echo Display::return_icon('back.png').get_lang('Back') ?></a>
</div>
<form method="post" action="gradebook_edit_all.php?id_session=<?php echo $_SESSION['id_session'].'&amp;'.$my_api_cidreq ?>&selectcat=<?php echo $category_id?>">
<table class="data_table">
<tr class="row_odd">

@ -35,7 +35,7 @@ class DisplayGradebook
$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
if ($shownavbar == '1' && $status==1) {
$header = '<div class="actions">';
$header .= '<a href="'.$_SESSION['gradebook_dest'].'?selectcat=' . $selectcat . '"> &#60;&#60; ' . get_lang('BackToOverview') . '</a>';
$header .= '<a href="'.$_SESSION['gradebook_dest'].'?selectcat=' . $selectcat . '">'. Display::return_icon('folder_document.gif') . get_lang('FolderView') . '</a>';
if ($evalobj->get_course_code() == null) {
$header .= '<a href="gradebook_add_user.php?selecteval=' . $evalobj->get_id() . '"><img src="../img/add_user_big.gif" alt="' . get_lang('AddStudent') . '" align="absmiddle" /> ' . get_lang('AddStudent') . '</a>';
}
@ -44,7 +44,7 @@ class DisplayGradebook
}
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&import="><img src="../img/calendar_down.gif" border="0" alt="" />' . ' ' . get_lang('ImportResult') . '</a>';
if ($evalobj->has_results()) {
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&export="><img src="../img/calendar_up.gif" border="0" alt="" />' . ' ' . get_lang('ExportResult') . '</a>';
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&export="><img src="../img/file_pdf.gif" border="0" alt="" />' . ' ' . get_lang('ExportResult') . '</a>';
$header .= '<a href="gradebook_edit_result.php?selecteval=' . $evalobj->get_id() .'"><img src="../img/works.gif" alt="' . get_lang('EditResult') . '" align="absmiddle" /> ' . get_lang('EditResult') . '</a>';
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();"><img src="../img/delete.gif" border="0" alt="" />' . ' ' . get_lang('DeleteResult') . '</a>';
}
@ -93,7 +93,7 @@ class DisplayGradebook
*/
function display_header_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header= '<table border="0" cellpadding="5">';
$header .= '<td style="vertical-align: top;"><a href="'.$_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '"><< ' . get_lang('BackToOverview') . '</a></td>';
$header .= '<td style="vertical-align: top;"><a href="'.$_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '">' . Display::return_icon('folder_document.gif') . get_lang('FolderView') . '</a></td>';
$header .= '<td style="vertical-align: top;">' . get_lang('FilterCategory') . '</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">';
$cats= Category :: load();
$tree= $cats[0]->get_tree();
@ -114,7 +114,7 @@ class DisplayGradebook
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '"><img src="../img/folder_up.gif" border="0" alt="'.get_lang('Up').'" /></a></td>';
}
$header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/calendar_up.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/file_pdf.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/printmgr.gif" alt=' . get_lang('Print') . '/> ' . get_lang('Print') . '</a>';
$header .= '</td></tr></table>';
if (!$catobj->get_id() == '0') {
@ -135,9 +135,9 @@ class DisplayGradebook
*/
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header = '<div class="actions">';
$header .= '<a href="'.$_SESSION['gradebook_dest'].'?'.api_get_cidreq().'"><< ' . get_lang('BackToOverview') . '</a>';
$header .= '<a href="'.$_SESSION['gradebook_dest'].'?'.api_get_cidreq().'">'. Display::return_icon('folder_document.gif') . get_lang('FolderView') . '</a>';
// $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/calendar_up.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
// $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/file_pdf.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
// this MUST be a GET variable not a POST
if (isset($_GET['show'])) {
@ -264,16 +264,16 @@ class DisplayGradebook
$header .= '<td></td>';
}
if ($is_course_admin && $message_resource===false && $_GET['selectcat']!=0) {
/*$header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '"><img src="../img/stats_access.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
/*$header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
if ($is_course_admin && $message_resource===false) {
$header .= '<td style="vertical-align: top;"><a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() .'"><img src="../img/acces_tool.gif" alt="' . get_lang('ScoreEdit') . '" /> ' . get_lang('ScoreEdit') . '</a>';
}*/
} elseif (!(isset ($_GET['studentoverview']))) {
if ( $message_resource===false ) {
//$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/stats_access.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
//$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
}
} else {
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/calendar_up.gif" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/file_pdf.gif" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
}
$header .= '</td></tr>';
}
@ -316,7 +316,7 @@ class DisplayGradebook
if ($message_resource===false ) {
$myname=$catobj->shows_all_information_an_category($catobj->get_id());
$header .= '<td><a href="gradebook_edit_all.php?id_session='.$_SESSION['id_session'].'&amp;'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('quiz.gif', get_lang('EditAllWeights')).' ' . get_lang('EditAllWeights') . '</a>';
$header .= '<td><a href="gradebook_edit_all.php?id_session='.$_SESSION['id_session'].'&amp;'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('statistics.gif', get_lang('EditAllWeights')).' ' . get_lang('EditAllWeights') . '</a>';
$my_course_id=api_get_course_id();
$my_file= substr($_SESSION['gradebook_dest'],0,5);
if (($my_file!='index' || $status_user==1) || api_is_platform_admin()) {
@ -357,17 +357,17 @@ class DisplayGradebook
if ($is_course_admin)
{
$header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats_access.gif', get_lang('FlatView')).' '. get_lang('FlatView') . '</a>';
$header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' '. get_lang('FlatView') . '</a>';
if ($is_platform_admin || $is_course_admin)
$header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() .'">'.Display::return_icon('acces_tool.gif', get_lang('ScoreEdit')).' ' . get_lang('ScoreEdit') . '</a>';
}
elseif (!(isset ($_GET['studentoverview'])))
{
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats_access.gif', get_lang('FlatView')).' ' . get_lang('FlatView') . '</a>';
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' ' . get_lang('FlatView') . '</a>';
}
else
{
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('calendar_up.gif', get_lang('ExportPDF')).' ' . get_lang('ExportPDF') . '</a>';
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('file_pdf.gif', get_lang('ExportPDF')).' ' . get_lang('ExportPDF') . '</a>';
}
$header.='</div>';
echo $header;

@ -300,6 +300,13 @@ class EvalForm extends FormValidator
* Builds a basic form that is used in add and edit
*/
private function build_basic_form($edit= 0) {
$form_title = get_lang('NewEvaluation');
if ($_GET['editeval']==1)
{
$form_title = get_lang('EditEvaluation');
}
$this->addElement('header', '', $form_title);
$this->addElement('hidden', 'zero', 0);
$this->addElement('hidden', 'hid_user_id');
$this->addElement('hidden', 'hid_category_id');

@ -63,6 +63,11 @@ class LinkAddEditForm extends FormValidator
}
$defaults = array();
$this->addElement('hidden', 'zero', 0);
if (!empty($_GET['editlink']))
{
$this->addElement('header', '', get_lang('EditLink'));
}
// ELEMENT: name
if ($form_type == self :: TYPE_ADD || $link->is_allowed_to_change_name()) {

@ -88,7 +88,7 @@ class LinkForm extends FormValidator
}
protected function build_create() {
$this->addElement('header', '', get_lang('MakeLink'));
$select = $this->addElement('select',
'select_link',
get_lang('ChooseLink'),

@ -63,8 +63,8 @@ class ScoreDisplayForm extends FormValidator
$scorecol= array ();
//settings for the colored score
$this->addElement('header', 'h1', '<b>' . get_lang('ScoreColor') . '</b>');
$this->addElement('header', '', get_lang('ScoreEdit'));
$this->addElement('html', '<b>' . get_lang('ScoreColor') . '</b>');
$renderer = $this->defaultRenderer();
$elementTemplateColor = '<div class="row">
<div class="label">
@ -87,7 +87,7 @@ class ScoreDisplayForm extends FormValidator
//settings for the scoring system
$this->addElement('header', 'h2', '<b>' . get_lang('ScoringSystem') . '</b>');
$this->addElement('html', '<br /><b>' . get_lang('ScoringSystem') . '</b>');
$this->addElement('checkbox', 'enablescore', null, get_lang('EnableScoringSystem'), null);
if ($displayscore->is_custom()) {

@ -101,7 +101,7 @@ $actions = '<div class="actions">';
if (isset ($_GET['selectcat'])) {
$interbreadcrumb[]= array ('url' => 'gradebook_flatview.php?selectcat=' . Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('FlatView'));
$actions.= '<a href=gradebook_flatview.php?selectcat=' .Security::remove_XSS($_GET['selectcat']) . '> &#60;&#60; ' . get_lang('BackToOverview') . '</a>&nbsp&nbsp';
$actions.= '<a href=gradebook_flatview.php?selectcat=' .Security::remove_XSS($_GET['selectcat']) . '>' . Display::return_icon('folder_document.gif') . get_lang('FolderView') . '</a>&nbsp&nbsp';
}
if (isset ($_GET['selecteval'])) {
@ -111,7 +111,7 @@ if (isset ($_GET['selecteval'])) {
));
$actions.= '<a href=gradebook_view_result.php?selecteval=' . Security::remove_XSS($_GET['selecteval']) . '><img src=../img/lp_leftarrow.gif alt=' . get_lang('BackToEvaluation') . ' align=absmiddle/> ' . get_lang('BackToEvaluation') . '</a>&nbsp&nbsp';
}
$actions.= '<a href="' . api_get_self() . '?exportpdf=&userid='.Security::remove_XSS($_GET['userid']).'&selectcat=' . $category[0]->get_id() . '" target="_blank"><img src=../img/calendar_up.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
$actions.= '<a href="' . api_get_self() . '?exportpdf=&userid='.Security::remove_XSS($_GET['userid']).'&selectcat=' . $category[0]->get_id() . '" target="_blank"><img src=../img/file_pdf.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
$actions.='</div>';
Display :: display_header(get_lang('ResultsPerUser'));

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -118,19 +118,31 @@ echo '</div>';
Display::display_normal_message(get_lang('AddLpIntro'),false);
echo '<p>'.get_lang('AddLpToStart').' :</p>';
echo '<div style="width:465px;">';
echo '<form method="post">';
echo '<div>';
echo '<label for="idTitle">'.get_lang('Title').' : </label><input id="idTitle" name="learnpath_name" type="text" size="50" /> ';
// form title
echo '<div class="row"><div class="form_header">'.get_lang('AddLpToStart').'</div></div>';
// title field
echo '<div class="row">';
echo '<div class="label">';
echo '<label for="idTitle">'.get_lang('Title').' : </label>';
echo '</div>';
echo '<div class="formw">';
echo '<input id="idTitle" name="learnpath_name" type="text" size="50" />';
echo '</div>';
echo '</div>';
// submit button
echo '<div class="row">';
echo '<div class="label">';
echo '</div>';
echo '<div class="formw">';
echo '<button class="save" style="width:150px;" type="submit"/>'.get_lang('CreateLearningPath').'</button>';
echo '</div>';
echo '<div>';
echo '<button class="save" style="width:150px; float: right;" type="submit"/>'.get_lang('CreateLearningPath').'</button>';
echo '</div>';
echo '<input name="post_time" type="hidden" value="' . time() . '" />';
echo '</form>';
echo '</div>';
// footer
Display::display_footer();

Loading…
Cancel
Save