A new course field called "showgrades" which allows the teacher to
turn the display of the grade book on and off.
This commit is contained in:
@@ -423,6 +423,7 @@
|
||||
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));
|
||||
|
||||
@@ -290,6 +290,7 @@
|
||||
$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);
|
||||
@@ -1178,6 +1179,9 @@
|
||||
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;
|
||||
|
||||
+11
-1
@@ -114,7 +114,17 @@
|
||||
$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>
|
||||
|
||||
+5
-3
@@ -791,9 +791,11 @@ function print_course_admin_links($course, $width=180) {
|
||||
$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)) {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<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>
|
||||
@@ -23,6 +23,7 @@
|
||||
<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>
|
||||
|
||||
@@ -154,6 +154,7 @@ $string['courseinfo'] = "Course info";
|
||||
$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";
|
||||
@@ -673,6 +674,7 @@ $string['showall'] = "Show all \$a";
|
||||
$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";
|
||||
|
||||
@@ -490,6 +490,10 @@ function main_upgrade($oldversion=0) {
|
||||
table_column("course_categories", "courseorder", "coursecount", "integer", "10", "unsigned", "0");
|
||||
}
|
||||
|
||||
if ($oldversion < 2003082001) {
|
||||
table_column("course", "", "showgrades", "integer", "2", "unsigned", "1", "", "format");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ CREATE TABLE `prefix_course` (
|
||||
`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',
|
||||
|
||||
@@ -234,6 +234,10 @@ function main_upgrade($oldversion=0) {
|
||||
table_column("course_categories", "courseorder", "coursecount", "integer", "10", "unsigned", "0");
|
||||
}
|
||||
|
||||
if ($oldversion < 2003082001) {
|
||||
table_column("course", "", "showgrades", "integer", "2", "unsigned", "1", "", "format");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -14,6 +14,7 @@ CREATE TABLE prefix_course (
|
||||
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',
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
// 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user