<commit_before><?PHP     /**
	 *
	 * Function url return
	 * This function is used to format strings depending on whether a HTACCESS File is being used
	 * @author <NAME>
	 * @version 1.0
	 * @params number $string - the action we need the new url for play, edit, preview etc
 	 * @params number $template_number - the template number we are providing the link for.
 	 * @return string - the URL
	 * @copyright Copyright (c) 2008,2009 University of Nottingham
	 * @package
	 */

	function url_return($string,$template_number){

		global $xerte_toolkits_site;

		switch($string){

			case "play":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "play.php?template_id=" . $template_number;
					}
					break;

			case "preview":if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "preview.php?template_id=" . $template_number;
					}
					break;

			case "edit":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "edit.php?template_id=" . $template_number;
					}
					break;

			case "properties":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return "properties.php?template_id=" . $template_number;
						}
						break;

			case "folderproperties":	if($xerte_toolkits_site->apache=="true"){
								return $string . "_" . $template_number;
							}else{
								return "edit.php?template_id=" . $template_number;
							}
							break;

			case "export":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=false&template_id=" . $template_number;
						}
						break;

			case "export_full":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?full=true&scorm=false&template_id=" . $template_number;
						}
						break;

			case "export_local":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?local=true&scorm=false&template_id=" . $template_number;
						}
						break;

			case "scorm":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=true&template_id=" . $template_number;
					}
					break;

			case "scorm_rich":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_rich_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?data=rich&scorm=true&template_id=" . $template_number;
					}
					break;

			case "scorm2004":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=2004&template_id=" . $template_number;
					}
					break;

			case "drawing":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return "drawing.php?template_id=" . $template_number;
						}
						break;

			case "peerreview":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "peer.php?template_id=" . $template_number;
					}
					break;<commit_msg>Fix url_library.php for rich scorm export in case of apache rewrites<commit_after><?PHP     /**
	 *
	 * Function url return
	 * This function is used to format strings depending on whether a HTACCESS File is being used
	 * @author <NAME>
	 * @version 1.0
	 * @params number $string - the action we need the new url for play, edit, preview etc
 	 * @params number $template_number - the template number we are providing the link for.
 	 * @return string - the URL
	 * @copyright Copyright (c) 2008,2009 University of Nottingham
	 * @package
	 */

	function url_return($string,$template_number){

		global $xerte_toolkits_site;

		switch($string){

			case "play":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "play.php?template_id=" . $template_number;
					}
					break;

			case "preview":if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "preview.php?template_id=" . $template_number;
					}
					break;

			case "edit":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "edit.php?template_id=" . $template_number;
					}
					break;

			case "properties":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return "properties.php?template_id=" . $template_number;
						}
						break;

			case "folderproperties":	if($xerte_toolkits_site->apache=="true"){
								return $string . "_" . $template_number;
							}else{
								return "edit.php?template_id=" . $template_number;
							}
							break;

			case "export":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=false&template_id=" . $template_number;
						}
						break;

			case "export_full":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?full=true&scorm=false&template_id=" . $template_number;
						}
						break;

			case "export_local":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return $xerte_toolkits_site->php_library_path . "scorm/export.php?local=true&scorm=false&template_id=" . $template_number;
						}
						break;

			case "scorm":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=true&template_id=" . $template_number;
					}
					break;

			case "scorm_rich":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?data=rich&scorm=true&template_id=" . $template_number;
					}
					break;

			case "scorm2004":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return $xerte_toolkits_site->php_library_path . "scorm/export.php?scorm=2004&template_id=" . $template_number;
					}
					break;

			case "drawing":	if($xerte_toolkits_site->apache=="true"){
							return $string . "_" . $template_number;
						}else{
							return "drawing.php?template_id=" . $template_number;
						}
						break;

			case "peerreview":	if($xerte_toolkits_site->apache=="true"){
						return $string . "_" . $template_number;
					}else{
						return "peer.php?template_id=" . $template_number;
					}
					break;
{'fraction_non_alphanumeric': 0.1421312826146663, 'fraction_numerical': 0.004943696786597089, 'mean_word_length': 3.180826636050517, 'pattern_counts': {'":': 26, '<': 7, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2865619', 'n_tokens_mistral': 3263, 'n_tokens_neox': 2449, 'n_words': 442}