mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
Merge branch 'MDL-58855-master' of git://github.com/peterRd/moodle
This commit is contained in:
commit
1cd08af7f4
@ -260,6 +260,7 @@ $string['nopermissiontodelinglossary'] = 'You can\'t comments in this glossary!'
|
||||
$string['nopermissiontoviewresult'] = 'You can only look at results for your own entries';
|
||||
$string['notcategorised'] = 'Not categorised';
|
||||
$string['notapproved'] = 'glossary entry is not approved yet.';
|
||||
$string['entrynotapproved'] = 'Entry not approved';
|
||||
$string['numberofentries'] = 'Number of entries';
|
||||
$string['onebyline'] = '(one per line)';
|
||||
$string['page-mod-glossary-x'] = 'Any glossary module page';
|
||||
|
@ -743,7 +743,12 @@ function mod_glossary_get_tagged_entries($tag, $exclusivemode = false, $fromctx
|
||||
$coursename = format_string($item->fullname, true, array('context' => context_course::instance($item->courseid)));
|
||||
$coursename = html_writer::link($courseurl, $coursename);
|
||||
$icon = html_writer::link($pageurl, html_writer::empty_tag('img', array('src' => $cm->get_icon_url())));
|
||||
$tagfeed->add($icon, $pagename, $cmname.'<br>'.$coursename);
|
||||
|
||||
$approved = "";
|
||||
if (!$item->approved) {
|
||||
$approved = '<br>'. html_writer::span(get_string('entrynotapproved', 'mod_glossary'), 'badge badge-warning');
|
||||
}
|
||||
$tagfeed->add($icon, $pagename, $cmname.'<br>'.$coursename.$approved);
|
||||
}
|
||||
|
||||
$content = $OUTPUT->render_from_template('core_tag/tagfeed',
|
||||
|
@ -4,7 +4,7 @@ Feature: A teacher can choose whether glossary entries require approval
|
||||
As a user
|
||||
I need to enable entries requiring approval
|
||||
|
||||
Scenario: Approve and undo approve glossary entries
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
@ -25,7 +25,9 @@ Feature: A teacher can choose whether glossary entries require approval
|
||||
| Description | Test glossary entries require approval |
|
||||
| Approved by default | No |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
|
||||
Scenario: Approve and undo approve glossary entries
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
@ -66,3 +68,25 @@ Feature: A teacher can choose whether glossary entries require approval
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
Then I should see "No entries found in this section"
|
||||
|
||||
@javascript
|
||||
Scenario: View pending approval glossary items
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
| Concept | Just a test concept |
|
||||
| Definition | Concept definition |
|
||||
| Keyword(s) | Black |
|
||||
| Tags | Test |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I press "Customise this page"
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Tags" "link" in the "Navigation" "block"
|
||||
And I follow "Test"
|
||||
Then I should see "Glossary entries"
|
||||
And I should see "Just a test concept"
|
||||
And I should see "Entry not approved"
|
||||
And I log out
|
||||
|
Loading…
x
Reference in New Issue
Block a user