_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

MediaWiki:Guidedtour-tour-StudentTrainingComplete.js

MediaWiki:Guidedtour-tour-StudentTrainingComplete.js is a topic that has captured the attention of millions of people around the world. Its impact has been felt in different aspects of daily life, from the social to the economic sphere. Over the years, MediaWiki:Guidedtour-tour-StudentTrainingComplete.js has generated discussions and debates in various sectors, causing significant changes in the way certain problems are addressed. In this article, we will thoroughly explore MediaWiki:Guidedtour-tour-StudentTrainingComplete.js and its influence on today's society, analyzing its different dimensions and highlighting its relevance today.
// Guided Tour for adding your username to the list of users who completed the training for students: Wikipedia:Training/For_students
 
( function ( window, document, $, mw, gt ) {
 
//automatic api:edit function to send yourself messages
function sendMessage( targetPage, msgPage ) {
	var api = new mw.Api();
	api.get( {
		'action' : 'query',
		'titles' : msgPage,
		'prop'   : 'revisions',
		'meta'   : 'tokens',
		'type'   : 'csrf',
		'rvprop' : 'content',
		'indexpageids' : 1
	} ).done( function (result) {
		result = result.query;
		var page = result.pages];
		var text = page.revisions;
		api.post( {
			'action' : 'edit',
			'title' : targetPage,
			'appendtext' : "\n" + text,
			'summary' : 'automatic post to indicate completion of training for students',
			'token' : result.tokens.csrftoken
		} );
	} );
}
 
gt.defineTour( {
        name: 'StudentTrainingComplete',
        shouldLog: true,
        steps: [ {
                //1
                title: 'Certification',
                description: 'Project:Training/tour/student_training_complete1',
                onShow: gt.getPageAsDescription,
                overlay: true,
                closeOnClickOutside: false,
	            buttons: [ {
                        name: 'I completed the training.',
                        onclick: function()  {
                        	if(!mw.config.get('wgUserName')){  alert( "Please login." );
                        	return;
                        }
                        sendMessage( 'Project:Training/For_students/Training_feedback', 'Project:Training/tour/educator_training_complete_preload' );
                        sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Project:Training/tour/training_completion_award' );
                        mw.libs.guiders.next(); }
					} ],
                allowAutomaticOkay: false
                
} , {
                //2
                title: 'Feedback',
                description: 'Project:Training/tour/student_training_complete2',
                onShow: gt.getPageAsDescription,
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
                        name: 'Leave feedback',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:Training/For_students/Leave_feedback' ) + '?action=edit&preload=Wikipedia%3ATraining%2FFor+students%2FTraining+feedback%2Fpreload&editintro=Wikipedia:Training/For_students/Training_feedback/editintro&preloadtitle=Training+feedback&section=new&tour=StudentTrainingComplete&step=4'
					}, {
                        name: 'No thanks',
                        onclick: function() { mw.libs.guiders.next(); } 
                }],
                allowAutomaticOkay: false

} , {
                //3
                title: 'Thanks!',
                description: 'Project:Training/tour/student_training_complete3',
                onShow: gt.getPageAsDescription,
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
	            	    name: 'Okay',
                        action: 'end'
                } ],
                allowAutomaticOkay: false
             
} , {
                //4
                title: 'Thanks!',
                description: 'Project:Training/tour/student_training_complete4',
                onShow: gt.getPageAsDescription,
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
	            	    name: 'Okay',
                        action: 'end'
                } ],
                allowAutomaticOkay: false

}]
 
} );
 
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;