turn the display of the grade book on and off.
fwrite ($bf,full_tag("SHORTNAME",3,false,$course->shortname));
fwrite ($bf,full_tag("SUMMARY",3,false,$course->summary));
fwrite ($bf,full_tag("FORMAT",3,false,$course->format));
+ fwrite ($bf,full_tag("SHOWGRADES",3,false,$course->showgrades));
fwrite ($bf,full_tag("NEWSITEMS",3,false,$course->newsitems));
fwrite ($bf,full_tag("TEACHER",3,false,$course->teacher));
fwrite ($bf,full_tag("TEACHERS",3,false,$course->teachers));
$course->shortname = addslashes($course_header->course_shortname);
$course->summary = addslashes($course_header->course_summary);
$course->format = addslashes($course_header->course_format);
+ $course->showgrades = addslashes($course_header->course_showgrades);
$course->newsitems = addslashes($course_header->course_newsitems);
$course->teacher = addslashes($course_header->course_teacher);
$course->teachers = addslashes($course_header->course_teachers);
case "FORMAT":
$this->info->course_format = $this->getContents();
break;
+ case "SHOWGRADES":
+ $this->info->course_showgrades = $this->getContents();
+ break;
case "NEWSITEMS":
$this->info->course_newsitems = $this->getContents();
break;
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "showrecent", $form->showrecent, "");
- helpbutton("courserecent", get_string("showrecent")); ?>
+ helpbutton("courserecent", get_string("recentactivity")); ?>
+ </td>
+</tr>
+<tr valign=top>
+ <td><P><? print_string("showgrades") ?>:</td>
+ <td><?
+ unset($choices);
+ $choices["0"] = get_string("no");
+ $choices["1"] = get_string("yes");
+ choose_from_menu ($choices, "showgrades", $form->showgrades, "");
+ helpbutton("coursegrades", get_string("grades")); ?>
</td>
</tr>
<tr valign=top>
$adminicon[]="<img src=\"$modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
}
- } else {
- $admindata[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
+ } else { // Students menu
+ if ($course->usegrades) {
+ $admindata[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
+ $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
+ }
}
if (!empty($admindata)) {
--- /dev/null
+<p align="center"><b>Grades</b></p>
+
+<P>Many of the activities allow grades to be set.</p>
+
+<p>By default, the results of all grades within the
+ course can be seen in the Grades page, available
+ from the main course page.</p>
+
+<p>If a teacher is not interested in using grades in a
+ course, or just wants to hide grades from students,
+ then they can disable the display of grades in the
+ Course Settings. This does not prevent individual
+ activities from using or setting grades, it just
+ disables the results being displayed to students.</p>
<li><a href="help.php?file=courseshortname.html">Course short name</a>
<li><a href="help.php?file=coursestartdate.html">Course start date</a>
<li><a href="help.php?file=enrolmentkey.html">Enrollment keys</a>
+ <li><a href="help.php?file=coursegrades.html">Grades</a>
<li><a href="help.php?file=guestaccess.html">Guest access</a>
<li><a href="help.php?file=courserecent.html">Recent Activity</a>
<li><a href="help.php?file=scales.html">Scales</a>
$string['coursefiles'] = "Course files";
$string['courseformats'] = "Course formats";
$string['courserestore'] = "Course restore";
+$string['coursegrades'] = "Course grades";
$string['courses'] = "Courses";
$string['courseupdates'] = "Course updates";
$string['create'] = "Create";
$string['showalltopics'] = "Show all topics";
$string['showallusers'] = "Show all users";
$string['showallweeks'] = "Show all weeks";
+$string['showgrades'] = "Show grades";
$string['showlistofcourses'] = "Show list of courses";
$string['showonlytopic'] = "Show only topic \$a";
$string['showonlyweek'] = "Show only week \$a";
table_column("course_categories", "courseorder", "coursecount", "integer", "10", "unsigned", "0");
}
+ if ($oldversion < 2003082001) {
+ table_column("course", "", "showgrades", "integer", "2", "unsigned", "1", "", "format");
+ }
+
return $result;
}
`shortname` varchar(15) NOT NULL default '',
`summary` text NOT NULL,
`format` varchar(10) NOT NULL default 'topics',
+ `showgrades` smallint(2) unsigned NOT NULL default '1',
`modinfo` text NOT NULL,
`newsitems` smallint(5) unsigned NOT NULL default '1',
`teacher` varchar(100) NOT NULL default 'Teacher',
table_column("course_categories", "courseorder", "coursecount", "integer", "10", "unsigned", "0");
}
+ if ($oldversion < 2003082001) {
+ table_column("course", "", "showgrades", "integer", "2", "unsigned", "1", "", "format");
+ }
+
return $result;
}
?>
shortname varchar(15) NOT NULL default '',
summary text NOT NULL default '',
format varchar(10) NOT NULL default 'topics',
+ showgrades integer NOT NULL default '1',
modinfo text NOT NULL default '',
newsitems integer NOT NULL default '1',
teacher varchar(100) NOT NULL default 'Teacher',
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2003082000; // The current version is a date (YYYYMMDDXX)
+$version = 2003082001; // The current version is a date (YYYYMMDDXX)
$release = "1.1 Beta"; // User-friendly version number