More language strings, minor edits.

This commit is contained in:
nicolasconnault 2007-07-03 17:54:56 +00:00
parent 6cb178cd20
commit 13b1072464
4 changed files with 32 additions and 12 deletions

View File

@ -327,10 +327,10 @@ foreach ($gtree->levels as $key=>$row) {
$dimmed = '';
if ($element['object']->is_hidden()) {
$dimmed = 'class="dimmed_text"';
$dimmed = ' dimmed_text ';
}
$headerhtml .= '<th '.$dimmed.' class="'.$type.$catlevel.'"><a href="'.$baseurl.'&amp;sortitemid='
$headerhtml .= '<th class="'.$type.$catlevel.$dimmed.'"><a href="'.$baseurl.'&amp;sortitemid='
. $element['object']->id .'">'. $element['object']->get_name()
. '</a>' . $arrow;

View File

@ -47,8 +47,11 @@ $string['exporttxt'] = 'Export TXT';
$string['exportxml'] = 'Export XML';
$string['extracredit'] = 'Extra Credit';
$string['extracreditwarning'] = 'Note: Setting all items for a category to extra credit will effectively remove them from the grade calculation. Since there will be no point total';
$string['feedback'] = 'Feedback';
$string['feedbackedit'] = 'Edit feedback';
$string['forelementtypes'] = ' for the selected $a';
$string['forstudents'] = 'For Students';
$string['grade'] = 'Grade';
$string['gradebook'] = 'Gradebook';
$string['gradebookhiddenerror'] = 'The gradebook is currently set to hide everything from students.';
$string['gradecategoryhelp'] = 'Grade Category Help';
@ -127,6 +130,7 @@ $string['nonweightedpct'] = 'non-weighted %%';
$string['noselectedcategories'] = 'no categories were selected.';
$string['noselecteditems'] = 'no items were selected.';
$string['notteachererror'] = 'You must be a teacher to use this feature.';
$string['onascaleof'] = ' on a scale of $a->grademin to $a->grademax';
$string['outcome'] = 'Outcome';
$string['pctoftotalgrade'] = '%% of total grade';
$string['percent'] = 'Percent';

View File

@ -199,13 +199,13 @@ class grade_item extends grade_object {
var $hidden = 0;
/**
* Grade item lock flag. Enmpty if not locked, lcoked if any value presetn ,usually date when was locked. Locking prevents updating.
* Grade item lock flag. Empty if not locked, locked if any value present, usually date when item was locked. Locking prevents updating.
* @var int $locked
*/
var $locked = 0;
/**
* Date when to lock the grade. Empty means no automatic locking.
* Date after which the grade will be locked. Empty means no automatic locking.
* @var int $locktime
*/
var $locktime = 0;

View File

@ -59,6 +59,16 @@ define('GRADE_UPDATE_MULTIPLE', 2);
define('GRADE_UPDATE_ITEM_DELETED', 3);
define('GRADE_UPDATE_ITEM_LOCKED', 4);
// Set up constants for report preferences
define('GRADER_REPORT_AGGREGATION_POSITION_LEFT', 0);
define('GRADER_REPORT_AGGREGATION_POSITION_RIGHT', 1);
define('GRADER_REPORT_AGGREGATION_VIEW_FULL', 0);
define('GRADER_REPORT_AGGREGATION_VIEW_COMPACT', 1);
define('GRADER_REPORT_GRADE_DISPLAY_TYPE_RAW', 0);
define('GRADER_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE', 1);
define('GRADER_REPORT_FEEDBACK_FORMAT_TEXT', 0);
define('GRADER_REPORT_FEEDBACK_FORMAT_HTML', 1);
require_once($CFG->libdir . '/grade/grade_category.php');
require_once($CFG->libdir . '/grade/grade_item.php');
@ -699,7 +709,8 @@ function grade_oldgradebook_upgrade($courseid) {
function grade_get_icons($element, $tree) {
global $CFG;
global $USER;
// Load language strings
$straddfeedback = get_string("addfeedback", 'grades');
$stredit = get_string("edit");
$streditfeedback = get_string("editfeedback", 'grades');
@ -718,12 +729,17 @@ function grade_get_icons($element, $tree) {
$strswitch_plus = get_string("expand", 'grades');
$strunlock = get_string("unlock", 'grades');
// Prepare container div
$html = '<div class="grade_icons">';
// Prepare reference variables
$eid = $element['eid'];
$object = $element['object'];
$type = $element['type'];
// Load user preferences
$aggregationview = get_user_preferences('grade_report_aggregationview', $CFG->grade_report_aggregationview);
// Icons shown when edit mode is on
if ($USER->gradeediting) {
// Edit icon (except for grade_grades)
@ -753,13 +769,13 @@ function grade_get_icons($element, $tree) {
if ($type != 'category' and $USER->gradefeedback) {
// Display Edit/Add feedback icon
if (empty($object->feedback)) {
$html .= '<a href="report.php?report=grader&amp;target='.$eid
. "&amp;action=addfeedback$tree->commonvars\">\n";
$html .= '<a href="report/grader/edit_feedback.php?id=' . $object->id
. "&amp;action=add&amp;courseid=$object->courseid\">\n";
$html .= '<img src="'.$CFG->pixpath.'/t/feedback_add.gif" class="iconsmall" alt="'.$straddfeedback.'" '
. 'title="'.$straddfeedback.'" /></a>'. "\n";
} else {
$html .= '<a href="report.php?report=grader&amp;target='.$eid
. "&amp;action=editfeedback$tree->commonvars\">\n";
$html .= '<a href="report/grader/edit_feedback.php?id=' . $object->id
. "&amp;action=edit&amp;courseid=$object->courseid\">\n";
$html .= '<img src="'.$CFG->pixpath.'/t/feedback.gif" class="iconsmall" alt="'.$streditfeedback.'" '
. 'title="'.$streditfeedback.'" onmouseover="return overlib(\''.$object->feedback.'\', CAPTION, \''
. $strfeedback.'\');" onmouseout="return nd();" /></a>'. "\n";
@ -785,7 +801,7 @@ function grade_get_icons($element, $tree) {
.${'str' . $lock_unlock}.'" title="'.${'str' . $lock_unlock}.'" /></a>'. "\n";
// If object is a category, display expand/contract icon
if (get_class($object) == 'grade_category') {
if (get_class($object) == 'grade_category' && $aggregationview == GRADER_REPORT_AGGREGATION_VIEW_COMPACT) {
$expand_contract = 'switch_minus'; // Default: expanded
$state = get_user_preferences('grade_category_' . $object->id, GRADE_CATEGORY_EXPANDED);
@ -803,8 +819,8 @@ function grade_get_icons($element, $tree) {
if ($USER->gradefeedback) {
// Display Edit/Add feedback icon
if (!empty($object->feedback)) {
$html .= '<a href="report.php?report=grader&amp;target=' . $eid
. "&amp;action=viewfeedback$tree->commonvars\">\n";
$html .= '<a href="report/grader/edit_feedback.php?id=' . $object->id
. "&amp;action=edit&amp;courseid=$object->courseid\">\n";
$html .= '<img onmouseover="return overlib(\''.$object->feedback.'\', CAPTION, \''
. $strfeedback.'\');" onmouseout="return nd();" '
. 'src="'.$CFG->pixpath.'/t/feedback.gif" class="iconsmall" alt="" /></a>'. "\n";