Skip to content

Commit

Permalink
Merge branch 'wip-MDL-42672-m24' of git://github.com/marinaglancy/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_24_STABLE
  • Loading branch information
stronk7 committed Nov 12, 2013
2 parents 32ef873 + 62b41d8 commit ef2a27e
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion course/resources.php
Expand Up @@ -52,7 +52,6 @@
}

$strresources = get_string('resources');
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
Expand Down Expand Up @@ -100,6 +99,7 @@
$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 {
Expand Down
3 changes: 2 additions & 1 deletion mod/assign/locallib.php
Expand Up @@ -1746,11 +1746,12 @@ private function view_course_index() {
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);
Expand Down
2 changes: 1 addition & 1 deletion mod/assignment/index.php
Expand Up @@ -18,7 +18,6 @@
$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");
Expand All @@ -43,6 +42,7 @@
$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);
Expand Down
2 changes: 1 addition & 1 deletion mod/book/index.php
Expand Up @@ -37,7 +37,6 @@
// 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');
Expand All @@ -62,6 +61,7 @@
$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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/chat/index.php
Expand Up @@ -19,7 +19,6 @@

/// Get all required strings

$strsectionname = get_string('sectionname', 'format_'.$course->format);
$strchats = get_string('modulenameplural', 'chat');
$strchat = get_string('modulename', 'chat');

Expand Down Expand Up @@ -47,6 +46,7 @@
$table = new html_table();

if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname);
$table->align = array ('center', 'left');
} else {
Expand Down
2 changes: 1 addition & 1 deletion mod/choice/index.php
Expand Up @@ -18,7 +18,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);
Expand Down Expand Up @@ -49,6 +48,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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/data/index.php
Expand Up @@ -41,7 +41,6 @@

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');
Expand All @@ -66,6 +65,7 @@
$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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/feedback/index.php
Expand Up @@ -66,12 +66,12 @@

$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');
Expand Down
2 changes: 1 addition & 1 deletion mod/folder/index.php
Expand Up @@ -37,7 +37,6 @@

$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');
Expand All @@ -59,6 +58,7 @@
$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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/index.php
Expand Up @@ -48,13 +48,13 @@
/// 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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/imscp/index.php
Expand Up @@ -37,7 +37,6 @@

$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');
Expand All @@ -59,6 +58,7 @@
$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 {
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/index.php
Expand Up @@ -66,14 +66,14 @@
/// 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");
$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 {
Expand Down Expand Up @@ -116,4 +116,4 @@
}
}
echo html_writer::table($table);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
2 changes: 1 addition & 1 deletion mod/lti/index.php
Expand Up @@ -77,13 +77,13 @@
// 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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/page/index.php
Expand Up @@ -37,7 +37,6 @@

$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');
Expand All @@ -59,6 +58,7 @@
$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 {
Expand Down
6 changes: 5 additions & 1 deletion mod/quiz/index.php
Expand Up @@ -87,7 +87,11 @@
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 = '';
Expand Down
2 changes: 1 addition & 1 deletion mod/scorm/index.php
Expand Up @@ -36,7 +36,6 @@

$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');
Expand All @@ -63,6 +62,7 @@
$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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/survey/index.php
Expand Up @@ -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");
Expand All @@ -38,6 +37,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);
Expand Down
2 changes: 1 addition & 1 deletion mod/url/index.php
Expand Up @@ -37,7 +37,6 @@

$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');
Expand All @@ -59,6 +58,7 @@
$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 {
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/index.php
Expand Up @@ -68,11 +68,11 @@
/// 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);
Expand Down
2 changes: 1 addition & 1 deletion mod/workshop/index.php
Expand Up @@ -57,11 +57,11 @@
$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 {
Expand Down

0 comments on commit ef2a27e

Please sign in to comment.