Merge branch 'wip-MDL-42672-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-11-12 20:07:05 +01:00
commit aa7bc816d9
20 changed files with 25 additions and 20 deletions

View File

@ -52,7 +52,6 @@ foreach ($allmodules as $key=>$module) {
}
$strresources = get_string('resources');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -100,6 +99,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -2003,11 +2003,12 @@ class assign {
return $o;
}
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strsectionname = '';
$usesections = course_format_uses_sections($course->format);
$modinfo = get_fast_modinfo($course);
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$sections = $modinfo->get_section_info_all();
}
$courseindexsummary = new assign_course_index_summary($usesections, $strsectionname);

View File

@ -18,7 +18,6 @@ add_to_log($course->id, "assignment", "view all", "index.php?id=$course->id", ""
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
$strassignmenttype = get_string("assignmenttype", "assignment");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string("name");
$strduedate = get_string("duedate", "assignment");
$strsubmitted = get_string("submitted", "assignment");
@ -43,6 +42,7 @@ $timenow = time();
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strassignmenttype, $strduedate, $strsubmitted, $strgrade);
} else {
$table->head = array ($strname, $strassignmenttype, $strduedate, $strsubmitted, $strgrade);

View File

@ -37,7 +37,6 @@ $PAGE->set_pagelayout('incourse');
// Get all required strings
$strbooks = get_string('modulenameplural', 'mod_book');
$strbook = get_string('modulename', 'mod_book');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -66,6 +65,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -22,7 +22,6 @@ $event->trigger();
/// Get all required strings
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strchats = get_string('modulenameplural', 'chat');
$strchat = get_string('modulename', 'chat');
@ -51,6 +50,7 @@ $strname = get_string('name');
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname);
$table->align = array ('center', 'left');
} else {

View File

@ -20,7 +20,6 @@
$strchoice = get_string("modulename", "choice");
$strchoices = get_string("modulenameplural", "choice");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$PAGE->set_title($strchoices);
$PAGE->set_heading($course->fullname);
$PAGE->navbar->add($strchoices);
@ -51,6 +50,7 @@
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, get_string("question"), get_string("answer"));
$table->align = array ("center", "left", "left");
} else {

View File

@ -41,7 +41,6 @@ $context = context_course::instance($course->id);
add_to_log($course->id, "data", "view all", "index.php?id=$course->id", "");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strdata = get_string('modulename','data');
$strdataplural = get_string('modulenameplural','data');
@ -67,6 +66,7 @@ $strnumnotapproved = get_string('numnotapproved', 'data');
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strdescription, $strentries, $strnumnotapproved);
$table->align = array ('center', 'center', 'center', 'center', 'center');
} else {

View File

@ -68,12 +68,12 @@ $usesections = course_format_uses_sections($course->format);
$timenow = time();
$strname = get_string("name");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strresponses = get_string('responses', 'feedback');
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
if (has_capability('mod/feedback:viewreports', $context)) {
$table->head = array ($strsectionname, $strname, $strresponses);
$table->align = array ("center", "left", 'center');

View File

@ -37,7 +37,6 @@ add_to_log($course->id, 'folder', 'view all', "index.php?id=$course->id", '');
$strfolder = get_string('modulename', 'folder');
$strfolders = get_string('modulenameplural', 'folder');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -60,6 +59,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -49,13 +49,13 @@ $usesections = course_format_uses_sections($course->format);
/// Print the list of instances (your module will probably extend this)
$timenow = time();
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string("name");
$strentries = get_string("entries", "glossary");
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strentries);
$table->align = array ("CENTER", "LEFT", "CENTER");
} else {

View File

@ -37,7 +37,6 @@ add_to_log($course->id, 'imscp', 'view all', "index.php?id=$course->id", '');
$strimscp = get_string('modulename', 'imscp');
$strimscps = get_string('modulenameplural', 'imscp');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -60,6 +59,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -67,7 +67,6 @@ $usesections = course_format_uses_sections($course->format);
/// Print the list of instances (your module will probably extend this)
$timenow = time();
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string("name");
$strgrade = get_string("grade");
$strdeadline = get_string("deadline", "lesson");
@ -75,6 +74,7 @@ $strnodeadline = get_string("nodeadline", "lesson");
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strgrade, $strdeadline);
$table->align = array ("center", "left", "center", "center");
} else {

View File

@ -77,13 +77,13 @@ if (! $basicltis = get_all_instances_in_course("lti", $course)) {
// Print the list of instances (your module will probably extend this)
$timenow = time();
$strname = get_string("name");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$usesections = course_format_uses_sections($course->format);
$table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname);
$table->align = array ("center", "left");
} else {

View File

@ -39,7 +39,6 @@ $event->trigger();
$strpage = get_string('modulename', 'page');
$strpages = get_string('modulenameplural', 'page');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -61,6 +60,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -88,7 +88,11 @@ if ($showclosingheader) {
array_push($align, 'left');
}
array_unshift($headings, get_string('sectionname', 'format_'.$course->format));
if (course_format_uses_sections($course->format)) {
array_unshift($headings, get_string('sectionname', 'format_'.$course->format));
} else {
array_unshift($headings, '');
}
array_unshift($align, 'center');
$showing = '';

View File

@ -36,7 +36,6 @@ add_to_log($course->id, "scorm", "view all", "index.php?id=$course->id", "");
$strscorm = get_string("modulename", "scorm");
$strscorms = get_string("modulenameplural", "scorm");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string("name");
$strsummary = get_string("summary");
$strreport = get_string("report", 'scorm');
@ -64,6 +63,7 @@ if (! $scorms = get_all_instances_in_course("scorm", $course)) {
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strsummary, $strreport);
$table->align = array ("center", "left", "left", "left");
} else {

View File

@ -17,7 +17,6 @@
add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
$strsurveys = get_string("modulenameplural", "survey");
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string("name");
$strstatus = get_string("status");
$strdone = get_string("done", "survey");
@ -39,6 +38,7 @@
$table->width = '100%';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strstatus);
} else {
$table->head = array ($strname, $strstatus);

View File

@ -37,7 +37,6 @@ add_to_log($course->id, 'url', 'view all', "index.php?id=$course->id", '');
$strurl = get_string('modulename', 'url');
$strurls = get_string('modulenameplural', 'url');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
@ -60,6 +59,7 @@ $table = new html_table();
$table->attributes['class'] = 'generaltable mod_index';
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strintro);
$table->align = array ('center', 'left', 'left');
} else {

View File

@ -69,11 +69,11 @@ $usesections = course_format_uses_sections($course->format);
/// Print the list of instances (your module will probably extend this)
$timenow = time();
$strsectionname = get_string('sectionname', 'format_' . $course->format);
$strname = get_string("name");
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_' . $course->format);
$table->head = array($strsectionname, $strname);
} else {
$table->head = array($strname);

View File

@ -57,11 +57,11 @@ if (! $workshops = get_all_instances_in_course('workshop', $course)) {
$usesections = course_format_uses_sections($course->format);
$timenow = time();
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname);
$table->align = array ('center', 'left');
} else {